Skip navigation links

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

E12907-03


oracle.irm.engine.rights.context
Interface DocumentRight


public interface DocumentRight

Context classified document rights. A right is the outcome of assigning a DocumentRole to an Account. A right can also specify item restrictions specific to the account. To hinder attempts at password sharing, document role based rights that are served to the device and cannot be used until the rights are checked back in from the device (or the offline period expires).

Creation

Instances of Document Right objects can be created using the following factory style method(s).

DocumentRight object = createDocumentRight(uuid);
DocumentRight object = createDocumentRight(
    assignedTime,
    account,
    role,
    itemCodes,
    context);
DocumentRight object = createDocumentRight(
    uuid,
    assignedTime,
    account,
    role,
    itemCodes,
    context);
DocumentRight object = createDocumentRight(
    right,
    itemCodes);

Collections

Collections for DocumentRight objects can be created using the following factory method. This method creates the most appropriate collection implementation class for storing DocumentRight elements.

 Collection<DocumentRight> object = createDocumentRights();

Consult the Uuid property for more information on how this property can relate to DocumentRight collections.

XML Serialization

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

<?xml version="1.0" encoding="UTF-8"?>
<rights:DocumentRight xmlns:core="http://xmlns.oracle.com/irm/core" xmlns:rights="http://xmlns.oracle.com/irm/rights" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <uuid>926e901b-c4b8-41a7-9c28-5ce43007529</uuid>
    <account>
        <uuid>17f45d8d-d5c9-4970-8808-daa0fc893c33</uuid>
    </account>
    <role xsi:type="rights:DocumentRole">
        <uuid>c70e0920-a957-47e2-b045-7210acd758ee</uuid>
        <labels>
            <locale>en</locale>
            <name>Editor</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+00:00</startTime>
            <stopTime>2008-05-10T12:00:00.000+00:00</stopTime>
        </timeSpans>
        <itemConstraints>EXCLUSIONS</itemConstraints>
        <exportConstraints>NONE</exportConstraints>
        <refreshPeriod>
            <amount>2</amount>
            <units>HOURS</units>
        </refreshPeriod>
        <domain>
            <uuid>97bdf4f1-1375-4b28-9520-17a23503462f</uuid>
        </domain>
    </role>
    <assignedTime>2007-05-11T11:47:00.000+01:00</assignedTime>
    <itemCodes>
        <value>test.sxls</value>
    </itemCodes>
    <context>
        <uuid>97bdf4f1-1375-4b28-9520-17a23503462f</uuid>
    </context>
</rights:DocumentRight>

Document Right instances can also be serialized by reference. A reference contains all the information needed to uniquely identify a Document Right 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:DocumentRightRef xmlns:rights="http://xmlns.oracle.com/irm/rights">
    <uuid>926e901b-c4b8-41a7-9c28-5ce43007529</uuid>
</rights:DocumentRightRef>


Method Summary
 Account getAccount()
          The account.
 Date getAssignedTime()
          Role assignment time.
 ContextInstance getContext()
          The related context.
 Collection<ItemCode> getItemCodes()
          Item restrictions.
 DocumentRole getRole()
          The role.
 UUID getUuid()
          Globally unique right Id.

 

Method Detail

getUuid

UUID getUuid()
Globally unique right Id. The UUID for a right can be used to uniquely identify the right. This UUID is allocated when a role is assigned to an account.

Collections

This property value can be used to retrieve the object from a collection using getDocumentRightByUuid.
Returns:
the value of the property. This method will never return null.

getAccount

Account getAccount()
The account. The account that has been assigned the DocumentRole.
Returns:
the value of the property. This method will never return null.

getRole

DocumentRole getRole()
The role. The role assigned to the Account.
Returns:
the value of the property. This method will never return null.

getAssignedTime

Date getAssignedTime()
Role assignment time. When the role was assigned to the account.

State

The date returned by this method can be safely altered without affecting the internal state of the object.
Returns:
the value of the property. This method will never return null.

getItemCodes

Collection<ItemCode> getItemCodes()
Item restrictions. Depending on what item restrictions the DocumentRole defines, this is the list of allowed or disallowed items.

State

The collection returned by this method is an unmodifiable view on the internal collection state of the object.
Returns:
the value of the property. If this collection is empty this method returns an empty collection rather than returning null.

getContext

ContextInstance getContext()
The related context. A role is assigned for use with a particular Context and only applies to documents classified against that Context.
Returns:
the value of the property. This method will never return null.

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.