|
Oracle® Information Rights Management Server Java API Reference 11g Release 1 (11.1.1) E12907-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.irm.engine.rights.context.DocumentRightOperationsInstance
public final class DocumentRightOperationsInstance
Document right operations. Document right operations include checking in rights, altering item restrictions, listing rights and checking items across sets of rights.
This class provides static methods for a set of procedural style methods. The methods can be made to appear as global methods by using import static. e.g.
import static oracle.irm.engine.rights.context.DocumentRightOperationsInstance.*;
Method Summary | |
---|---|
static Collection<DocumentRight> |
assignRole(ContextInstance context, DocumentRole role, Collection<Account> accounts, Collection<ItemCode> items) Assign a document role. |
static Collection<DocumentRight> |
checkInRightsForAccount(Account account) Check all rights in use by an account. |
static int |
countRightsByContext(ContextInstance context) Count the number of rights assigned within a context. |
static int |
countRightsByRole(DocumentRole role) Count the number of rights assigned to a role. |
static int |
countRightsByTemplate(ContextTemplate template, DocumentRole role) Count the number of rights assigned to a role, with a relationship to the specified template. |
static Collection<DocumentRight> |
filterRightsByAccounts(ContextInstance context, Collection<Account> accounts) List a filtered set of rights assigned within a context based on account details. |
static Collection<DocumentRight> |
listRightsByAccount(Account account) List rights for an account. |
static Collection<DocumentRight> |
listRightsByAccounts(Collection<Account> accounts) List rights for one or more accounts. |
static Collection<DocumentRight> |
listRightsByContext(ContextInstance context, PageRange pageRange) List rights assigned within a context. |
static Collection<DocumentRight> |
reassignRole(Collection<DocumentRight> rights, DocumentRole role, Collection<ItemCode> items) Alter role assignments. |
static DocumentRight |
refreshDocumentRight(DocumentRight right) Refresh a right's properties. |
static Collection<DocumentRight> |
saveChangesToItems(Collection<DocumentRight> rights, Collection<ItemCode> itemCodes, Collection<ItemCode> delta) Alter the item restrictions for a set of rights. |
static Collection<DocumentRight> |
searchRightsByAccount(Account account, Context context) Search rights assigned to an account, optionally filtered on a context. |
static Collection<DocumentRight> |
searchRightsByAccounts(Collection<Account> accounts, Context context) Search rights assigned to one or more accounts, optionally filtered by a context. |
static void |
unassignRight(DocumentRight right) Un-assign a right. |
static void |
unassignRights(Collection<DocumentRight> rights) Un-assign a set of rights. |
static int |
unassignRightsByContext(ContextInstance context) Un-assign rights assigned to a context. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Collection<DocumentRight> assignRole(ContextInstance context, DocumentRole role, Collection<Account> accounts, Collection<ItemCode> items) throws AccountAlreadyAssignedException, UnsupportedDocumentRoleException, UnknownContextException, UnknownDocumentRoleException, AuthorizationDeniedException
Context
. If any of the provided accounts already has the role assigned the account is silently ignored and the role is not re-assigned.
addContextManagers
method.
context
- the context.role
- the role.accounts
- the accounts. This parameter is optional, it is valid to pass null or an empty collection.items
- item restrictions. Can be empty. This parameter is optional, it is valid to pass null or an empty collection.AccountAlreadyAssignedException
- an account is already assigned a role. An account can only be assigned one role within a Context
.UnsupportedDocumentRoleException
- the Context
does not support the provided document role.UnknownContextException
- the context does not exist.UnknownDocumentRoleException
- the role does not exist.AuthorizationDeniedException
- authorization denied. The authenticated user is not authorized to call this operation.public static Collection<DocumentRight> reassignRole(Collection<DocumentRight> rights, DocumentRole role, Collection<ItemCode> items) throws UnsupportedDocumentRoleException, UnknownDocumentRoleException, UnknownDocumentRightException, AuthorizationDeniedException
Context
this method can be used to alter the role assignment without a two-step unassign right and assign role.
addContextManagers
method.
rights
- the rights. This parameter is optional, it is valid to pass null or an empty collection.role
- the role.items
- item restrictions. Can be empty. This parameter is optional, it is valid to pass null or an empty collection.UnsupportedDocumentRoleException
- the role provided is not supported by a context associated by one of the supplied rights.UnknownDocumentRoleException
- the role does not exist.UnknownDocumentRightException
- at least one of the rights does not exist.AuthorizationDeniedException
- authorization denied. The authenticated user is not authorized to call this operation.public static Collection<DocumentRight> checkInRightsForAccount(Account account) throws AuthorizationDeniedException
account
- the account.AuthorizationDeniedException
- if the authenticated user is not allowed to check in rights. This will typically indicate that the authenticated user no longer exists in the user store. e.g. session is still valid but the user has been deleted from the user store.public static Collection<DocumentRight> saveChangesToItems(Collection<DocumentRight> rights, Collection<ItemCode> itemCodes, Collection<ItemCode> delta) throws UnknownDocumentRightException, AuthorizationDeniedException
DocumentRight
. Changes are made to the list of item restrictions by comparing the two copies of the item codes provided and either removing or adding item restrictions by looking at the delta.ItemCode
instances then new items will be added to the rights. However, if the delta (as compared to the first list of items) does not contain an ItemCode
instance then the items will be removed from the rights.
addContextManagers
method.
rights
- the rights to alter. This parameter is optional, it is valid to pass null or an empty collection.itemCodes
- the item codes. This parameter is optional, it is valid to pass null or an empty collection.delta
- the changes. This parameter is optional, it is valid to pass null or an empty collection.UnknownDocumentRightException
- the document right does not exist.AuthorizationDeniedException
- authorization denied. The authenticated user is not authorized to call this operation.public static void unassignRight(DocumentRight right)
right
- the right to un-assign.public static void unassignRights(Collection<DocumentRight> rights) throws AuthorizationDeniedException
addContextManagers
method.
rights
- the rights to un-assign. This parameter is optional, it is valid to pass null or an empty collection.AuthorizationDeniedException
- authorization denied. The authenticated user is not authorized to call this operation.public static int unassignRightsByContext(ContextInstance context) throws UnknownContextException
context
- the context.UnknownContextException
- the context does not exist.public static int countRightsByRole(DocumentRole role) throws UnknownDocumentRoleException
role
- the role.UnknownDocumentRoleException
- the role does not exist.public static int countRightsByContext(ContextInstance context) throws UnknownContextException
context
- the context.UnknownContextException
- the context does not exist.public static int countRightsByTemplate(ContextTemplate template, DocumentRole role) throws UnknownContextTemplateException, UnknownDocumentRoleException
template
- the template.role
- the role.UnknownContextTemplateException
- the context template does not exist.UnknownDocumentRoleException
- the role does not exist.public static Collection<DocumentRight> listRightsByContext(ContextInstance context, PageRange pageRange) throws UnknownContextException, IllegalArgumentException, AuthorizationDeniedException
addContextManagers
method. This method can be invoked by users that have the Inspector role in the related context. This role can be assigned using the addInspectors
method.context
- the context.pageRange
- page range for the search result.UnknownContextException
- the context does not exist.IllegalArgumentException
- the page range is invalid. The page range is limited to a page size of 5000 items. This is the maximum number of items that can be returned in one request.AuthorizationDeniedException
- authorization denied. The authenticated user is not authorized to call this operation.public static Collection<DocumentRight> filterRightsByAccounts(ContextInstance context, Collection<Account> accounts) throws UnknownContextException, AuthorizationDeniedException
addContextManagers
method. This method can be invoked by users that have the Inspector role in the related context. This role can be assigned using the addInspectors
method.context
- the context.accounts
- accounts filter. At least one account must be specified.UnknownContextException
- the context does not exist.AuthorizationDeniedException
- authorization denied. The authenticated user is not authorized to call this operation.public static Collection<DocumentRight> listRightsByAccount(Account account) throws AuthorizationDeniedException
account
- the account.AuthorizationDeniedException
- if the authenticated user is not allowed to list rights. This will typically indicate that the authenticated user no longer exists in the user store. e.g. session is still valid but the user has been deleted from the user store.public static Collection<DocumentRight> listRightsByAccounts(Collection<Account> accounts)
accounts
- the accounts. This parameter is optional, it is valid to pass null or an empty collection.public static Collection<DocumentRight> searchRightsByAccount(Account account, Context context) throws UnknownContextException
account
- the account.context
- the optional context. This parameter is optional, it is valid to pass null.UnknownContextException
- the context does not exist.public static Collection<DocumentRight> searchRightsByAccounts(Collection<Account> accounts, Context context) throws UnknownContextException
accounts
- the accounts.context
- the optional context. This parameter is optional, it is valid to pass null.UnknownContextException
- the context does not exist.public static DocumentRight refreshDocumentRight(DocumentRight right) throws UnknownDocumentRightException, AuthorizationDeniedException
addContextManagers
method. This method can be invoked by users that have the Inspector role in the related context. This role can be assigned using the addInspectors
method.
right
- the right.UnknownDocumentRightException
- the right does not exist.AuthorizationDeniedException
- authorization denied. The authenticated user is not authorized to call this operation.
|
Oracle® Information Rights Management Server Java API Reference 11g Release 1 (11.1.1) E12907-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |