Process API

filenet.vw.api
Class VWUserInfo

java.lang.Object
  extended by filenet.vw.api.VWUserInfo
All Implemented Interfaces:
IVWtoXML, java.io.Serializable

public final class VWUserInfo
extends java.lang.Object
implements java.io.Serializable, IVWtoXML

Use this class to access information for a specific user.

Create instances of this class using any of the following methods:

Since:
VWWS3.10
See Also:
VWSystemAdministration.createUserInfo(java.lang.String), VWSystemAdministration.fetchUserInfo(String), Serialized Form

Field Summary
static int NOTIFICATION_MILESTONE_ORIGINATOR
          Value of 512: signifies the notification flag is "Originator Milestone".
static int NOTIFICATION_MILESTONE_TRACKER
          Value of 256: signifies the notification flag is "Tracker Milestone".
static int NOTIFICATION_STEP_EXPIRED_DEADLINE
          Value of 2: signifies the notification flag is "Step Expired Deadline".
static int NOTIFICATION_STEP_NEW_ASSIGNMENT
          Value of 1: signifies the notification flag is "Step New Assignment".
static int NOTIFICATION_STEP_REMINDERS
          Value of 4: signifies the notification flag is "Step Reminders".
static int NOTIFICATION_TRACKER_EXPIRED_DEADLINE
          Value of 16: signifies the notification flag is "Tracker Expired Deadline".
static int NOTIFICATION_TRACKER_NEW_ASSIGNMENT
          Value of 32: signifies the notification flag is "Tracker New Assignment".
static int NOTIFICATION_TRACKER_REMINDERS
          Value of 64: signifies the notification flag is "Tracker Reminders".
static int NOTIFICATION_TRACKER_STEP_EXPIRED_DEADLINE
          Value of 128: signifies the notification flag is "Tracker Step Expired Deadline".
static int NOTIFICATION_TRACKER_WORKFLOW_EXCEPTION
          Value of 8: signifies the notification flag is "Tracker Workflow Exception".
static int NOTIFICATION_UNDEFINED
          Value of 0: signifies the notification flag is "Undefined".
static int SERVER_ID_UNSPECIFIED
          Value of -1: signifies the Server ID is unspecified.
 
Method Summary
static java.lang.String _get_FILE_AUTHOR()
          For FileNet internal use only, do not call.
static java.lang.String _get_FILE_DATE()
          For FileNet internal use only, do not call.
static java.lang.String _get_FILE_REVISION()
          For FileNet internal use only, do not call.
 void deleteField(java.lang.String fieldName)
          Deletes the named field entry.
 java.lang.String getEMailAddress()
          Gets the email address of the current user.
 int getFieldType(java.lang.String fieldName)
          Returns the basic field type of the specified field name.
 java.lang.Object getFieldValue(java.lang.String fieldName)
          Returns an Object representing the specified field name.
static java.lang.String getLocalizedString(int theNotificationType)
          Gets a localized representation of the notification type.
 java.lang.String getName()
          Returns the name of the current user.
 VWParticipant getNamePx()
          Returns the VWParticipant security object for the current user.
 int getNotificationFlags()
          Gets the number that represents all the notification type settings (indicated by NOTIFICATION_*) for this instance.
 java.util.Locale getPreferredLocale()
          Gets the preferred locale to be used for email notification.
 java.lang.String getProxyUserName()
          Gets the proxy user name as a String.
 VWParticipant getProxyUserNamePx()
          Gets the proxy user name as an instance of a VWParticipant object.
 int getServerAssignment()
          Deprecated. BPM 4.0 release farming does not support multiple servers
 boolean isFieldArray(java.lang.String fieldName)
          Indicates whether a field is an array.
static boolean isValid(int theNotificationType)
          Indicates whether the specified notification type is valid.
 void save()
          Saves the values set for this instance.
 void setEMailAddress(java.lang.String theEMailAddress)
          Sets the email address for the current user.
 void setFieldValue(java.lang.String fieldName, java.lang.Object fieldValue)
          Creates, deletes, or updates a field for this instance.
 void setName(java.lang.String theUserName)
          Deprecated. VWUserInfo records are created on the server, the name cannot be changed
 void setNotificationFlags(int theFlags)
          Sets the notification flag settings for this instance.
 void setPreferredLocale(java.util.Locale myLocale)
          Sets the preferred locale to be used for client email notification.
 void setProxyUserName(java.lang.String theUserName)
          Sets the proxy user name for this instance, within the default domain.
 void setProxyUserNameByDomain(java.lang.String theDomainName, java.lang.String theUserName)
          Sets the proxy user name for this user information object.
 void setServerAssignment(int theServerId)
          Deprecated. BPM 4.0 release farming does not support multiple servers
 java.lang.String toString()
          Returns the String version of the user name for this instance.
 void toXML(java.lang.StringBuffer theBuffer)
          Appends an XML string representing this instance to the buffer specified.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NOTIFICATION_UNDEFINED

public static final int NOTIFICATION_UNDEFINED
Value of 0: signifies the notification flag is "Undefined".

See Also:
Constant Field Values

NOTIFICATION_STEP_NEW_ASSIGNMENT

public static final int NOTIFICATION_STEP_NEW_ASSIGNMENT
Value of 1: signifies the notification flag is "Step New Assignment".

See Also:
Constant Field Values

NOTIFICATION_STEP_EXPIRED_DEADLINE

public static final int NOTIFICATION_STEP_EXPIRED_DEADLINE
Value of 2: signifies the notification flag is "Step Expired Deadline".

See Also:
Constant Field Values

NOTIFICATION_STEP_REMINDERS

public static final int NOTIFICATION_STEP_REMINDERS
Value of 4: signifies the notification flag is "Step Reminders".

See Also:
Constant Field Values

NOTIFICATION_TRACKER_WORKFLOW_EXCEPTION

public static final int NOTIFICATION_TRACKER_WORKFLOW_EXCEPTION
Value of 8: signifies the notification flag is "Tracker Workflow Exception".

See Also:
Constant Field Values

NOTIFICATION_TRACKER_EXPIRED_DEADLINE

public static final int NOTIFICATION_TRACKER_EXPIRED_DEADLINE
Value of 16: signifies the notification flag is "Tracker Expired Deadline".

See Also:
Constant Field Values

NOTIFICATION_TRACKER_NEW_ASSIGNMENT

public static final int NOTIFICATION_TRACKER_NEW_ASSIGNMENT
Value of 32: signifies the notification flag is "Tracker New Assignment".

See Also:
Constant Field Values

NOTIFICATION_TRACKER_REMINDERS

public static final int NOTIFICATION_TRACKER_REMINDERS
Value of 64: signifies the notification flag is "Tracker Reminders".

See Also:
Constant Field Values

NOTIFICATION_TRACKER_STEP_EXPIRED_DEADLINE

public static final int NOTIFICATION_TRACKER_STEP_EXPIRED_DEADLINE
Value of 128: signifies the notification flag is "Tracker Step Expired Deadline".

See Also:
Constant Field Values

NOTIFICATION_MILESTONE_TRACKER

public static final int NOTIFICATION_MILESTONE_TRACKER
Value of 256: signifies the notification flag is "Tracker Milestone".

See Also:
Constant Field Values

NOTIFICATION_MILESTONE_ORIGINATOR

public static final int NOTIFICATION_MILESTONE_ORIGINATOR
Value of 512: signifies the notification flag is "Originator Milestone".

See Also:
Constant Field Values

SERVER_ID_UNSPECIFIED

public static final int SERVER_ID_UNSPECIFIED
Value of -1: signifies the Server ID is unspecified.

See Also:
Constant Field Values
Method Detail

_get_FILE_DATE

public static java.lang.String _get_FILE_DATE()
For FileNet internal use only, do not call.


_get_FILE_AUTHOR

public static java.lang.String _get_FILE_AUTHOR()
For FileNet internal use only, do not call.


_get_FILE_REVISION

public static java.lang.String _get_FILE_REVISION()
For FileNet internal use only, do not call.


getEMailAddress

public java.lang.String getEMailAddress()
Gets the email address of the current user.

Returns:
The email address for the current user.

setEMailAddress

public void setEMailAddress(java.lang.String theEMailAddress)
                     throws VWException
Sets the email address for the current user.

Parameters:
theEmailAddress - The new email address of the current user.
Throws:
VWException

getName

public java.lang.String getName()
Returns the name of the current user.

Returns:
The name of the current user.

getNamePx

public VWParticipant getNamePx()
                        throws VWException
Returns the VWParticipant security object for the current user.

Returns:
The VWParticipant security object of the current user.
Throws:
VWException

setName

public void setName(java.lang.String theUserName)
             throws VWException
Deprecated. VWUserInfo records are created on the server, the name cannot be changed

Sets the name of the current user.

Parameters:
theUserName - The name to be set for the current user.
Throws:
VWException - Thrown for various causes, including when the input name is null, empty, or otherwise invalid.

getProxyUserName

public java.lang.String getProxyUserName()
                                  throws VWException
Gets the proxy user name as a String. A proxy user receives work items on behalf of the current user.

Returns:
The proxy user name.
Throws:
VWException - Thrown for various causes, including when the user ID is not found on server.

getProxyUserNamePx

public VWParticipant getProxyUserNamePx()
                                 throws VWException
Gets the proxy user name as an instance of a VWParticipant object. A proxy user receives work items on behalf of the current user.

Returns:
The proxy user name.
Throws:
VWException - Thrown for various causes, including when the proxy user ID cannot be converted to a user name (such as when the user ID is not found on the server).

setProxyUserName

public void setProxyUserName(java.lang.String theUserName)
                      throws VWException
Sets the proxy user name for this instance, within the default domain. A proxy user receives work items on behalf of the current user.

Parameters:
theUserName - The proxy user name. This can be null when there is no proxy user.
Throws:
VWException - Thrown for various causes, including when the input name is invalid.

setProxyUserNameByDomain

public void setProxyUserNameByDomain(java.lang.String theDomainName,
                                     java.lang.String theUserName)
                              throws VWException
Sets the proxy user name for this user information object. A proxy user receives work items on behalf of the current user, within the specified domain.

Parameters:
theDomainName - The specified domain to search for the specified name.
theUserName - The proxy user name. This can be null when there is no proxy user.
Throws:
VWException - Thrown for various causes, including when the input name is not unique or is not found withint the specified domain.

setFieldValue

public void setFieldValue(java.lang.String fieldName,
                          java.lang.Object fieldValue)
                   throws VWException
Creates, deletes, or updates a field for this instance. The action taken depends on the input parameters as follows:

Parameters:
fieldName - The name of the field whose value is set. This cannot be null.
fieldValue - An Object that represents the specified field, or null. The type for this object must be one of the basic field types. If the field specified in fieldName exists, the type of the fieldValue object must match the type of the named field. Null deletes the field specified in fieldName.
Throws:
VWException - Causes include the following conditions:
  • The fieldValue object is non-null and does not have a basic field type.
  • The fieldName field exists and has a different object type from that of the fieldValue object.
  • The fieldName field does not exist and the fieldValue parameter is null.
  • The fieldName parameter is null.
See Also:
getFieldType(java.lang.String), VWFieldType

getFieldValue

public java.lang.Object getFieldValue(java.lang.String fieldName)
                               throws VWException
Returns an Object representing the specified field name.

Parameters:
fieldName - The name of the field to return.
Returns:
An Object representing the specified field.
Throws:
VWException - Thrown for various causes, including when the fieldName parameter is null.
See Also:
getFieldType(java.lang.String)

getFieldType

public int getFieldType(java.lang.String fieldName)
                 throws VWException
Returns the basic field type of the specified field name.

Parameters:
fieldName - The name of the field whose basic field type will be returned.
Returns:
An integer referencing the basic field type, or -1 if the field value is null.
Throws:
VWException - Thrown for various causes, including when the fieldName parameter is null.

isFieldArray

public boolean isFieldArray(java.lang.String fieldName)
                     throws VWException
Indicates whether a field is an array.

Parameters:
fieldName - The name of the field to check.
Returns:
A boolean value of true if the field is an array; false otherwise.
Throws:
VWException - Thrown for various causes, including when the fieldName parameter is null.

deleteField

public void deleteField(java.lang.String fieldName)
                 throws VWException
Deletes the named field entry.

Parameters:
fieldName - The name of the field to be deleted.
Throws:
VWException - Thrown for various reason, including when a field name does not exist.

getNotificationFlags

public int getNotificationFlags()
Gets the number that represents all the notification type settings (indicated by NOTIFICATION_*) for this instance.

Returns:
An integer indicating a bitwise OR of the notification type settings.

setNotificationFlags

public void setNotificationFlags(int theFlags)
                          throws VWException
Sets the notification flag settings for this instance.

Parameters:
theFlags - An integer indicating a bitwise OR of the desired notification types (indicated by NOTIFICATION_*).
Throws:
VWException - Thrown for various causes, including when the theFlags parameter is outside the range of the bitwise OR value of the notification flags.

getServerAssignment

public int getServerAssignment()
Deprecated. BPM 4.0 release farming does not support multiple servers

Gets the server ID associated with this instance.

Returns:
An integer representing the ID of the server to which this instance is assigned.

setServerAssignment

public void setServerAssignment(int theServerId)
                         throws VWException
Deprecated. BPM 4.0 release farming does not support multiple servers

Assigns a server ID for this instance.

Parameters:
theServerId - An integer representing the server ID for the server to be assigned to this instance.
Throws:
VWException - Thrown for various causes, including when the specified server ID is invalid (less than 0}.

save

public void save()
          throws VWException
Saves the values set for this instance.

Throws:
VWException - Thrown for various reasons, including when the user name is null, empty, or otherwise invalid.

toString

public java.lang.String toString()
Returns the String version of the user name for this instance.

Overrides:
toString in class java.lang.Object
Returns:
The current user name.

getLocalizedString

public static java.lang.String getLocalizedString(int theNotificationType)
                                           throws VWException
Gets a localized representation of the notification type.

Parameters:
theNotificationType - An integer representing the notification type (indicated by NOTIFICATION_*) to be localized.
Returns:
A String containing the localized text representation of the notification type.
Throws:
VWException - The method throws an exception if the notification type specified is invalid.

isValid

public static boolean isValid(int theNotificationType)
Indicates whether the specified notification type is valid.

Parameters:
theNotificationType - An integer representing the notification type (indicated by NOTIFICATION_*) to be validated.
Returns:
A boolean value of true if the notification type specified is valid; false otherwise. is invalid.

toXML

public void toXML(java.lang.StringBuffer theBuffer)
           throws VWException
Appends an XML string representing this instance to the buffer specified.

Warning: This XML string is nonextensible, and cannot be modified in any way.

Specified by:
toXML in interface IVWtoXML
Parameters:
theBuffer - A StringBuffer that will be appended with the XML content.
Throws:
VWException - Thrown if the specified buffer is null.
See Also:
VWXMLUtil

setPreferredLocale

public void setPreferredLocale(java.util.Locale myLocale)
                        throws VWException
Sets the preferred locale to be used for client email notification.

Parameters:
myLocale - A Locale object specifying the preferred locale for the client. This can be null, indicating in this case, that the default Process Engine server language is to be used for email notification.
Throws:
VWException
See Also:
VWSession.fetchAvailableLocales(), VWSession.fetchServerLocale()

getPreferredLocale

public java.util.Locale getPreferredLocale()
                                    throws VWException
Gets the preferred locale to be used for email notification.

Returns:
A Locale object specifying the client locale. This can be null, indicating in this case, that the default Process Engine server language is to be used for email notification.
Throws:
VWException
See Also:
VWSession.fetchAvailableLocales(), VWSession.fetchServerLocale()

Process API

© Copyright IBM Corporation 2002, 2008. All rights reserved.