Skip navigation links

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

E12907-01


oracle.irm.engine.core.account
Interface Account


public interface Account

A user or group identifier. An account is the information required to identity a user or group stored in an external user store - such as LDAP. The data identifying a user or group is a UUID or GUID value. When internal operations ask for user or group related data (such as looking up licenses for a user) the user or group is identified by this UUID value.

When referencing a user or group providing a UUID or GUID value in the format used by the user store can be problematic as the UUID or GUID value is not always easy to obtain. Referencing a user or group is made easier by the following alternative mechanisms.

User Name. To identify a user by name provide a URN in the format urn:user:name where name is the user name. This format requires the user name to be URL encoded. e.g. for user bob smith the URN would be urn:user:bob%20smith.

Group Name. To identify a group by name provide a URN in the format urn:group:name where name is the group name. This format requires the group name to be URL encoded. e.g. for group board of directors the URN would be urn:group:board%20of%20directors.

UUID. To identify the user by UUID provide the raw uuid value as used by the user store. e.g. 4687dcb0-8b6e-4bc8-b65c-a8845c7e1e00.

Creation

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

Account object = createAccount(uuid);
Account object = createAccount(
    uuid,
    name,
    type);

Collections

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

 Collection<Account> object = createAccounts();

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

XML Serialization

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

<?xml version="1.0" encoding="UTF-8"?>
<core:Account xmlns:core="http://xmlns.oracle.com/irm/core">
    <uuid>17f45d8d-d5c9-4970-8808-daa0fc893c33</uuid>
    <type>USER</type>
    <name>John Smith</name>
</core:Account>

Account instances can also be serialized by reference. A reference contains all the information needed to uniquely identify a Account 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"?>
<core:AccountRef xmlns:core="http://xmlns.oracle.com/irm/core">
    <uuid>17f45d8d-d5c9-4970-8808-daa0fc893c33</uuid>
</core:AccountRef>


Nested Class Summary
static class Account.Type
          The type of account.

 

Method Summary
 String getName()
          The user or group name.
 Account.Type getType()
          The type of account.
 String getUuid()
          The user or group UUID.

 

Method Detail

getUuid

String getUuid()
The user or group UUID. The account UUID is used to uniquely identify the account regardless of whether the user or group name is altered. This value may or may not be in the standard UUID format 00000000-0000-0000-0000-000000000000 depending on the type of user store used.

Collections

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

getName

String getName()
The user or group name. For users this name will be the user name used for authentication.
Returns:
the value of the property. This method will never return null.

getType

Account.Type getType()
The type of account. Whether this account represents a user or group.
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-01


Copyright © 2010, Oracle. All rights reserved.