|
Oracle® Information Rights Management Server Java API Reference 11g Release 1 (11.1.1) E12907-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.irm.engine.rights.context.DomainOperationsInstance
public final class DomainOperationsInstance
Domain methods.
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.DomainOperationsInstance.*;
Method Summary | |
---|---|
static void |
addDomainAdministrators(Domain domain, Collection<Account> accounts) Add one or more administrators to a domain. |
static void |
addDomainManagers(Domain domain, Collection<Account> accounts) Add one or more managers to a domain. |
static int |
countDomains() Count the number of domains. |
static void |
deleteDomain(Domain domain) Delete a domain. |
static boolean |
domainExists(UUID uuid) Check for a domain's existence. |
static Domain |
getDomain() Get a domain. |
static Domain.Role |
getRoleForDomain(Domain domain, Account account) Find out what role an account has within a domain. |
static Domain |
installDomain() Create a new domain with the standard set of roles and templates. |
static void |
installStandardSystem(Domain domain) Install the standard set of roles and templates. |
static Collection<Account> |
listAccountDetails(Collection<Account> accounts) Retrieve the name and account type from one or more account UUID values. |
static Collection<DomainAccount> |
listDomainAccounts(Domain domain) Find out what accounts have a role within this domain. |
static Collection<Account> |
listDomainAdministrators(Domain domain) List domain administrators. |
static Collection<Account> |
listDomainManagers(Domain domain) List domain managers. |
static Collection<Domain> |
listDomains() List domains that the calling principal is authorized to access. |
static Collection<Domain> |
listDomainsForAccount(Account account, Domain.Role filter) List domains administered by an account. |
static Collection<Label> |
listStandardLabels(UUID uuid, Locale[] locales) Obtain the labels for standard set of context templates and document roles. |
static Domain |
refreshDomain(Domain domain) Refresh a domain's properties. |
static void |
removeDomainAccounts(Domain domain, Collection<DomainAccount> accounts) Remove domain accounts. |
static void |
removeDomainAdministrators(Domain domain, Collection<Account> accounts) Remove one or more administrators from a domain. |
static void |
removeDomainManagers(Domain domain, Collection<Account> accounts) Remove one or more domain managers from a domain. |
static Domain |
saveChangesToDomain(Domain domain, Domain delta) Save changes to a domain. |
static Domain |
saveNewDomain(Domain domain) Create a new domain. |
static Domain |
saveNewDomainWithAdministrator(Domain domain, Account administrator) Create a new domain. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Domain saveNewDomain(Domain domain) throws DomainAlreadyExistsException
domain
- the domain.DomainAlreadyExistsException
- the domain already exists.saveNewDomainWithAdministrator
public static Domain saveNewDomainWithAdministrator(Domain domain, Account administrator) throws DomainAlreadyExistsException
domain
- the domain.administrator
- the domain administrator.DomainAlreadyExistsException
- the domain already exists.saveNewDomain
public static Domain saveChangesToDomain(Domain domain, Domain delta) throws UnknownDomainException, IllegalArgumentException, AuthorizationDeniedException
Domain
by providing two copies. Changes are made by comparing the two copies of the domain. If there are no differences in a property then no changes are made to persistent storage for that property. Changes in collection based properties cause additions or removals to occur in persistent storage. For example, if the delta contains a new Label
as compared to the domain then a label will be added to the domain.
addDomainAdministrators
method.
domain
- the domain to compare to the delta.delta
- the changes. The Uuid
property must match with the template parameter.UnknownDomainException
- the domain does not exist.IllegalArgumentException
- illegal argument. If the Uuid
property of the delta parameter does not match the domain parameter.AuthorizationDeniedException
- authorization denied. The authenticated user is not authorized to call this operation.public static Domain installDomain()
public static void deleteDomain(Domain domain) throws AuthorizationDeniedException
Domain
destroys all roles, context templates, contexts and assigned rights.ContextInstance
within the domain inaccessible.
addDomainAdministrators
method.
domain
- the domain.AuthorizationDeniedException
- authorization denied. The authenticated user is not authorized to call this operation.public static Collection<Domain> listDomains() throws AuthorizationDeniedException
AuthorizationDeniedException
- if the authenticated user is not allowed to list domains. 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 Domain getDomain() throws DomainNotAvailableException, AuthorizationDeniedException
DomainNotAvailableException
- thrown if no domains exist in the system. This exception indicates that there are no domains. A domain should be created using the installDomain
or saveNewDomain
methods.AuthorizationDeniedException
- if the authenticated user is not allowed to access any domains. 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. If the user is still a valid user then this method returns null if the user is not allowed access to any domains.public static Domain refreshDomain(Domain domain) throws UnknownDomainException, AuthorizationDeniedException
addDomainAdministrators
method.
domain
- the domain.UnknownDomainException
- the domain does not exist.AuthorizationDeniedException
- authorization denied. The authenticated user is not authorized to call this operation.public static int countDomains()
public static boolean domainExists(UUID uuid)
uuid
- the domain UUID.public static Collection<Domain> listDomainsForAccount(Account account, Domain.Role filter)
account
- the user account.filter
- the domain role filter. This filter allows the domains to be listed that the account can administer, manage, inspect or both.public static Collection<Account> listDomainAdministrators(Domain domain) throws UnknownDomainException, AuthorizationDeniedException
Domain
administrators are individuals who define a domain's security policies regarding the use of sealed content. A Domain
administrator defines what DocumentRole
definitions are available for use within the Domain
. A Domain
administrator also defines what ContextTemplate
definitions are available. These definitions are used by domain managers to create Context
classifications.
addDomainAdministrators
method.domain
- the domain.UnknownDomainException
- the domain does not exist.AuthorizationDeniedException
- authorization denied. The authenticated user is not authorized to call this operation.addDomainAdministrators
public static void addDomainAdministrators(Domain domain, Collection<Account> accounts) throws AccountAlreadyAdministratorException, UnknownDomainException, AuthorizationDeniedException
Domain
will always have at least one administrator. When a Domain
has multiple administrators, each administrator will have equal permissions to perform Domain
related activities.addDomainAdministrators
method.
domain
- the domain.accounts
- the accounts. Duplicates are ignored. This parameter is optional, it is valid to pass null or an empty collection.AccountAlreadyAdministratorException
- one of the provided accounts is already a domain administrator.UnknownDomainException
- the domain does not exist.AuthorizationDeniedException
- authorization denied. The authenticated user is not authorized to call this operation.public static void removeDomainAdministrators(Domain domain, Collection<Account> accounts) throws CannotRemoveAdministratorsException, UnknownDomainException, AuthorizationDeniedException
Domain
must have at least one administrator.
addDomainAdministrators
method.
domain
- the domain.accounts
- the accounts. This parameter is optional, it is valid to pass null or an empty collection.CannotRemoveAdministratorsException
- the administrator accounts cannot be removed, as it would leave the domain with no administrators.UnknownDomainException
- the domain does not exist.AuthorizationDeniedException
- authorization denied. The authenticated user is not authorized to call this operation.public static Collection<Account> listDomainManagers(Domain domain) throws UnknownDomainException, AuthorizationDeniedException
Domain
managers are the only individuals who can create new Context
instances using createContextFromTemplate
.
addDomainAdministrators
method.domain
- the domain.UnknownDomainException
- the domain does not exist.AuthorizationDeniedException
- authorization denied. The authenticated user is not authorized to call this operation.addDomainManagers
public static void addDomainManagers(Domain domain, Collection<Account> accounts) throws AccountAlreadyManagerException, UnknownDomainException, AuthorizationDeniedException
addDomainAdministrators
method.
domain
- the domain.accounts
- the accounts. Duplicates are ignored. This parameter is optional, it is valid to pass null or an empty collection.AccountAlreadyManagerException
- one of the provided accounts is already a domain manager (or domain administrator).UnknownDomainException
- the domain does not exist.AuthorizationDeniedException
- authorization denied. The authenticated user is not authorized to call this operation.public static void removeDomainManagers(Domain domain, Collection<Account> accounts) throws UnknownDomainException, AuthorizationDeniedException
addDomainAdministrators
method.
domain
- the domain.accounts
- the accounts. This parameter is optional, it is valid to pass null or an empty collection.UnknownDomainException
- the domain does not exist.AuthorizationDeniedException
- authorization denied. The authenticated user is not authorized to call this operation.public static Domain.Role getRoleForDomain(Domain domain, Account account) throws UnknownDomainException
domain
- the domain.account
- the account.UnknownDomainException
- the domain does not exist.public static Collection<DomainAccount> listDomainAccounts(Domain domain) throws UnknownDomainException, AuthorizationDeniedException
addDomainAdministrators
method.domain
- the domain.UnknownDomainException
- the domain does not exist.AuthorizationDeniedException
- authorization denied. The authenticated user is not authorized to call this operation.public static void removeDomainAccounts(Domain domain, Collection<DomainAccount> accounts) throws CannotRemoveAdministratorsException, UnknownDomainException, AuthorizationDeniedException
addDomainAdministrators
method.
domain
- the domain.accounts
- the accounts. This parameter is optional, it is valid to pass null or an empty collection.CannotRemoveAdministratorsException
- the administrator accounts cannot be removed, as it would leave the domain with no administrators.UnknownDomainException
- the domain does not exist.AuthorizationDeniedException
- authorization denied. The authenticated user is not authorized to call this operation.public static Collection<Account> listAccountDetails(Collection<Account> accounts) throws AuthorizationDeniedException
accounts
- the accounts. This parameter is optional, it is valid to pass null or an empty collection.AuthorizationDeniedException
- if the authenticated user is not allowed to list accounts. A user is allowed to list accounts if they have any domain administrator, domain manager, inspector or context manager role.public static void installStandardSystem(Domain domain) throws UnknownDomainException
domain
- the domain into which to add the roles and templates.UnknownDomainException
- the domain does not exist.public static Collection<Label> listStandardLabels(UUID uuid, Locale[] locales)
uuid
- the role or template UUID value.locales
- the required locales. If no locales are specified all the available labels are returned. This parameter is optional, it is valid to pass null.
|
Oracle® Information Rights Management Server Java API Reference 11g Release 1 (11.1.1) E12907-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |