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 DocumentRightFactory

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


public final class DocumentRightFactory
extends Object

Document Right factory. This class provides methods for creating new instances of DocumentRight objects.


Method Summary
static DocumentRight createDocumentRight(Date assignedTime, Account account, DocumentRole role, Collection<ItemCode> itemCodes, ContextInstance context)
          Create a new right.
static DocumentRight createDocumentRight(DocumentRight right, Collection<ItemCode> itemCodes)
          Copy the right with altered items.
static DocumentRight createDocumentRight(UUID uuid)
          Load an existing document right.
static DocumentRight createDocumentRight(UUID uuid, Date assignedTime, Account account, DocumentRole role, Collection<ItemCode> itemCodes, ContextInstance context)
          Create a new right with a deterministic UUID.

 

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

 

Method Detail

createDocumentRight

public static DocumentRight createDocumentRight(UUID uuid)
                                         throws UnknownDocumentRightException
Load an existing document right. A right can be recreated by providing it's UUID. The properties of the right will then be restored from it's saved state.

Lazy Loading

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

createDocumentRight

public static DocumentRight createDocumentRight(Date assignedTime,
                                                Account account,
                                                DocumentRole role,
                                                Collection<ItemCode> itemCodes,
                                                ContextInstance context)
Create a new right. The default constructor creates a unique right UUID automatically.
Parameters:
assignedTime - the assignment time.
account - the account.
role - the role
itemCodes - item restrictions. This parameter is optional, it is valid to pass null or an empty collection.
context - the context.
Returns:
a new Document Right instance.

createDocumentRight

public static DocumentRight createDocumentRight(UUID uuid,
                                                Date assignedTime,
                                                Account account,
                                                DocumentRole role,
                                                Collection<ItemCode> itemCodes,
                                                ContextInstance context)
Create a new right with a deterministic UUID.
Parameters:
uuid - the right UUID.
assignedTime - the assignment time.
account - the account.
role - the role
itemCodes - item restrictions. This parameter is optional, it is valid to pass null or an empty collection.
context - the context.
Returns:
a new Document Right instance.

createDocumentRight

public static DocumentRight createDocumentRight(DocumentRight right,
                                                Collection<ItemCode> itemCodes)
Copy the right with altered items. This constructor is used by operations that alter a document right's item codes.
Parameters:
right - the right.
itemCodes - item restrictions. This parameter is optional, it is valid to pass null or an empty collection.
Returns:
a new Document Right 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.