Skip navigation links

Oracle® Information Rights Management Server Java API Reference
11g Release 1 (11.1.1)

E12907-03


oracle.irm.engine.rights.context
Interface ContextTemplate


public interface ContextTemplate

Context template. A context template provides a template structure for creating a ContextInstance. The template supplies the default labels for a context and the list of DocumentRole definitions available to the context manager. A ContextInstance has a permanent link back to the context template. If changes are made to the roles in the template, they immediately take effect in the context. This allows new role definitions that are added to the template to immediately be available for use in the context.

Creation

Instances of Context Template objects can be created using the following factory style method(s).

ContextTemplate object = createContextTemplate(
    uuid,
    domain);
ContextTemplate object = createContextTemplate(
    uuid,
    labels,
    status,
    roles,
    domain);

Collections

Collections for ContextTemplate objects can be created using the following factory method. This method creates the most appropriate collection implementation class for storing ContextTemplate elements.

 Collection<ContextTemplate> object = createContextTemplates();

Consult the Uuid property for more information on how this property can relate to ContextTemplate collections.

XML Serialization

Context Template instances can be serialized as an XML document. This XML document can also be used to recreate a Context Template object. The following XML document shows an example Context Template in XML form.

<?xml version="1.0" encoding="UTF-8"?>
<rights:ContextTemplate xmlns:rights="http://xmlns.oracle.com/irm/rights">
    <uuid>6c58fdc2-80fd-4d3a-9394-74fe873ed705</uuid>
    <labels>
        <locale>en</locale>
        <name>Standard Template</name>
        <description>This is the standard template</description>
    </labels>
    <status>ACTIVE</status>
    <roles>
        <uuid>c70e0920-a957-47e2-b045-7210acd758ee</uuid>
        <domain>
            <uuid>97bdf4f1-1375-4b28-9520-17a23503462f</uuid>
        </domain>
    </roles>
    <domain>
        <uuid>97bdf4f1-1375-4b28-9520-17a23503462f</uuid>
    </domain>
</rights:ContextTemplate>

Context Template instances can also be serialized by reference. A reference contains all the information needed to uniquely identify a Context Template without needing to serialize the complete object. The reference form of the XML document can be seen below.

<?xml version="1.0" encoding="UTF-8"?>
<rights:ContextTemplateRef xmlns:rights="http://xmlns.oracle.com/irm/rights">
    <uuid>6c58fdc2-80fd-4d3a-9394-74fe873ed705</uuid>
    <domain>
        <uuid>97bdf4f1-1375-4b28-9520-17a23503462f</uuid>
    </domain>
</rights:ContextTemplateRef>


Nested Class Summary
static class ContextTemplate.Status
          Status of the template.

 

Method Summary
 Domain getDomain()
          The domain that owns this context template.
 Collection<Label> getLabels()
          Template labels.
 Collection<DocumentRole> getRoles()
          Document roles.
 ContextTemplate.Status getStatus()
          Template status.
 UUID getUuid()
          An UUID for the template.

 

Method Detail

getUuid

UUID getUuid()
An UUID for the template.

Collections

This property value can be used to retrieve the object from a collection using getContextTemplateByUuid.
Returns:
the value of the property. This method will never return null.

getLabels

Collection<Label> getLabels()
Template labels. The labels provide a default set of names and descriptions for a Context created from this template.

State

The collection returned by this method is an unmodifiable view on the internal collection state of the object.
Returns:
the value of the property. If this collection is empty this method returns an empty collection rather than returning null.

getStatus

ContextTemplate.Status getStatus()
Template status. The default value is for a template to be in-active.
Returns:
the value of the property. This method will never return null.

getRoles

Collection<DocumentRole> getRoles()
Document roles. The set of document roles that can be assign to account.

State

The collection returned by this method is an unmodifiable view on the internal collection state of the object.
Returns:
the value of the property. If this collection is empty this method returns an empty collection rather than returning null.

getDomain

Domain getDomain()
The domain that owns this context template.
Returns:
the value of the property. This method can return null.

Skip navigation links

Oracle® Information Rights Management Server Java API Reference
11g Release 1 (11.1.1)

E12907-03


Copyright © 2011, Oracle. All rights reserved.