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 DocumentRoleFactory

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


public final class DocumentRoleFactory
extends Object

Document Role factory. This class provides methods for creating new instances of DocumentRole objects.


Method Summary
static DocumentRole createDocumentRole(UUID uuid, Collection<Label> labels, LicenseCriteria.Storage storage, Collection<Feature> features, Collection<TimeSpan> timeSpans, TimePeriod refreshPeriod, ItemConstraints.Type itemConstraints, DocumentRole.ExportConstraints exportConstraints, Domain domain)
          Create a role.
static DocumentRole createDocumentRole(UUID uuid, Domain domain)
          Recreate an existing role.

 

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

 

Method Detail

createDocumentRole

public static DocumentRole createDocumentRole(UUID uuid,
                                              Domain domain)
                                       throws UnknownDocumentRoleException
Recreate an existing role. This constructor loads the document role from persistent storage.

Lazy Loading

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

createDocumentRole

public static DocumentRole createDocumentRole(UUID uuid,
                                              Collection<Label> labels,
                                              LicenseCriteria.Storage storage,
                                              Collection<Feature> features,
                                              Collection<TimeSpan> timeSpans,
                                              TimePeriod refreshPeriod,
                                              ItemConstraints.Type itemConstraints,
                                              DocumentRole.ExportConstraints exportConstraints,
                                              Domain domain)
Create a role. This method can be used to either create a new role or recreate a role that already exists. When creating a new role the domain parameter should have a null value.
Parameters:
uuid - the document role UUID.
labels - the role's labels. This parameter is optional, it is valid to pass null or an empty collection.
storage - storage specifier.
features - the valid features. This parameter is optional, it is valid to pass null or an empty collection.
timeSpans - time constraints. This parameter is optional, it is valid to pass null or an empty collection.
refreshPeriod - the refresh period. This parameter is optional, it is valid to pass null.
itemConstraints - item constraints.
exportConstraints - item constraints.
domain - the domain that owns this role. This parameter is optional, it is valid to pass null.
Returns:
a new Document Role instance.
See Also:
saveNewRole, saveChangesToRole

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.