Skip navigation links

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

E12907-03


oracle.irm.engine.core.account
Class AccountFactory

java.lang.Object
  extended by oracle.irm.engine.core.account.AccountFactory


public final class AccountFactory
extends Object

Account factory. This class provides methods for creating new instances of Account objects.


Method Summary
static Account createAccount(String uuid)
          Create an account from an UUID.
static Account createAccount(String uuid, String name, Account.Type type)
          Create an account by specifying all the user or group details.

 

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

 

Method Detail

createAccount

public static Account createAccount(String uuid)
                             throws UnknownAccountException
Create an account from an UUID. Takes the UUID for an account and creates an Account that represents the user or group. The properties of the account (such as Name) will then be retrievable.

Lazy Loading

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

createAccount

public static Account createAccount(String uuid,
                                    String name,
                                    Account.Type type)
Create an account by specifying all the user or group details. Takes the UUID for an account and creates an Account that represents the user or group. The properties of the account (such as Name) are set from the provided parameters. There is no attempt made to see if this account exists in the external user store so the values provided must correspond to the details in the external user store.
Parameters:
uuid - the account UUID.
name - the account name.
type - the account type.
Returns:
a new Account instance.

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.