Skip navigation links

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

E12907-03


oracle.irm.engine.types.core.account
Class Account

java.lang.Object
  extended by oracle.irm.engine.types.core.account.Account

All Implemented Interfaces:
Serializable

public class Account
extends Object
implements Serializable

Account type. 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.

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>

See Also:
Serialized Form

Nested Class Summary
static class Account.Type
          Type enumeration.

 

Constructor Summary
Account()
          No argument constructor.
Account(String uuid, String name, Account.Type type)
          Constructor.

 

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

 

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

 

Constructor Detail

Account

public Account()
No argument constructor.

Account

public Account(String uuid,
               String name,
               Account.Type type)
Constructor.

Method Detail

getUuid

public 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.
Returns:
the value of the property.

setUuid

public void setUuid(String value)
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.
Parameters:
value - the new value for the property.

getName

public 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.

setName

public void setName(String value)
The user or group name. For users this name will be the user name used for authentication.
Parameters:
value - the new value for the property.

getType

public Account.Type getType()
The type of account. Whether this account represents a user or group.
Returns:
the value of the property.

setType

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