Package wt.org
Class WTPrincipalReference
java.lang.Object
wt.fc._ObjectReference
wt.fc.ObjectReference
wt.org._WTPrincipalReference
wt.org.WTPrincipalReference
- All Implemented Interfaces:
Externalizable,Serializable,wt.fc._NetFactor,wt.fc._ObjectMappable,_WTReference,NetFactor,ObjectMappable,WTReference,Evolvable
@GenAsObjectMappable(superClass=ObjectReference.class,versions=6273535935738757412L,properties={@GeneratedProperty(name="EMail",type=java.lang.String.class,javaDoc="Non-persistent attribute that is filled in by the inflate in the query results thru the cached object.",accessors=@PropertyAccessors(setAccess=PRIVATE),columnProperties=@ColumnProperties(persistent=false)),@GeneratedProperty(name="name",type=java.lang.String.class,javaDoc="Non-persistent attribute that is filled in by the inflate in the query results thru the cached object.",accessors=@PropertyAccessors(setAccess=PRIVATE),columnProperties=@ColumnProperties(persistent=false)),@GeneratedProperty(name="fullName",type=java.lang.String.class,javaDoc="Non-persistent attribute that is filled in by the inflate in the query results thru the cached object.",accessors=@PropertyAccessors(setAccess=PRIVATE),columnProperties=@ColumnProperties(persistent=false)),@GeneratedProperty(name="disabled",type=boolean.class,initialValue="false",accessors=@PropertyAccessors(setAccess=PRIVATE),columnProperties=@ColumnProperties(persistent=false)),@GeneratedProperty(name="dn",type=java.lang.String.class,accessors=@PropertyAccessors(setAccess=PRIVATE),columnProperties=@ColumnProperties(persistent=false)),@GeneratedProperty(name="repository",type=java.lang.String.class,accessors=@PropertyAccessors(setAccess=PRIVATE),columnProperties=@ColumnProperties(persistent=false)),@GeneratedProperty(name="object",type=WTPrincipal.class,concrete=false,accessors=@PropertyAccessors(getAccess=PRIVATE,setExceptions={}),constraints=@PropertyConstraints(required=false),columnProperties=@ColumnProperties(persistent=false))})
public class WTPrincipalReference
extends wt.org._WTPrincipalReference
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:
-
Field Summary
Fields inherited from class wt.fc._ObjectReference
OBJECT -
Method Summary
Modifier and TypeMethodDescriptionReturns a name for the principal.Return the principal's name as its identity.Returns principal referenced by object.Returns a unique, display-friendly identifier for the principal reference.protected voidinitialize(String dn, String repository) Supports initialization, following construction of an instance.protected voidSupports initialization, following construction of an instance.protected voidinitialize(WTPrincipal principal) Supports initialization, following construction of an instance.protected voidinitialize(WTPrincipalReference principalReference) Supports initialization, following construction of an instance.static WTPrincipalReference
Supported API: truestatic WTPrincipalReferencenewWTPrincipalReference(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 WTPrincipalReferenceConstructs a principal out of its database identifier.static WTPrincipalReferencenewWTPrincipalReference(WTPrincipal principal) Creates reference given a principal.static WTPrincipalReferencenewWTPrincipalReference(WTPrincipalReference principalReference) Creates reference given a principal reference.voidrefresh()Refresh the WTPrincipalReference using the OrganizationService's principal cache.toString()Returns string representation of the reference.Methods inherited from class wt.fc.ObjectReference
newObjectReference, newObjectReference, setObject
-
Method Details
-
newWTPrincipalReference
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
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
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.
Supported API: true- Parameters:
principalReference-- Throws:
WTException
-
newWTPrincipalReference
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
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.
Supported API: true- Overrides:
initializein classObjectReference- 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
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.
Supported API: true- Parameters:
dn-repository-- Throws:
WTException
-
getDisplayName
Returns a name for the principal. Certain usage-specific behavioral nuances apply when it comes to individual principal types (see details below). Therefore, this API may not be best-suited if the name is intended for display in UI. For such cases, seegetUniqueDisplayIdentifier().
While there are many attributes needed to make a principal uniquely identifiable, all those attributes are not included in the name returned by this API. If indeed a unique display identity is what is required, usegetUniqueDisplayIdentifier()
The name returned is determined by the type of principal the reference is for:- Pseudo-roles ALL or OWNER: Returns the value in Session locale corresponding to these names (for example: "All" or "Owner")
- User: Returns the user's full name
- External/user-defined group: Returns the group's name
- Internal/system group such as role group or internal organization group: Returns the name of the group as-is with no localization is applied (for example: "teamMembers", "GUEST", etc.)
- Role Principal: Returns the localized name of the role in Session locale. For example: "Team Members", "Guest", etc.
- Organization: Returns the organization's name
- All other cases, including internal/system group: Returns the principal's name as-is
wt.access.accessResource.SECURED_INFORMATIONmessage is returned instead. The same message may be displayed in the place of organization name, within the returned identifier, if the session user does not have access to the organization.
Supported API: true- Returns:
- String - Display name based on the above specifications
- Throws:
WTException
-
getPrincipal
Returns principal referenced by object.
Supported API: true- Returns:
- WTPrincipal
- Throws:
WTException
-
getIdentity
Return the principal's name as its identity.
Supported API: true- Returns:
- String
-
refresh
Refresh the WTPrincipalReference using the OrganizationService's principal cache.
Supported API: true- Specified by:
refreshin interfaceWTReference- Overrides:
refreshin classObjectReference- Throws:
WTException
-
toString
Returns string representation of the reference.
Supported API: true- Overrides:
toStringin classObjectReference- Returns:
- String
-
getUniqueDisplayIdentifier
Returns a unique, display-friendly identifier for the principal reference. Labels and internal representations are localized using session locale.
The value returned is determined by the type of principal the reference is for:- Pseudo-roles ALL or OWNER: Returns the localized value corresponding to these names, followed by the role
type.
For example: "All (Pseudo Role)" or "Owner (Pseudo Role)" - User: See
WTUser.getUniqueDisplayIdentifier(wt.inf.container.WTContainer) - External/user-defined group, internal/system group such as role group, or organization group: See
WTGroup.getUniqueDisplayIdentifier() - Organization: See
WTOrganization.getUniqueDisplayIdentifier() - Role Principal: See
WTRolePrincipal.getUniqueDisplayIdentifier()
If the session user does not have access to the principal, thewt.access.accessResource.SECURED_INFORMATIONmessage is returned instead. The same message may be displayed in the place of organization name, within the returned identifier, if the session user does not have access to the organization.
Supported API: true- Returns:
- String - Unique display identifier generated based on the above specifications
- Throws:
WTException
- Pseudo-roles ALL or OWNER: Returns the localized value corresponding to these names, followed by the role
type.
-