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 ContextInstanceFactory

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


public final class ContextInstanceFactory
extends Object

Context Instance factory. This class provides methods for creating new instances of ContextInstance objects.


Method Summary
static ContextInstance createContextInstance(UUID uuid)
          Recreate a context instance.
static ContextInstance createContextInstance(UUID uuid, Collection<Label> labels, Collection<ItemCode> items, Collection<ContextInstance> trustedContexts, ContextInstance.Visibility visibility, Collection<KeySet> keySets, ContextTemplate template)
          Create a context instance.
static ContextInstance createContextInstance(UUID uuid, Collection<Label> labels, Collection<ItemCode> items, Collection<ContextInstance> trustedContexts, ContextInstance.Visibility visibility, ContextTemplate template)
          Create a context instance.

 

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

 

Method Detail

createContextInstance

public static ContextInstance createContextInstance(UUID uuid)
                                             throws UnknownContextException
Recreate a context instance. This constructor loads the context instance state from persistent storage.

Lazy Loading

A lazy loading algorithm is employed when creating Context Instance objects using this method. The Context Instance 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 for the context.
Returns:
a new Context Instance instance.
Throws:
UnknownContextException - the context does not exist. When a context is created, the implementation may immediately check whether the context exists or delay this until the other properties on the context are accessed. An assumption should not be made that this constructor will throw this exception if the context does not exist.

createContextInstance

public static ContextInstance createContextInstance(UUID uuid,
                                                    Collection<Label> labels,
                                                    Collection<ItemCode> items,
                                                    Collection<ContextInstance> trustedContexts,
                                                    ContextInstance.Visibility visibility,
                                                    ContextTemplate template)
Create a context instance. This method creates a context instance object with the specified property values. This constructor does not set the key sets property of the context.
Parameters:
uuid - the UUID for the context.
labels - labels. This parameter is optional, it is valid to pass null or an empty collection.
items - item exclusions. This parameter is optional, it is valid to pass null or an empty collection.
trustedContexts - trusted contexts. This parameter is optional, it is valid to pass null or an empty collection.
visibility - inspector visibility.
template - owning template.
Returns:
a new Context Instance instance.

createContextInstance

public static ContextInstance createContextInstance(UUID uuid,
                                                    Collection<Label> labels,
                                                    Collection<ItemCode> items,
                                                    Collection<ContextInstance> trustedContexts,
                                                    ContextInstance.Visibility visibility,
                                                    Collection<KeySet> keySets,
                                                    ContextTemplate template)
Create a context instance. This method creates a context instance object with the specified property values.
Parameters:
uuid - the UUID for the context.
labels - labels. This parameter is optional, it is valid to pass null or an empty collection.
items - item exclusions. This parameter is optional, it is valid to pass null or an empty collection.
trustedContexts - trusted contexts. This parameter is optional, it is valid to pass null or an empty collection.
visibility - inspector visibility.
keySets - associated key sets. This parameter is optional, it is valid to pass null or an empty collection.
template - owning template.
Returns:
a new Context Instance instance.

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.