wt.org
Class WTPrincipalReference

java.lang.Object
  extended by wt.fc.ObjectReference
      extended by wt.org.WTPrincipalReference
All Implemented Interfaces:
Externalizable, Serializable, NetFactor, ObjectMappable, WTReference, Evolvable

public class WTPrincipalReference
extends ObjectReference
implements Externalizable

Reference to a principal object.

Use the newWTPrincipalReference static factory method(s), not the WTPrincipalReference constructor, to construct instances of this class. Instances must be constructed using the static factory(s), in order to ensure proper initialization of the instance.



Supported API: true

Extendable: false

See Also:
Serialized Form

Method Summary
 String getDisplayName()
          

Supported API: true
 String getIdentity()
          Return the nice string of the referenced object's identity.
 WTPrincipal getPrincipal()
          Returns principal referenced by object.
 String getUniqueDisplayIdentifier()
          The method provides one unique display format of a principal for user: Last Name, First Name (uid: orgname) or Last Name, First Name (email) for external group: Group Name (org name) for internal group: Group Name (team name) for organization: Org Name (orgid)

Supported API: true
protected  void initialize(ObjectIdentifier id)
          Supports initialization, following construction of an instance.
protected  void initialize(String dn, String repository)
          Supports initialization, following construction of an instance.
protected  void initialize(WTPrincipal principal)
          Supports initialization, following construction of an instance.
protected  void initialize(WTPrincipalReference principalReference)
          Supports initialization, following construction of an instance.
static WTPrincipalReference newWTPrincipalReference()
          

Supported API: true
static WTPrincipalReference newWTPrincipalReference(ObjectIdentifier id)
          Constructs a principal out of its database identifier.
static WTPrincipalReference newWTPrincipalReference(String dn, String repository)
          Constructs a principal reference from a directory distinguished name and the name of the directory repository that holds the entry specified by the distinguished name.
static WTPrincipalReference newWTPrincipalReference(WTPrincipal principal)
          Creates reference given a principal.
static WTPrincipalReference newWTPrincipalReference(WTPrincipalReference principalReference)
          Creates reference given a principal reference.
 void refresh()
          Refresh the WTPrincipalReference using the OrganizationService's principal cache.
 String toString()
          Returns string representation of the reference.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

newWTPrincipalReference

public static WTPrincipalReference newWTPrincipalReference()
                                                    throws WTException


Supported API: true

Returns:
WTPrincipalReference
Throws:
WTException

newWTPrincipalReference

public static WTPrincipalReference newWTPrincipalReference(WTPrincipal principal)
                                                    throws WTException
Creates reference given a principal.

Supported API: true

Parameters:
principal -
Returns:
WTPrincipalReference
Throws:
WTException

initialize

protected void initialize(WTPrincipal principal)
                   throws WTException
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.

Supported API: true

Parameters:
principal -
Throws:
WTException

newWTPrincipalReference

public static WTPrincipalReference newWTPrincipalReference(WTPrincipalReference principalReference)
                                                    throws WTException
Creates reference given a principal reference.

Supported API: true

Parameters:
principalReference -
Returns:
WTPrincipalReference
Throws:
WTException

initialize

protected void initialize(WTPrincipalReference principalReference)
                   throws WTException
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.

Supported API: true

Parameters:
principalReference -
Throws:
WTException

newWTPrincipalReference

public static WTPrincipalReference newWTPrincipalReference(ObjectIdentifier id)
                                                    throws WTException
Constructs a principal out of its database identifier. Used by externalizable classes to store the reference persistently in the most compact way possible.

Supported API: true

Parameters:
id -
Returns:
WTPrincipalReference
Throws:
WTException

initialize

protected void initialize(ObjectIdentifier id)
                   throws WTException
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.

Supported API: true

Parameters:
id -
Throws:
WTException

newWTPrincipalReference

public static WTPrincipalReference newWTPrincipalReference(String dn,
                                                           String repository)
                                                    throws WTException
Constructs a principal reference from a directory distinguished name and the name of the directory repository that holds the entry specified by the distinguished name.

Supported API: true

Parameters:
dn -
repository -
Returns:
WTPrincipalReference
Throws:
WTException

initialize

protected void initialize(String dn,
                          String repository)
                   throws WTException
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.

Supported API: true

Parameters:
dn -
repository -
Throws:
WTException

getDisplayName

public String getDisplayName()
                      throws WTException


Supported API: true

Returns:
String
Throws:
WTException

getPrincipal

public WTPrincipal getPrincipal()
                         throws WTException
Returns principal referenced by object.

Supported API: true

Returns:
WTPrincipal
Throws:
WTException

getIdentity

public String getIdentity()
Return the nice string of the referenced object's identity.

Supported API: true

Returns:
String

refresh

public void refresh()
             throws WTException
Refresh the WTPrincipalReference using the OrganizationService's principal cache.

Supported API: true

Throws:
WTException

toString

public String toString()
Returns string representation of the reference.

Supported API: true

Returns:
String

getUniqueDisplayIdentifier

public String getUniqueDisplayIdentifier()
                                  throws WTException
The method provides one unique display format of a principal for user: Last Name, First Name (uid: orgname) or Last Name, First Name (email) for external group: Group Name (org name) for internal group: Group Name (team name) for organization: Org Name (orgid)

Supported API: true

Returns:
String
Throws:
WTException