Package wt.org
Class WTUser
java.lang.Object
wt.fc._WTObject
wt.fc.WTObject
wt.fc._Item
wt.fc.Item
wt.org._WTPrincipal
wt.org.WTPrincipal
wt.org._WTUser
wt.org.WTUser
- All Implemented Interfaces:
Externalizable,Serializable,Principal,wt.access._AccessControlled,wt.access._AccessControlList,wt.access._AdHocControlled,wt.access._PolicyAccessControlled,wt.access._SecurityLabeled,AccessControlled,wt.access.AccessControlList,AdHocControlled,wt.access.PolicyAccessControlled,SecurityLabeled,wt.admin._DomainAdministered,DomainAdministered,wt.content._ContentHolder,wt.content._FormatContentHolder,ContentHolder,FormatContentHolder,wt.fc._NetFactor,wt.fc._ObjectMappable,wt.fc._Persistable,wt.fc.adminlock._AdministrativelyLockable,AdministrativelyLockable,wt.fc.BusinessInformation,NetFactor,ObjectMappable,Persistable,wt.federation._FederatedLinkHolder,wt.federation._RemotelyLinkable,wt.federation.FederatedLinkHolder,wt.federation.RemotelyLinkable,wt.filter._NavigationCriteriaOwner,wt.filter.NavigationCriteriaOwner,DisplayIdentification,wt.notify._Notifiable,Notifiable,wt.recent.RecentlyVisited,wt.type._TypeManaged,wt.type.TypeManaged,wt.ufid._Federatable,wt.ufid.Federatable,wt.workflow.notebook._SubjectOfNotebook,wt.workflow.notebook.SubjectOfNotebook
- Direct Known Subclasses:
_ProxyUser
@GenAsPersistable(superClass=WTPrincipal.class,interfaces={Notifiable.class,AdHocControlled.class,wt.workflow.notebook.SubjectOfNotebook.class,FormatContentHolder.class,wt.filter.NavigationCriteriaOwner.class},versions={3143044821044483682L,5550417080890240025L,-173851363435840950L,6298442528846068450L,-1247246268716803664L,5506730872833963351L},properties={@GeneratedProperty(name="authenticationName",type=java.lang.String.class,accessors=@PropertyAccessors(getAccess=PRIVATE,setExceptions={}),columnProperties=@ColumnProperties(persistent=false)),@GeneratedProperty(name="certificates",type=java.security.cert.Certificate[][].class,accessors=@PropertyAccessors(getAccess=PRIVATE,setExceptions={}),columnProperties=@ColumnProperties(persistent=false)),@GeneratedProperty(name="faxNumber",type=java.lang.String.class,accessors=@PropertyAccessors(getAccess=PRIVATE,setExceptions={}),columnProperties=@ColumnProperties(persistent=false)),@GeneratedProperty(name="locale",type=java.util.Locale.class,accessors=@PropertyAccessors(getAccess=PRIVATE,setExceptions={}),columnProperties=@ColumnProperties(persistent=false)),@GeneratedProperty(name="mobilePhoneNumber",type=java.lang.String.class,accessors=@PropertyAccessors(getAccess=PRIVATE,setExceptions={}),columnProperties=@ColumnProperties(persistent=false)),@GeneratedProperty(name="organizationName",type=java.lang.String.class,accessors=@PropertyAccessors(getAccess=PRIVATE,setExceptions={}),columnProperties=@ColumnProperties(persistent=false)),@GeneratedProperty(name="postalAddress",type=java.lang.String.class,accessors=@PropertyAccessors(getAccess=PRIVATE,setExceptions={}),columnProperties=@ColumnProperties(persistent=false)),@GeneratedProperty(name="telephoneNumber",type=java.lang.String.class,accessors=@PropertyAccessors(getAccess=PRIVATE,setExceptions={}),columnProperties=@ColumnProperties(persistent=false)),@GeneratedProperty(name="webSite",type=java.net.URL.class,accessors=@PropertyAccessors(getAccess=PRIVATE,setExceptions={}),columnProperties=@ColumnProperties(persistent=false)),@GeneratedProperty(name="last",type=java.lang.String.class,javaDoc="The attribute holds the last name value of a user object."),@GeneratedProperty(name="allowLDAPSynchronization",type=boolean.class,initialValue="true",javaDoc="This attribute specifies if the manual changes made for the fullname or surname in LDAP should be synchronized with the user details in the database upon the next user login."),@GeneratedProperty(name="lastSyncTime",type=java.sql.Date.class,javaDoc="This attribute is used to set the synchronization time between changes made to full name and surname in LDAP with the database."),@GeneratedProperty(name="fullName",type=java.lang.String.class,accessors=@PropertyAccessors(getAccess=PRIVATE,setExceptions={}),constraints=@PropertyConstraints(upperLimit=660),javaDoc="The attribute holds the full name of a user object"),@GeneratedProperty(name="eMail",type=java.lang.String.class,accessors=@PropertyAccessors(setExceptions={WTException.class,WTPropertyVetoException.class},getExceptions=WTException.class),constraints=@PropertyConstraints(upperLimit=256),javaDoc="The attribute holds the email of a user object")},tableProperties=@TableProperties(compositeUnique1="+name",oracleTableSize=MEDIUM),iconProperties=@IconProperties(standardIcon="netmarkets/images/user.gif",openIcon="netmarkets/images/user.gif"))
public class WTUser
extends wt.org._WTUser
The WTUser class represents users of the system. It holds information
about the user and the groups to which he or she belongs.
Use the newWTUser static factory method(s), not the WTUser
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:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the authentication name of the user i.e the value assigned to the attribute that holds the user's authentication name in the directory server.Returns string representing WTUser'sd business type.getEMail()Return the user's e-mail address.Returns the full name of the user from the database.Return the user's locale.
Supported API: true
Supported API: trueCallsgetUniqueDisplayIdentifier(WTContainer container)with a "null" value for thecontainerparameter.getUniqueDisplayIdentifier(WTContainer container) Returns a unique, display-friendly identifier for the user.protected voidSupports initialization, following construction of an instance.protected voidinitialize(String name) Supports initialization, following construction of an instance.protected voidinitialize(String name, String dn) Supports initialization, following construction of an instance.protected voidinitialize(String name, String dn, String service) Supports initialization, following construction of an instance.protected voidinitialize(String name, DirectoryContextProvider context) Supports initialization, following construction of an instance.static WTUserConstructor: takes the user's name as sole parameter.static WTUser
Supported API: truestatic WTUserConstructor: Constructs an instance with a specific name, LDAP distinguished name, and LDAP service.static WTUsernewWTUser(String name, DirectoryContextProvider context) Constructor: Constructs an instance with a specific name and organization.Returns an enumeration containing the names of the groups to which the user belongs.Returns all the parent groups to which the user belongs.Returns the groups to which the user belongs.parentGroups(boolean flatten) Returns the groups to which the user belongs.voidsetDisabled(boolean disabled)
Supported API: truevoidSet the user's locale.toString()Returns a string representation of the user object.Methods inherited from class wt.org.WTPrincipal
cloneAsInflated, getName, getOrganization, getPrincipalDisplayIdentifierMethods inherited from class wt.fc.WTObject
getDisplayIdentifier, getDisplayIdentity, getDisplayTypeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface wt.fc.Persistable
checkAttributes
-
Method Details
-
newWTUser
Constructor: takes the user's name as sole parameter. The WTUser will have an attribute holder of class type DefaultAttributeHolder.
Supported API: true- Parameters:
name-- Returns:
- WTUser
- Throws:
WTException- See Also:
-
DefaultAttributeHolder
-
initialize
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.
Supported API: true- Overrides:
initializein classWTPrincipal- Parameters:
name-- Throws:
WTException
-
newWTUser
Supported API: true- Parameters:
name-dn-- Returns:
- WTUser
- Throws:
WTException
-
initialize
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.
Supported API: true- Parameters:
name-dn-- Throws:
WTException
-
newWTUser
Constructor: Constructs an instance with a specific name, LDAP distinguished name, and LDAP service. The service and distinguished name will determine the directory service in which the instance is stored, and its location within that service, respectively.
Supported API: true- Parameters:
name-dn-service-- Returns:
- WTUser
- Throws:
WTException
-
initialize
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.
Supported API: true- Parameters:
name-dn-service-- Throws:
WTException
-
newWTUser
Constructor: Constructs an instance with a specific name and organization. The instance will be stored in the same LDAP directory service as the organization, and it will be stored as an immediate child of the organization's LDAP entry.
Supported API: true- Parameters:
name-context-- Returns:
- WTUser
- Throws:
WTException
-
initialize
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.
Supported API: true- Parameters:
name-context-- Throws:
WTException
-
getAuthenticationName
Returns the authentication name of the user i.e the value assigned to the attribute that holds the user's authentication name in the directory server. By default the attribute is uid. But it can be overridden by any attribute that is unique in the directory server by explicitly defining the mapping on the adapter. If the uid attribute is not used in the directory server and if it is not overridden by a different attribute on the adapter, the value returned is same asWTPrincipal.getName()
Supported API: true- Returns:
- String
-
getBusinessType
Returns string representing WTUser'sd business type. In the case this is simply 'WTUser'.
Supported API: true- Specified by:
getBusinessTypein interfacewt.fc.BusinessInformation- Overrides:
getBusinessTypein classWTPrincipal- Returns:
- String
-
setDisabled
Supported API: true- Overrides:
setDisabledin classWTPrincipal- Parameters:
disabled-- Throws:
WTExceptionWTPropertyVetoException
-
getEMail
Return the user's e-mail address.
Supported API: true- Overrides:
getEMailin classwt.org._WTUser- Returns:
- String
- Throws:
WTException
-
getFullName
Returns the full name of the user from the database. The full name value is retrieved from the full name attribute persisted for a user in the database; the full name will be what ever was assigned to the attribute that holds the user's full name in the directory server. If the persisted full name attribute, the full name value assigned to the attribute that holds the user's full name is retrieved from the directory server.
Supported API: true- Returns:
- String
-
getLocale
Return the user's locale.
Supported API: true- Returns:
- Locale
- Throws:
WTException
-
setLocale
Set the user's locale.
Supported API: true- Parameters:
locale-- Throws:
WTException
-
getOrganizationName
Supported API: true- Returns:
- String
- Throws:
WTException
-
getTelephoneNumber
Supported API: true- Returns:
- String
- Throws:
WTException
-
parentGroups
Returns the groups to which the user belongs. The result is a principal reference enumeration.
Supported API: true- Parameters:
flatten- If false, only immediate parent groups will be returned If true, all nested groups for which principal is a member will be returned, e.g. the parent groups of principal's parent groups, and the parent groups of those groups, etc.,- Returns:
- Enumeration
- Throws:
WTException
-
parentGroups
Returns the groups to which the user belongs. The result is a principal reference enumeration.
Supported API: true- Returns:
- Enumeration
- Throws:
WTException
-
parentGroupNames
Returns an enumeration containing the names of the groups to which the user belongs.
Supported API: true- Returns:
- Enumeration
- Throws:
WTException
-
parentGroupObjects
Returns all the parent groups to which the user belongs. The result is an enumeration of WTPrincipal objects. This method should be used if any of the parent groups may be a non-persistent proxy.
Supported API: true- Returns:
- Enumeration
- Throws:
WTException
-
toString
Returns a string representation of the user object.
Supported API: true -
initialize
Supports initialization, following construction of an instance. Usually invoked by Federated subclasses.
Supported API: true- Overrides:
initializein classWTPrincipal- Throws:
WTException
-
getUniqueDisplayIdentifier
CallsgetUniqueDisplayIdentifier(WTContainer container)with a "null" value for thecontainerparameter.
Supported API: true- Overrides:
getUniqueDisplayIdentifierin classWTPrincipal- Returns:
- String - Unique display identifier generated based on the above specifications
- Throws:
WTException
-
getUniqueDisplayIdentifier
Returns a unique, display-friendly identifier for the user. Labels and internal representations are localized using session locale.
The unique identifier generated is made up of the user's full name, and depending on how the preference "User unique identifier display format" is set, some additional attributes as well. The variations are as follows:- If the preference is set to include user name and organization, then the unique identifier is of the
form "Full name (User name: Context name)" where Context name is the name of the Site or organization context the
user belongs to
For example: Smith, Jeff (jsmith: ACME) or Smith, Jeff (jsmith: Site) - If the preference is set to include email id, then the unique identifier is of the form
"Full name (Email id)"
For example: Smith, Jeff (jsmith@acme.com)
It is possible for aWTUserinstance to be used to represent ALL/OWNER pseudo-roles instead of an actual user. If the current instance does indeed represent one of these pseudo-roles, then instead of a full name as described above, the localized value corresponding to the pseudo-role, followed by the role type, is returned.
For example: "All (Pseudo Role)" or "Owner (Pseudo Role)"
If the session user does not have access to the principal, thewt.access.accessResource.SECURED_INFORMATIONmessage is returned instead.
Supported API: true- Parameters:
container- - This is used to get the appropriate preference value. Null is a valid argument, and in that case the default value for the preference, from the Site context, is used- Returns:
- String - Unique display identifier generated based on the above specifications
- Throws:
WTException
- If the preference is set to include user name and organization, then the unique identifier is of the
form "Full name (User name: Context name)" where Context name is the name of the Site or organization context the
user belongs to
-