|
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 |
public interface DomainOperationsEndpoint
Web Service end point interface for Domain Operations.
The WSDL for this end point interface can be downloaded from the server using the following URL:
http://irm.example.com/irm_services/domain_operations?wsdl
Requests for this web service should be sent to the following URL:
https://irm.example.com/irm_services/domain_operations
Method Summary | |
---|---|
void |
addDomainAdministrators(DomainRef domain, AccountRef[] accounts) Add one or more administrators to a domain. |
void |
addDomainManagers(DomainRef domain, AccountRef[] accounts) Add one or more managers to a domain. |
void |
deleteDomain(DomainRef domain) Delete a domain. |
Account[] |
listAccountDetails(AccountRef[] accounts) Retrieve the name and account type from one or more account UUID values. |
AccountRef[] |
listDomainAdministrators(DomainRef domain) List domain administrators. |
AccountRef[] |
listDomainManagers(DomainRef domain) List domain managers. |
Domain[] |
listDomains() List domains that the calling principal is authorized to access. |
void |
removeDomainAdministrators(DomainRef domain, AccountRef[] accounts) Remove one or more administrators from a domain. |
void |
removeDomainManagers(DomainRef domain, AccountRef[] accounts) Remove one or more domain managers from a domain. |
Domain |
saveChangesToDomain(Domain domain, Domain delta) Save changes to a domain. |
Domain |
saveNewDomain(Domain domain) Create a new domain. |
Domain |
saveNewDomainWithAdministrator(Domain domain, AccountRef administrator) Create a new domain. |
Method Detail |
---|
Domain saveNewDomain(Domain domain) throws DomainAlreadyExistsFault
import static oracle.irm.j2ee.jws.rights.context.DomainOperations.getDomainOperationsEndpoint; import java.net.Authenticator; import java.net.PasswordAuthentication; import java.util.Locale; import java.util.UUID; import oracle.irm.engine.types.core.general.Label; import oracle.irm.engine.types.rights.context.Domain; import oracle.irm.j2ee.jws.rights.context.DomainOperationsEndpoint; public class SaveNewDomainWS { public static void main(String[] args) throws Exception { final String hostPort = args[0]; final String username = args[1]; final String password = args[2]; // Configure an authenticator to provide the credentials // for the web service Authenticator.setDefault(new Authenticator() { @Override protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(username, password.toCharArray()); } }); // Get the domain operations web service DomainOperationsEndpoint domainOperations = getDomainOperationsEndpoint(hostPort); // Domain has one English label Label label = new Label(Locale.ENGLISH, "Sample Domain", "This is a domain created from sample code."); // Domain UUID is fixed for sample code UUID domainUUID = UUID.fromString("6fab93fd-2858-461a-a0b3-34e261dbf8fd"); Domain domain = new Domain(domainUUID,new Label[] { label }); // Save the new domain domainOperations.saveNewDomain(domain); } }
domain
- the domain.DomainAlreadyExistsFault
- the domain already exists.saveNewDomainWithAdministrator
Domain saveNewDomainWithAdministrator(Domain domain, AccountRef administrator) throws DomainAlreadyExistsFault
domain
- the domain.administrator
- the domain administrator.DomainAlreadyExistsFault
- the domain already exists.saveNewDomain
Domain saveChangesToDomain(Domain domain, Domain delta) throws UnknownDomainFault, AuthorizationDeniedFault
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.UnknownDomainFault
- the domain does not exist.AuthorizationDeniedFault
- authorization denied. The authenticated user is not authorized to call this operation.void deleteDomain(DomainRef domain) throws AuthorizationDeniedFault
Domain
destroys all roles, context templates, contexts and assigned rights.ContextInstance
within the domain inaccessible.
addDomainAdministrators
method.
import static oracle.irm.j2ee.jws.rights.context.DomainOperations.getDomainOperationsEndpoint; import java.net.Authenticator; import java.net.PasswordAuthentication; import java.util.UUID; import oracle.irm.engine.types.rights.context.DomainRef; import oracle.irm.j2ee.jws.rights.context.DomainOperationsEndpoint; public class DeleteDomainWS { public static void main(String[] args) throws Exception { final String hostPort = args[0]; final String username = args[1]; final String password = args[2]; // Configure an authenticator to provide the credentials // for the web service Authenticator.setDefault(new Authenticator() { @Override protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(username, password.toCharArray()); } }); // Domain UUID is fixed for sample code UUID domainUUID = UUID.fromString("6fab93fd-2858-461a-a0b3-34e261dbf8fd"); // Get the domain operations web service DomainOperationsEndpoint domainOperations = getDomainOperationsEndpoint(hostPort); DomainRef domain = new DomainRef(domainUUID); // Delete the domain using the domain reference domainOperations.deleteDomain(domain); } }
domain
- the domain.AuthorizationDeniedFault
- authorization denied. The authenticated user is not authorized to call this operation.Domain[] listDomains() throws AuthorizationDeniedFault
AuthorizationDeniedFault
- 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.AccountRef[] listDomainAdministrators(DomainRef domain) throws UnknownDomainFault, AuthorizationDeniedFault
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.UnknownDomainFault
- the domain does not exist.AuthorizationDeniedFault
- authorization denied. The authenticated user is not authorized to call this operation.addDomainAdministrators
void addDomainAdministrators(DomainRef domain, AccountRef[] accounts) throws AccountAlreadyAdministratorFault, UnknownDomainFault, AuthorizationDeniedFault
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.AccountAlreadyAdministratorFault
- one of the provided accounts is already a domain administrator.UnknownDomainFault
- the domain does not exist.AuthorizationDeniedFault
- authorization denied. The authenticated user is not authorized to call this operation.void removeDomainAdministrators(DomainRef domain, AccountRef[] accounts) throws CannotRemoveAdministratorsFault, UnknownDomainFault, AuthorizationDeniedFault
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.CannotRemoveAdministratorsFault
- the administrator accounts cannot be removed, as it would leave the domain with no administrators.UnknownDomainFault
- the domain does not exist.AuthorizationDeniedFault
- authorization denied. The authenticated user is not authorized to call this operation.AccountRef[] listDomainManagers(DomainRef domain) throws UnknownDomainFault, AuthorizationDeniedFault
Domain
managers are the only individuals who can create new Context
instances using createContextFromTemplate
.
addDomainAdministrators
method.domain
- the domain.UnknownDomainFault
- the domain does not exist.AuthorizationDeniedFault
- authorization denied. The authenticated user is not authorized to call this operation.addDomainManagers
void addDomainManagers(DomainRef domain, AccountRef[] accounts) throws AccountAlreadyManagerFault, UnknownDomainFault, AuthorizationDeniedFault
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.AccountAlreadyManagerFault
- one of the provided accounts is already a domain manager (or domain administrator).UnknownDomainFault
- the domain does not exist.AuthorizationDeniedFault
- authorization denied. The authenticated user is not authorized to call this operation.void removeDomainManagers(DomainRef domain, AccountRef[] accounts) throws UnknownDomainFault, AuthorizationDeniedFault
addDomainAdministrators
method.
domain
- the domain.accounts
- the accounts. This parameter is optional, it is valid to pass null or an empty collection.UnknownDomainFault
- the domain does not exist.AuthorizationDeniedFault
- authorization denied. The authenticated user is not authorized to call this operation.Account[] listAccountDetails(AccountRef[] accounts) throws AuthorizationDeniedFault
accounts
- the accounts. This parameter is optional, it is valid to pass null or an empty collection.AuthorizationDeniedFault
- 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.
|
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 |