Skip navigation links

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

E12907-03


oracle.irm.engine.rights.context
Class ContextTemplateFactory

java.lang.Object
  extended by oracle.irm.engine.rights.context.ContextTemplateFactory


public final class ContextTemplateFactory
extends Object

Context Template factory. This class provides methods for creating new instances of ContextTemplate objects.


Method Summary
static ContextTemplate createContextTemplate(UUID uuid, Collection<Label> labels, ContextTemplate.Status status, Collection<DocumentRole> roles, Domain domain)
          Create a template.
static ContextTemplate createContextTemplate(UUID uuid, Domain domain)
          Recreate an existing template.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Method Detail

createContextTemplate

public static ContextTemplate createContextTemplate(UUID uuid,
                                                    Domain domain)
                                             throws UnknownContextTemplateException
Recreate an existing template. This constructor loads the context template from persistent storage.

Lazy Loading

A lazy loading algorithm is employed when creating Context Template objects using this method. The Context Template object will load it's state if a property not provided on construction is accessed. This algorithm is thread safe so it is safe to allow multiple threads to access this lazy loaded object. The following properties are provided on construction and can be accessed without lazy loading being triggered:

Accessing any other properties will cause the object's state to be loaded automatically.
Parameters:
uuid - the UUID of the template.
domain - the domain that owns this template.
Returns:
a new Context Template instance.
Throws:
UnknownContextTemplateException - the context template does not exist. When a context template is created, the implementation may immediately check whether the context template exists or delay this until the other properties on the context template are accessed. An assumption should not be made that this constructor will throw this exception if the context template does not exist.

createContextTemplate

public static ContextTemplate createContextTemplate(UUID uuid,
                                                    Collection<Label> labels,
                                                    ContextTemplate.Status status,
                                                    Collection<DocumentRole> roles,
                                                    Domain domain)
Create a template. This method can be used to either create a new context template or recreate a template that already exists. When creating a new template the domain parameter should have a null value.
Parameters:
uuid - the UUID of the template.
labels - template labels. This parameter is optional, it is valid to pass null or an empty collection.
status - template status.
roles - document roles. This parameter is optional, it is valid to pass null or an empty collection.
domain - the domain that owns this template. This parameter is optional, it is valid to pass null.
Returns:
a new Context Template instance.
See Also:
saveNewContextTemplate, saveChangesToContextTemplate

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.