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 Details

    • newWTUser

      public static WTUser newWTUser(String name) throws WTException
      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

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

      Supported API: true
      Overrides:
      initialize in class WTPrincipal
      Parameters:
      name -
      Throws:
      WTException
    • newWTUser

      public static WTUser newWTUser(String name, String dn) throws WTException


      Supported API: true
      Parameters:
      name -
      dn -
      Returns:
      WTUser
      Throws:
      WTException
    • initialize

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

      Supported API: true
      Parameters:
      name -
      dn -
      Throws:
      WTException
    • newWTUser

      public static WTUser newWTUser(String name, String dn, String service) throws WTException
      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

      protected void initialize(String name, String dn, String service) throws WTException
      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

      public static WTUser newWTUser(String name, DirectoryContextProvider context) throws WTException
      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

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

      Supported API: true
      Parameters:
      name -
      context -
      Throws:
      WTException
    • getAuthenticationName

      public String 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 as WTPrincipal.getName()

      Supported API: true
      Returns:
      String
    • getBusinessType

      public String getBusinessType()
      Returns string representing WTUser'sd business type. In the case this is simply 'WTUser'.

      Supported API: true
      Specified by:
      getBusinessType in interface wt.fc.BusinessInformation
      Overrides:
      getBusinessType in class WTPrincipal
      Returns:
      String
    • setDisabled

      public void setDisabled(boolean disabled) throws WTException, WTPropertyVetoException


      Supported API: true
      Overrides:
      setDisabled in class WTPrincipal
      Parameters:
      disabled -
      Throws:
      WTException
      WTPropertyVetoException
    • getEMail

      public String getEMail() throws WTException
      Return the user's e-mail address.

      Supported API: true
      Overrides:
      getEMail in class wt.org._WTUser
      Returns:
      String
      Throws:
      WTException
    • getFullName

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

      public Locale getLocale() throws WTException
      Return the user's locale.

      Supported API: true
      Returns:
      Locale
      Throws:
      WTException
    • setLocale

      public void setLocale(Locale locale) throws WTException
      Set the user's locale.

      Supported API: true
      Parameters:
      locale -
      Throws:
      WTException
    • getOrganizationName

      public String getOrganizationName() throws WTException


      Supported API: true
      Returns:
      String
      Throws:
      WTException
    • getTelephoneNumber

      public String getTelephoneNumber() throws WTException


      Supported API: true
      Returns:
      String
      Throws:
      WTException
    • parentGroups

      public Enumeration parentGroups(boolean flatten) throws WTException
      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

      public Enumeration parentGroups() throws WTException
      Returns the groups to which the user belongs. The result is a principal reference enumeration.

      Supported API: true
      Returns:
      Enumeration
      Throws:
      WTException
    • parentGroupNames

      public Enumeration parentGroupNames() throws WTException
      Returns an enumeration containing the names of the groups to which the user belongs.

      Supported API: true
      Returns:
      Enumeration
      Throws:
      WTException
    • parentGroupObjects

      public Enumeration parentGroupObjects() throws WTException
      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

      public String toString()
      Returns a string representation of the user object.

      Supported API: true
      Specified by:
      toString in interface Principal
      Overrides:
      toString in class WTObject
      Returns:
      String
    • initialize

      protected void initialize() throws WTException
      Supports initialization, following construction of an instance. Usually invoked by Federated subclasses.

      Supported API: true
      Overrides:
      initialize in class WTPrincipal
      Throws:
      WTException
    • getUniqueDisplayIdentifier

      public String getUniqueDisplayIdentifier() throws WTException
      Calls getUniqueDisplayIdentifier(WTContainer container) with a "null" value for the container parameter.

      Supported API: true
      Overrides:
      getUniqueDisplayIdentifier in class WTPrincipal
      Returns:
      String - Unique display identifier generated based on the above specifications
      Throws:
      WTException
    • getUniqueDisplayIdentifier

      public String getUniqueDisplayIdentifier(WTContainer container) throws WTException
      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 a WTUser instance 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, the wt.access.accessResource.SECURED_INFORMATION message is returned instead.

      Supported API: true