Process Class Relationships

filenet.vw.api
Class VWUserInfo

java.lang.Object
  |
  +--filenet.vw.api.VWUserInfo
All Implemented Interfaces:
java.io.Serializable

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

Use this class to access information for a specific user.

Create an instance of this class using any among the VWSession.fetchUserInfo(), VWSystemAdministration.createUserInfo(), and VWSystemAdministration.fetchUserInfo() methods.

Since:
VWWS3.10
See Also:
VWSystemAdministration.createUserInfo(), 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
 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 field type of the input field name.
 java.lang.Object getFieldValue(java.lang.String fieldName)
          Gets the object value for the input field name.
static java.lang.String getLocalizedString(int theNotificationType)
          Gets a localized representation of the notification type.
 java.lang.String getName()
          Gets the name of the current user.
 int getNotificationFlags()
          Gets the number that represents the combined notification flag settings for the user.
 java.lang.String getProxyUserName()
          Gets the proxy user name.
 int getServerAssignment()
          Gets the server ID associated with the user.
 boolean isFieldArray(java.lang.String fieldName)
          Determines whether a field is an array.
static boolean isValid(int theNotificationType)
          Determines whether the specified notification type is valid.
 void save()
          Saves the values set for the current user.
 void setEMailAddress(java.lang.String theEMailAddress)
          Sets the email address of the current user.
 void setFieldValue(java.lang.String fieldName, java.lang.Object fieldValue)
          Creates, deletes, or updates a UserInfo field.
 void setName(java.lang.String theUserName)
          Sets the name of the current user.
 void setNotificationFlags(int theFlags)
          Sets the notification flag settings for the current user.
 void setProxyUserName(java.lang.String theUserName)
          Sets the proxy user name for this user information object. A proxy user receives work on behalf of the current user.
 void setServerAssignment(int theServerId)
          Assigns a server ID for the current user.
 java.lang.String toString()
          Gets the string version of the user name.
 
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".

NOTIFICATION_STEP_NEW_ASSIGNMENT

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

NOTIFICATION_STEP_EXPIRED_DEADLINE

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

NOTIFICATION_STEP_REMINDERS

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

NOTIFICATION_TRACKER_WORKFLOW_EXCEPTION

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

NOTIFICATION_TRACKER_EXPIRED_DEADLINE

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

NOTIFICATION_TRACKER_NEW_ASSIGNMENT

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

NOTIFICATION_TRACKER_REMINDERS

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

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

NOTIFICATION_MILESTONE_TRACKER

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

NOTIFICATION_MILESTONE_ORIGINATOR

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

SERVER_ID_UNSPECIFIED

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

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 of the current user.
Parameters:
theEmailAddress - The new email address of the current user.
Throws:
VWException - Throws an exception if there is an error while setting the email address.

getName

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

setName

public void setName(java.lang.String theUserName)
             throws VWException
Sets the name of the current user.
Parameters:
theUserName - The name of the current user.
Throws:
VWException - Thrown if it cannot set the name of the current user. An example would be when the input name is null or empty.

getProxyUserName

public java.lang.String getProxyUserName()
                                  throws VWException
Gets the proxy user name.
Returns:
The proxy user name.
Throws:
VWException - Thrown if the proxy user ID cannot be converted to a user name. This may occur if the user ID is not found on server.

setProxyUserName

public void setProxyUserName(java.lang.String theUserName)
                      throws VWException
Sets the proxy user name for this user information object. A proxy user receives work on behalf of the current user. The value null is allowable, to indicate no proxy user. Work remains assigned to the current user when there is no proxy user.
Parameters:
theUserName - The proxy user name.
Throws:
VWException - Thrown if the method cannot set the proxy name for this user information object. An example would be if the input name is invalid.

setFieldValue

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

Parameters:
fieldName - The name of the field whose value is set. Null is not permitted.
fieldValue - The object value that represents the named field. The type for this value must be one of the basic field types, and if the field specified by the fieldName parameter exists, the type of the fieldValue object must match the type of the named field. Passing null for the fieldValue parameter in conjunction with passing an existing field name for the fieldName parameter deletes the existing field.
Throws:
VWException - Causes include the following conditions:

  • The input fieldValue object is non-null and does not have a basic field type.
  • The input field name exists as a field with a different object type from that of the input fieldValue object.
  • The input field name does not exist and the fieldValue parameter is null.
  • The fieldName input parameter is null.

See Also:
getFieldType(String), VWFieldType

getFieldValue

public java.lang.Object getFieldValue(java.lang.String fieldName)
                               throws VWException
Gets the object value for the input field name.
Parameters:
fieldName - The name of the field.
Returns:
An object whose value is that of the named field.
Throws:
VWException - Causes include passing a null value for the fieldName parameter.
See Also:
getFieldType(String)

getFieldType

public int getFieldType(java.lang.String fieldName)
                 throws VWException
Returns the field type of the input field name.
Parameters:
fieldName - The name of the field whose type will be returned.
Returns:
An integer value that represents the field type, or -1 if the field value is null. The valid field types are as follows:

  • 1  (VWFieldType.FIELD_TYPE_INT)
  • 2  (VWFieldType.FIELD_TYPE_STRING)
  • 4  (VWFieldType.FIELD_TYPE_BOOLEAN)
  • 8  (VWFieldType.FIELD_TYPE_FLOAT)
  • 16 (VWFieldType.FIELD_TYPE_TIME)
Throws:
VWException - Thrown if the fieldName parameter is null.

isFieldArray

public boolean isFieldArray(java.lang.String fieldName)
                     throws VWException
Determines whether a field is an array.
Parameters:
fieldName - The name of the field to check.
Returns:
true if the field is an array; false if the field is not an array.
Throws:
VWException - Thrown if 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 if it cannot delete a field entry. An example would be when a field name does not exist.

getNotificationFlags

public int getNotificationFlags()
Gets the number that represents the combined notification flag settings for the user.
Returns:
An integer value indicating a bitwise OR operation combination value of the notification flag settings.

setNotificationFlags

public void setNotificationFlags(int theFlags)
                          throws VWException
Sets the notification flag settings for the current user.
Parameters:
theFlags - An integer that holds the bitwise OR operation value of the notification flags.

  • 0:   NOTIFICATION_UNDEFINED
  • 1:   NOTIFICATION_STEP_NEW_ASSIGNMENT
  • 2:   NOTIFICATION_STEP_EXPIRED_DEADLINE
  • 4:   NOTIFICATION_STEP_REMINDERS
  • 8:   NOTIFICATION_TRACKER_WORKFLOW_EXCEPTION
  • 16:  NOTIFICATION_TRACKER_EXPIRED_DEADLINE
  • 32:  NOTIFICATION_TRACKER_NEW_ASSIGNMENT
  • 64:  NOTIFICATION_TRACKER_REMINDERS
  • 128: NOTIFICATION_TRACKER_STEP_EXPIRED_DEADLINE
  • 256: NOTIFICATION_MILESTONE_TRACKER
  • 512: NOTIFICATION_MILESTONE_ORIGINATOR

Throws:
VWException - Thrown if there is an error while setting the notification flags, for example, if the theFlags parameter is less than or greater than the possible respective minimum or maximum values, give the above flag values.

getServerAssignment

public int getServerAssignment()
Gets the server ID associated with the user. The server is assigned by the system.
Returns:
An integer value indicating the ID of the server to which the system assigned this user.

setServerAssignment

public void setServerAssignment(int theServerId)
                         throws VWException
Assigns a server ID for the current user.
Parameters:
theServerId - An integer value specifying the server ID for the server you want to assign to the user.
Throws:
VWException - Thrown if it cannot assign a server ID for the current user. The ID for the server must exist on the system and the server ID must be valid (greater than or equal to 0).

save

public void save()
          throws VWException
Saves the values set for the current user.
Throws:
VWException - Thrown if it cannot save the values set for the current user. An example would be if the user name is null, empty, or otherwise invalid.

toString

public java.lang.String toString()
Gets the string version of the user name.
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 value specifying the notification type value to be represented by a string. Valid input values are listed below:

  • 0:   NOTIFICATION_UNDEFINED
  • 1:   NOTIFICATION_STEP_NEW_ASSIGNMENT
  • 2:   NOTIFICATION_STEP_EXPIRED_DEADLINE
  • 4:   NOTIFICATION_STEP_REMINDERS
  • 8:   NOTIFICATION_TRACKER_WORKFLOW_EXCEPTION
  • 16:  NOTIFICATION_TRACKER_EXPIRED_DEADLINE
  • 32:  NOTIFICATION_TRACKER_NEW_ASSIGNMENT
  • 64:  NOTIFICATION_TRACKER_REMINDERS
  • 128: NOTIFICATION_TRACKER_STEP_EXPIRED_DEADLINE
  • 256: NOTIFICATION_MILESTONE_TRACKER
  • 512: NOTIFICATION_MILESTONE_ORIGINATOR

Returns:
The localized text representation of the notification type.
Throws:
VWException - The method throws an exception if the notification type specified in the theNotificationType parameter is invalid.

isValid

public static boolean isValid(int theNotificationType)
Determines whether the specified notification type is valid.
Parameters:
theNotificationType - An integer value specifying the notification type value to be validated. Valid input values are listed below:

  • 0:   NOTIFICATION_UNDEFINED
  • 1:   NOTIFICATION_STEP_NEW_ASSIGNMENT
  • 2:   NOTIFICATION_STEP_EXPIRED_DEADLINE
  • 4:   NOTIFICATION_STEP_REMINDERS
  • 8:   NOTIFICATION_TRACKER_WORKFLOW_EXCEPTION
  • 16:  NOTIFICATION_TRACKER_EXPIRED_DEADLINE
  • 32:  NOTIFICATION_TRACKER_NEW_ASSIGNMENT
  • 64:  NOTIFICATION_TRACKER_REMINDERS
  • 128: NOTIFICATION_TRACKER_STEP_EXPIRED_DEADLINE
  • 256: NOTIFICATION_MILESTONE_TRACKER
  • 512: NOTIFICATION_MILESTONE_ORIGINATOR

Returns:
true if the notification type specified in the theNotificationType parameter is valid; false if the notification type is invalid.


Copyright © 2002, 2003 FileNet Corporation. All rights reserved.