Common default ACL object that can be used for an entire data repository.
The common ACL can be designated 'entire domain accessible' or can define specific readers that will be used for the entire repository. It is considered a configuration error to specify both 'entire domain accessible' while also specifying a specific set of readers, etc.
Optional configuration parameters:
defaultAcl.mode
- Specifies the default ACL mode (DefaultAcl.DefaultAclMode
).defaultAcl.public
- Specifies (true
/false
), that the common ACL used for the entire repository has "public" access.defaultAcl.readers.users
- Specifies the common ACL readers in a comma delimited list (only used when "public" isfalse
).defaultAcl.readers.groups
- Specifies the common ACL group readers in a comma delimited list (only used when "public" isfalse
).defaultAcl.denied.users
- Specifies the common ACL denied readers in a comma delimited list (only used when "public" isfalse
).defaultAcl.denied.groups
- Specifies the common ACL denied group readers in a comma delimited list (only used when "public" isfalse
).defaultAcl.name
- Specifies the virtual container name of the default ACL item. Set this parameter especially if multiple connectors may be used on the same data source in parallel to prevent them from interfering with each other. This item's queue is always designated asDEFAULT_ACL_VIRTUAL_CONTAINER_QUEUE
. Default:DEFAULT_ACL_VIRTUAL_CONTAINER
Sample usage from the connector initialization
(init(ConnectorContext)
):
IndexingService myIndexingServiceInstance = context.getIndexingService();
// one time creation of the default ACL based on configuration parameters (see above)
DefaultAcl defaultAcl = DefautAcl.fromConfiguration(myIndexingServiceInstance);
And then later during iteration through the repository data:
// while looping through the repository data
...
Item item = ... // create the Item for uploading
defaultAcl.applyToIfEnabled(item); // will update the item's ACL depending on the mode
// upload the item
...
Nested Class Summary
class | DefaultAcl.Builder | Builder object for constructing a DefaultAcl object. |
|
enum | DefaultAcl.DefaultAclMode | Mode setting used to set a default ACL on an Item . |
Constant Summary
String | DEFAULT_ACL_DENIED_GROUPS | |
String | DEFAULT_ACL_DENIED_USERS | |
String | DEFAULT_ACL_MODE | |
String | DEFAULT_ACL_NAME | |
String | DEFAULT_ACL_NAME_DEFAULT | |
String | DEFAULT_ACL_PUBLIC | |
String | DEFAULT_ACL_QUEUE | |
String | DEFAULT_ACL_READERS_GROUPS | |
String | DEFAULT_ACL_READERS_USERS |
Field Summary
public static final Parser<DefaultAcl.DefaultAclMode> | DEFAULT_ACL_MODE_PARSER | Configuration parser for DefaultAcl.DefaultAclMode . |
Public Method Summary
boolean |
applyToIfEnabled(Item item)
Applies a common default ACL to the passed
Item . |
static DefaultAcl |
fromConfiguration(IndexingService indexingService)
Creates an instance of a
DefaultAcl from the Configuration . |
DefaultAcl.DefaultAclMode |
getDefaultAclMode()
Returns DefaultAclMode.
|
Inherited Method Summary
Constants
public static final String DEFAULT_ACL_DENIED_GROUPS
public static final String DEFAULT_ACL_DENIED_USERS
public static final String DEFAULT_ACL_MODE
public static final String DEFAULT_ACL_NAME
public static final String DEFAULT_ACL_NAME_DEFAULT
public static final String DEFAULT_ACL_PUBLIC
public static final String DEFAULT_ACL_QUEUE
public static final String DEFAULT_ACL_READERS_GROUPS
public static final String DEFAULT_ACL_READERS_USERS
Fields
public static final Parser<DefaultAcl.DefaultAclMode> DEFAULT_ACL_MODE_PARSER
Configuration parser for DefaultAcl.DefaultAclMode
.
Public Methods
public boolean applyToIfEnabled (Item item)
public static DefaultAcl fromConfiguration (IndexingService indexingService)
Creates an instance of a DefaultAcl
from the Configuration
.
Parameters
indexingService | connector's indexing service instance for uploading default ACL to Cloud Search |
---|
Returns
- an instance of a
DefaultAcl