public class DelegationUtil extends java.lang.Object implements DOConstants
ABSTRACT_ATTRIBUTE, ADD_RELATIONSHIPS_OP_ID, ADD_TYPE_OP_ID, ANONYMOUS_ID, AUDIT_GET_OP_ID, AUDIT_QUERY_OP_ID, CHECK_AUTHORIZATION_OP_ID, CHECK_DELEGATE_OP_ID, CLIENT_AUTH_TYPE_HSPUBKEY, CLIENT_AUTH_TYPE_HSSECKEY, CONTENT_ELEMENT_ID, CREATE_OBJ_OP_ID, CREATOR_ATTRIBUTE, DATE_CREATED_ATTRIBUTE, DATE_FORMAT_MDYHMS, DATE_MODIFIED_ATTRIBUTE, DEFAULT_CLIENT_CERT_EXPIRATION_DAYS, DEL_ATTRIBUTES_OP_ID, DELETE_DATA_OP_ID, DELETE_OBJ_OP_ID, DOES_OBJ_EXIST_OP_ID, ELEMENT_ATTS_MSGTYPE, EM_COMMAND_CREATE_DATASTREAM, EM_COMMAND_CREATE_DISSEMINATOR, EM_COMMAND_CREATE_DO, EM_COMMAND_DELETE_ATTACHMENTS, EM_COMMAND_DELETE_DATASTREAM, EM_COMMAND_DELETE_DISSEMINATOR, EM_COMMAND_DELETE_DO, EM_COMMAND_GET_DATASTREAM_BYTES, EM_COMMAND_GET_DATASTREAM_KEY_METADATA, EM_COMMAND_GET_DISSEMINATION, EM_COMMAND_GET_DISSEMINATOR_METADATA, EM_COMMAND_GET_EXECUTABLE, EM_COMMAND_GET_KEY_METADATA, EM_COMMAND_GET_READ_REQUEST, EM_COMMAND_GET_SERVLET, EM_COMMAND_GET_TYPE_SIGNATURE, EM_COMMAND_GET_VERSION, EM_COMMAND_LIST_ATTACHMENTS, EM_COMMAND_LIST_DATASTREAMS, EM_COMMAND_LIST_DISSEMINATORS, EM_COMMAND_LIST_DO, EM_COMMAND_LIST_DO_POLICIES, EM_COMMAND_SET_ATTACHMENTS, EM_COMMAND_SET_DATASTREAM_BYTES, EM_COMMAND_SET_DO_POLICIES, EM_COMMAND_SET_EXECUTABLE, EM_COMMAND_SET_READ_REQUEST, EM_COMMAND_VERIFY_DO, FILE_NAME_ATTRIBUTE, FOLDER_ATTRIBUTE, GET_ATTRIBUTES_OP_ID, GET_CREDENTIALS_OP_ID, GET_DATA_OP_ID, GET_REPO_TXNS_OP_ID, GET_SERIALIZED_FORM_OP_ID, GRANT_KEY_OP_ID, HAS_TYPE_OP_ID, INDEX_UP_TO_DATE_ID, INJECT_KNOWBOT_OP_ID, IS_PART_OF_ATTRIBUTE, LANGUAGE_ATTRIBUTE, LIST_DATA_OP_ID, LIST_DELEGATORS_OP_ID, LIST_OBJECTS_OP_ID, LIST_OPERATIONS_OP_ID, LIST_TYPES_OP_ID, MIME_TYPE_ATTRIBUTE, NOTES_ATTRIBUTE, OBJECT_ATTS_MSGTYPE, OBJECT_NAME_HDL_TYPE, OBJECT_SERVER_HDL_TYPE, OBJECT_SVRINFO_HDL_TYPE, OWNER_ATTRIBUTE, PARAM_ATTRIBUTES, PARAM_ELEMENT_ID, PUSH_REPO_TXN_OP_ID, REFERENCES_ATTRIBUTE, REINDEX_OBJECT_ID, REMOVE_TYPE_OP_ID, REPO_RIGHTS_ELEMENT_ID, RIGHTS_DELEGATION_OBJECT_HDL_TYPE, RIGHTS_ELEMENT_ID, SEARCH_OP_ID, SET_ATTRIBUTES_OP_ID, SIZE_ATTRIBUTE, STORE_CREDENTIAL_OP_ID, STORE_DATA_OP_ID, TITLE_ATTRIBUTE
Modifier and Type | Method and Description |
---|---|
static ResultWithTTL<java.util.List<DelegationChain>> |
allImplicitDelegators(DOClient client,
java.util.List<java.lang.String> initialDelegators)
Returns all delegation chains of the given entity starting with the given initial delegators.
|
static ResultWithTTL<java.util.List<DelegationChain>> |
allImplicitDelegators(DOClient client,
java.util.List<java.lang.String> initialDelegators,
boolean alwaysOwnDelegationObject,
java.lang.String repository)
Returns all delegation chains of the given entity starting with the given initial delegators.
|
static ResultWithTTL<java.lang.Boolean> |
checkDelegation(DOClient client,
java.lang.String delegate,
java.lang.String delegator,
java.lang.String delegationObject,
java.lang.String repository)
Returns whether a delegation (e.g.
|
static ResultWithTTL<java.lang.Boolean> |
checkImplicitDelegation(DOClient client,
java.lang.String delegate,
DelegationChain chain)
Returns whether an id is an implicit delegate of a delegator via a specified delegation chain.
|
static ResultWithTTL<java.lang.Boolean> |
checkImplicitDelegation(DOClient client,
java.lang.String delegate,
DelegationChain chain,
boolean alwaysOwnDelegationObject,
java.lang.String repository)
Returns whether an id is an implicit delegate of a delegator via a specified delegation chain.
|
static java.lang.String |
delegationObject(java.lang.String id)
Returns the id of the DO which manages delegation for the given id.
|
static ResultWithTTL<java.util.List<java.lang.String>> |
listDelegators(DOClient client,
java.lang.String delegate,
java.lang.String delegationObj,
java.lang.String repository)
List the entities delegating to the given entity, for example the groups of a member, or the supergroups of a group.
|
public static java.lang.String delegationObject(java.lang.String id) throws DOException
DOException
public static ResultWithTTL<java.lang.Boolean> checkDelegation(DOClient client, java.lang.String delegate, java.lang.String delegator, java.lang.String delegationObject, java.lang.String repository) throws DOException
client
- the client to perform operationsdelegate
- the delegate (e.g. member or subgroup)delegator
- the delegator (e.g. group or supergroup) to checkdelegationObject
- the DO to ask (looked up in HS if null)repository
- the repository it lives in (looked up if null)DOException
public static ResultWithTTL<java.util.List<java.lang.String>> listDelegators(DOClient client, java.lang.String delegate, java.lang.String delegationObj, java.lang.String repository) throws DOException
client
- the client to perform operationsdelegate
- the delegate (e.g. member or subgroup)delegationObj
- the DO to ask (looked up in HS if null)repository
- the repository it lives in (looked up if null)DOException
public static ResultWithTTL<java.util.List<DelegationChain>> allImplicitDelegators(DOClient client, java.util.List<java.lang.String> initialDelegators) throws DOException
client
- the DO client to perform operationsinitialDelegators
- starting pointsDOException
public static ResultWithTTL<java.util.List<DelegationChain>> allImplicitDelegators(DOClient client, java.util.List<java.lang.String> initialDelegators, boolean alwaysOwnDelegationObject, java.lang.String repository) throws DOException
client
- the DO client to perform operationsinitialDelegators
- starting pointsalwaysOwnDelegationObject
- if true, each delegator is assumed to manage its own delegation; if false, a delegation object is looked up in the handle systemrepository
- the repository each delegator lives in (looked up if null)DOException
public static ResultWithTTL<java.lang.Boolean> checkImplicitDelegation(DOClient client, java.lang.String delegate, DelegationChain chain) throws DOException
DOException
public static ResultWithTTL<java.lang.Boolean> checkImplicitDelegation(DOClient client, java.lang.String delegate, DelegationChain chain, boolean alwaysOwnDelegationObject, java.lang.String repository) throws DOException
client
- the DO client to perform operationsdelegate
- the id to be checkedchain
- the delegation chain to be checkedalwaysOwnDelegationObject
- if true, each delegator is assumed to manage its own delegation; if false, a delegation object is looked up in the handle systemrepository
- the repository each delegator lives in (looked up if null)DOException