|
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 ContextTemplateOperationsEndpoint
Web Service end point interface for Context Template Operations. Template operations include template management methods, such as listing or creating templates. Also included are the operations that allow new Context
classifications to be created from those templates.
The WSDL for this end point interface can be downloaded from the server using the following URL:
http://irm.example.com/irm_services/context_template_operations?wsdl
Requests for this web service should be sent to the following URL:
https://irm.example.com/irm_services/context_template_operations
Method Summary | |
---|---|
ContextTemplate |
copyContextTemplate(DomainRef domain, ContextTemplateRef template) Copy a context template. |
void |
deleteContextTemplates(ContextTemplateRef[] templates) Delete a set of context template. |
ContextTemplate[] |
listActiveTemplates(DomainRef domain) List active templates. |
ContextTemplate[] |
listTemplates(DomainRef domain) List templates. |
ContextTemplate |
saveChangesToContextTemplate(ContextTemplate template, ContextTemplate delta) Save changes to a context template. |
ContextTemplate |
saveNewContextTemplate(DomainRef domain, ContextTemplate template) Save a new context template. |
Method Detail |
---|
ContextTemplate[] listTemplates(DomainRef domain) throws UnknownDomainFault, AuthorizationDeniedFault
addDomainAdministrators
method. This method can be invoked by users that have the Domain Manager role in the related domain. This role can be assigned using the addDomainManagers
method.domain
- the domain.UnknownDomainFault
- the domain does not exist.AuthorizationDeniedFault
- authorization denied. The authenticated user is not authorized to call this operation.ContextTemplate[] listActiveTemplates(DomainRef domain) throws UnknownDomainFault, AuthorizationDeniedFault
addDomainAdministrators
method. This method can be invoked by users that have the Domain Manager role in the related domain. This role can be assigned using the addDomainManagers
method.domain
- the domain.UnknownDomainFault
- the domain does not exist.AuthorizationDeniedFault
- authorization denied. The authenticated user is not authorized to call this operation.ContextTemplate saveNewContextTemplate(DomainRef domain, ContextTemplate template) throws ContextTemplateAlreadyExistsFault, InvalidDocumentRoleFault, UnknownDocumentRoleFault, UnknownDomainFault, AuthorizationDeniedFault
Domain
.
addDomainAdministrators
method.
import static oracle.irm.j2ee.jws.rights.context.ContextTemplateOperations.getContextTemplateOperationsEndpoint; 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.ContextTemplate; import oracle.irm.engine.types.rights.context.DocumentRoleRef; import oracle.irm.engine.types.rights.context.DomainRef; import oracle.irm.j2ee.jws.rights.context.ContextTemplateOperationsEndpoint; public class SaveNewContextTemplateWS { 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()); } }); // Context Template UUID is fixed for sample code UUID contextTemplateUUID = UUID.fromString("930876e6-a505-4a10-8d93-bc43d9a37c23"); ContextTemplate template = new ContextTemplate(); // The UUID value that identifies this role within the domain template.setUuid(contextTemplateUUID); // Context Template has one English label Label label = new Label(Locale.ENGLISH, "Sample Template", "This is a template created from sample code."); // The human readable labels template.setLabels( new Label[] { label } ); // The template is active template.setStatus(ContextTemplate.Status.ACTIVE); // Domain UUID is fixed for sample code UUID domainUUID = UUID.fromString("6fab93fd-2858-461a-a0b3-34e261dbf8fd"); DomainRef domain = new DomainRef(domainUUID); // Document Role UUID is fixed for sample code UUID documentRoleUUID = UUID.fromString("ee82c3f9-152b-440d-afd7-dbf36b0c8188"); DocumentRoleRef documentRole = new DocumentRoleRef(documentRoleUUID, domain); // Template has one role template.setRoles( new DocumentRoleRef[] { documentRole }); // Get the context template operations web service ContextTemplateOperationsEndpoint templateOperations = getContextTemplateOperationsEndpoint(hostPort); // Save the new template templateOperations.saveNewContextTemplate(domain, template); } }
domain
- the domain.template
- the template.ContextTemplateAlreadyExistsFault
- a context template already exists with the same Id within the specified domain.InvalidDocumentRoleFault
- invalid role. One of the roles added to this template does not exist.UnknownDocumentRoleFault
- unknown role. One of the roles associated with this template belongs to a different domain.UnknownDomainFault
- the domain does not exist.AuthorizationDeniedFault
- authorization denied. The authenticated user is not authorized to call this operation.ContextTemplate saveChangesToContextTemplate(ContextTemplate template, ContextTemplate delta) throws CannotRemoveDocumentRoleFault, InvalidDocumentRoleFault, UnknownDocumentRoleFault, UnknownContextTemplateFault, AuthorizationDeniedFault
ContextTemplate
by providing two copies. Changes are made by comparing the two copies of the template. 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 DocumentRole
as compared to the template then a new role will be associated with the template.Roles
will be immediately visible in any ContextInstance
linked to this template. If a role is removed from a template, any accounts assigned to the role will be automatically un-assigned (for contexts linked to this template).
addDomainAdministrators
method.
template
- the context template to compare to the delta.delta
- the changes. The Domain
and Uuid
properties must match with the template parameter.CannotRemoveDocumentRoleFault
- the role cannot be removed from the template as it is in use. A document role cannot be remove if there are any contexts assignments using the role. The document role can only be removed from the template after the associated rights have been unassigned from all contexts based on the template.InvalidDocumentRoleFault
- invalid role. One of the roles added to this template does not exist.UnknownDocumentRoleFault
- unknown role. One of the roles associated with this template belongs to a different domain.UnknownContextTemplateFault
- the context template does not exist.AuthorizationDeniedFault
- authorization denied. The authenticated user is not authorized to call this operation.void deleteContextTemplates(ContextTemplateRef[] templates) throws CannotRemoveContextTemplateFault, AuthorizationDeniedFault
addDomainAdministrators
method.
templates
- the set of template. This parameter is optional, it is valid to pass null or an empty collection.CannotRemoveContextTemplateFault
- the template cannot be removed as it is in use. A context template cannot be deleted if there are any contexts linked to the template. The context template can only be deleted after the contexts are deleted.AuthorizationDeniedFault
- authorization denied. The authenticated user is not authorized to call this operation.ContextTemplate copyContextTemplate(DomainRef domain, ContextTemplateRef template) throws UnknownDomainFault, UnknownContextTemplateFault, AuthorizationDeniedFault
Domain
. Copied templates are set with an inactive status. The template Labels
are also copied and altered to reflect that the result is a copy of the template. For example, in English, the template Standard would turn into Copy Of Standard.
addDomainAdministrators
method.
domain
- the domain.template
- the template.UnknownDomainFault
- the domain does not exist.UnknownContextTemplateFault
- the context template does not exist.AuthorizationDeniedFault
- 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 |