Skip navigation links

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

E12907-03


oracle.irm.engine.types.rights.context
Class DocumentRole

java.lang.Object
  extended by oracle.irm.engine.types.rights.context.DocumentRole

All Implemented Interfaces:
Serializable

public class DocumentRole
extends Object
implements Serializable

Document Role type. A document role defines what features of the IRM Desktop a user can perform. It includes details such as what features are audited, the elapsed time a document can be used off-line, item constraints and time constraints.

XML Serialization

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

<?xml version="1.0" encoding="UTF-8"?>
<rights:DocumentRole xmlns:rights="http://xmlns.oracle.com/irm/rights" xmlns:core="http://xmlns.oracle.com/irm/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <uuid>c70e0920-a957-47e2-b045-7210acd758ee</uuid>
    <labels>
        <locale>en</locale>
        <name>Reader</name>
    </labels>
    <storage>PERSISTENT</storage>
    <features>
        <id>oracle.irm.generic.Open</id>
        <use>IMMEDIATE</use>
        <record>true</record>
    </features>
    <timeSpans xsi:type="core:AbsoluteTimeSpan">
        <referencePoint>CURRENT</referencePoint>
        <startTime>2007-05-10T12:00:00.000+01:00</startTime>
        <stopTime>2008-05-10T12:00:00.000+01:00</stopTime>
    </timeSpans>
    <refreshPeriod>
        <amount>2</amount>
        <units>HOURS</units>
    </refreshPeriod>
    <itemConstraints>EXCLUSIONS</itemConstraints>
    <exportConstraints>NONE</exportConstraints>
    <domain>
        <uuid>97bdf4f1-1375-4b28-9520-17a23503462f</uuid>
    </domain>
</rights:DocumentRole>

Document Role instances can also be serialized by reference. A reference contains all the information needed to uniquely identify a Document Role 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:DocumentRoleRef xmlns:rights="http://xmlns.oracle.com/irm/rights">
    <uuid>c70e0920-a957-47e2-b045-7210acd758ee</uuid>
    <domain>
        <uuid>97bdf4f1-1375-4b28-9520-17a23503462f</uuid>
    </domain>
</rights:DocumentRoleRef>

See Also:
Serialized Form

Nested Class Summary
static class DocumentRole.ExportConstraints
          Export Constraints enumeration.
static class DocumentRole.TimeConstraints
          Time Constraints enumeration.

 

Constructor Summary
DocumentRole()
          No argument constructor.
DocumentRole(UUID uuid, Label[] labels, LicenseCriteria.Storage storage, Feature[] features, TimeSpan[] timeSpans, TimePeriod refreshPeriod, ItemConstraints.Type itemConstraints, DocumentRole.ExportConstraints exportConstraints, DomainRef domain)
          Constructor.

 

Method Summary
 DomainRef getDomain()
          The domain that owns this role.
 DocumentRole.ExportConstraints getExportConstraints()
          Set the export constraints on a role.
 Feature[] getFeatures()
          The valid features.
 ItemConstraints.Type getItemConstraints()
          Item constraints.
 Label[] getLabels()
          Role labels.
 TimePeriod getRefreshPeriod()
          The refresh period.
 LicenseCriteria.Storage getStorage()
          Storage specifier.
 TimeSpan[] getTimeSpans()
          Time constraints.
 UUID getUuid()
          Role UUID.
 void setDomain(DomainRef value)
          The domain that owns this role.
 void setExportConstraints(DocumentRole.ExportConstraints value)
          Set the export constraints on a role.
 void setFeatures(Feature[] value)
          The valid features.
 void setItemConstraints(ItemConstraints.Type value)
          Item constraints.
 void setLabels(Label[] value)
          Role labels.
 void setRefreshPeriod(TimePeriod value)
          The refresh period.
 void setStorage(LicenseCriteria.Storage value)
          Storage specifier.
 void setTimeSpans(TimeSpan[] value)
          Time constraints.
 void setUuid(UUID value)
          Role UUID.

 

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

 

Constructor Detail

DocumentRole

public DocumentRole()
No argument constructor.

DocumentRole

public DocumentRole(UUID uuid,
                    Label[] labels,
                    LicenseCriteria.Storage storage,
                    Feature[] features,
                    TimeSpan[] timeSpans,
                    TimePeriod refreshPeriod,
                    ItemConstraints.Type itemConstraints,
                    DocumentRole.ExportConstraints exportConstraints,
                    DomainRef domain)
Constructor.

Method Detail

getUuid

public UUID getUuid()
Role UUID.
Returns:
the value of the property.

setUuid

public void setUuid(UUID value)
Role UUID.
Parameters:
value - the new value for the property.

getLabels

public Label[] getLabels()
Role labels. A set of names and descriptions for the role.
Returns:
the value of the property.

setLabels

public void setLabels(Label[] value)
Role labels. A set of names and descriptions for the role.
Parameters:
value - the new value for the property.

getStorage

public LicenseCriteria.Storage getStorage()
Storage specifier. Whether this role allows off-line working (persistent storage) or not.
Returns:
the value of the property.

setStorage

public void setStorage(LicenseCriteria.Storage value)
Storage specifier. Whether this role allows off-line working (persistent storage) or not.
Parameters:
value - the new value for the property.

getFeatures

public Feature[] getFeatures()
The valid features. The list of features this role allows.
Returns:
the value of the property.

setFeatures

public void setFeatures(Feature[] value)
The valid features. The list of features this role allows.
Parameters:
value - the new value for the property.

getTimeSpans

public TimeSpan[] getTimeSpans()
Time constraints.
Returns:
the value of the property.

setTimeSpans

public void setTimeSpans(TimeSpan[] value)
Time constraints.
Parameters:
value - the new value for the property.

getRefreshPeriod

public TimePeriod getRefreshPeriod()
The refresh period. How long this role can be used before the server must be re-contacted.
Returns:
the value of the property.

setRefreshPeriod

public void setRefreshPeriod(TimePeriod value)
The refresh period. How long this role can be used before the server must be re-contacted.
Parameters:
value - the new value for the property.

getItemConstraints

public ItemConstraints.Type getItemConstraints()
Item constraints. The type of item constraints that can be applied to rights assigned from this role.
Returns:
the value of the property.

setItemConstraints

public void setItemConstraints(ItemConstraints.Type value)
Item constraints. The type of item constraints that can be applied to rights assigned from this role.
Parameters:
value - the new value for the property.

getExportConstraints

public DocumentRole.ExportConstraints getExportConstraints()
Set the export constraints on a role. Export constraints control how sealed content can be resealed to other classifications, or copied between sealed content. Altering the export constraints of a document role automatically adds (or removes) the appropriate Feature definitions to the role that infer those export constraints. This methods is provided as an alternative way to adding or removing features manually to/from the document role.
Returns:
the value of the property.

setExportConstraints

public void setExportConstraints(DocumentRole.ExportConstraints value)
Set the export constraints on a role. Export constraints control how sealed content can be resealed to other classifications, or copied between sealed content. Altering the export constraints of a document role automatically adds (or removes) the appropriate Feature definitions to the role that infer those export constraints. This methods is provided as an alternative way to adding or removing features manually to/from the document role.
Parameters:
value - the new value for the property.

getDomain

public DomainRef getDomain()
The domain that owns this role. Document roles must have an unique Uuid within a domain.
Returns:
the value of the property.

setDomain

public void setDomain(DomainRef value)
The domain that owns this role. Document roles must have an unique Uuid within a domain.
Parameters:
value - the new value for the property.

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.