wt.org
Class WTUser

java.lang.Object
  extended by wt.fc.WTObject
      extended by wt.fc.Item
          extended by wt.org.WTPrincipal
              extended by wt.org.WTUser
All Implemented Interfaces:
Externalizable, Serializable, Principal, AccessControlled, wt.access.AccessControlList, wt.access.AdHocControlled, wt.access.PolicyAccessControlled, wt.access.SecurityLabeled, wt.admin.DomainAdministered, wt.fc.BusinessInformation, NetFactor, ObjectMappable, Persistable, wt.federation.FederatedLinkHolder, wt.federation.RemotelyLinkable, DisplayIdentification, Notifiable, wt.recent.RecentlyVisited, wt.ufid.Federatable, wt.workflow.notebook.SubjectOfNotebook
Direct Known Subclasses:
ProxyUser

public class WTUser
extends WTPrincipal
implements Notifiable, wt.access.AdHocControlled, wt.workflow.notebook.SubjectOfNotebook, Externalizable

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:
Serialized Form

Method Summary
 String getBusinessType()
          Returns string representing WTUser'sd business type.
 String getEMail()
          Return the user's e-mail address.
 Locale getLocale()
          Return the user's locale.
protected  void initialize()
          Supports initialization, following construction of an instance.
protected  void initialize(String name)
          Supports initialization, following construction of an instance.
protected  void initialize(String name, DirectoryContextProvider context)
          Supports initialization, following construction of an instance.
protected  void initialize(String name, String dn)
          Supports initialization, following construction of an instance.
protected  void initialize(String name, String dn, String service)
          Supports initialization, following construction of an instance.
static WTUser newWTUser(String name)
          Constructor: takes the user's name as sole parameter.
static WTUser newWTUser(String name, DirectoryContextProvider context)
          Constructor: Constructs an instance with a specific name and organization.
static WTUser newWTUser(String name, String dn)
          

Supported API: true
static WTUser newWTUser(String name, String dn, String service)
          Constructor: Constructs an instance with a specific name, LDAP distinguished name, and LDAP service.
 Enumeration parentGroupNames()
          Returns an enumeration containing the names of the groups to which the user belongs.
 Enumeration parentGroupObjects()
          Returns all the parent groups to which the user belongs.
 Enumeration parentGroups()
          Returns the groups to which the user belongs.
 void setDisabled(boolean disabled)
          

Supported API: true
 void setLocale(Locale locale)
          Set the user's locale.
 String toString()
          Returns a string representation of the user object.
 
Methods inherited from class wt.org.WTPrincipal
getPrincipalDisplayIdentifier
 
Methods inherited from class wt.fc.WTObject
getDisplayIdentifier, getDisplayIdentity, getDisplayType
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

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 StandardAttributeHolder.

Supported API: true

Parameters:
name -
Returns:
WTUser
Throws:
WTException
See Also:
StandardAttributeHolder

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

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

getBusinessType

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

Supported API: true

Returns:
String

setDisabled

public void setDisabled(boolean disabled)
                 throws WTException,
                        WTPropertyVetoException


Supported API: true

Parameters:
disabled -
Throws:
WTException
WTPropertyVetoException

getEMail

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

Supported API: true

Returns:
String
Throws:
WTException

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

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
Returns:
String

initialize

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

Supported API: true

Throws:
WTException