filenet.vw.api
Class VWUserInfo
- java.lang.Object
-
- 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
Fields Modifier and Type Field and Description static intNOTIFICATION_MILESTONE_ORIGINATORValue of 512: signifies the notification flag is "Originator Milestone".static intNOTIFICATION_MILESTONE_TRACKERValue of 256: signifies the notification flag is "Tracker Milestone".static intNOTIFICATION_STEP_EXPIRED_DEADLINEValue of 2: signifies the notification flag is "Step Expired Deadline".static intNOTIFICATION_STEP_NEW_ASSIGNMENTValue of 1: signifies the notification flag is "Step New Assignment".static intNOTIFICATION_STEP_REMINDERSValue of 4: signifies the notification flag is "Step Reminders".static intNOTIFICATION_TRACKER_EXPIRED_DEADLINEValue of 16: signifies the notification flag is "Tracker Expired Deadline".static intNOTIFICATION_TRACKER_NEW_ASSIGNMENTValue of 32: signifies the notification flag is "Tracker New Assignment".static intNOTIFICATION_TRACKER_REMINDERSValue of 64: signifies the notification flag is "Tracker Reminders".static intNOTIFICATION_TRACKER_STEP_EXPIRED_DEADLINEValue of 128: signifies the notification flag is "Tracker Step Expired Deadline".static intNOTIFICATION_TRACKER_WORKFLOW_EXCEPTIONValue of 8: signifies the notification flag is "Tracker Workflow Exception".static intNOTIFICATION_UNDEFINEDValue of 0: signifies the notification flag is "Undefined".static intSERVER_ID_UNSPECIFIEDValue of -1: signifies the Server ID is unspecified.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description voiddeleteField(java.lang.String fieldName)Deletes the named field entry.java.lang.StringgetEMailAddress()Gets the email address of the current user.intgetFieldType(java.lang.String fieldName)Returns the basic field type of the specified field name.java.lang.ObjectgetFieldValue(java.lang.String fieldName)Returns an Object representing the specified field name.static java.lang.StringgetLocalizedString(int theNotificationType)Gets a localized representation of the notification type.java.lang.StringgetName()Returns the name of the current user.VWParticipantgetNamePx()Returns the VWParticipant security object for the current user.intgetNotificationFlags()Gets the number that represents all the notification type settings (indicated by NOTIFICATION_*) for this instance.java.util.LocalegetPreferredLocale()Gets the preferred locale to be used for email notification.java.lang.StringgetProxyUserName()Gets the proxy user name as a String.VWParticipantgetProxyUserNamePx()Gets the proxy user name as an instance of a VWParticipant object.intgetServerAssignment()Deprecated.BPM 4.0 release farming does not support multiple serversbooleanisFieldArray(java.lang.String fieldName)Indicates whether a field is an array.static booleanisValid(int theNotificationType)Indicates whether the specified notification type is valid.voidsave()Saves the values set for this instance.voidsetEMailAddress(java.lang.String theEMailAddress)Sets the email address for the current user.voidsetFieldValue(java.lang.String fieldName, java.lang.Object fieldValue)Creates, deletes, or updates a field for this instance.voidsetName(java.lang.String theUserName)Deprecated.VWUserInfo records are created on the server, the name cannot be changedvoidsetNotificationFlags(int theFlags)Sets the notification flag settings for this instance.voidsetPreferredLocale(java.util.Locale myLocale)Sets the preferred locale to be used for client email notification.voidsetProxyUserName(java.lang.String theUserName)Sets the proxy user name for this instance, within the default domain.voidsetProxyUserNameByDomain(java.lang.String theDomainName, java.lang.String theUserName)Sets the proxy user name for this user information object.voidsetServerAssignment(int theServerId)Deprecated.BPM 4.0 release farming does not support multiple serversjava.lang.StringtoString()Returns the String version of the user name for this instance.voidtoXML(java.lang.StringBuffer theBuffer)Appends an XML string representing this instance to the buffer specified.
-
-
-
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
-
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 VWExceptionSets 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 VWExceptionDeprecated. VWUserInfo records are created on the server, the name cannot be changedSets 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 VWExceptionGets 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 VWExceptionSets 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 VWExceptionSets 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 VWExceptionCreates, deletes, or updates a field for this instance. The action taken depends on the input parameters as follows:- If the field specified in the fieldName parameter does not already exist, this method creates a new field whose type matches that of the object specified in the fieldValue parameter.
- If the fieldValue parameter is null and the field specified by the fieldName parameter exists, this method removes the named field.
- If the field specified in the fieldName parameter exists and the fieldValue parameter is not null, this method sets the specified field to the fieldValue object's type and value.
- 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:
VWUserInfo.getFieldType(java.lang.String),VWFieldType
-
getFieldValue
public java.lang.Object getFieldValue(java.lang.String fieldName) throws VWExceptionReturns 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:
VWUserInfo.getFieldType(java.lang.String)
-
getFieldType
public int getFieldType(java.lang.String fieldName) throws VWExceptionReturns 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 VWExceptionIndicates 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 VWExceptionDeletes 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 VWExceptionSets 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 serversGets 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 VWExceptionDeprecated. BPM 4.0 release farming does not support multiple serversAssigns 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 VWExceptionSaves 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:
toStringin classjava.lang.Object- Returns:
- The current user name.
-
getLocalizedString
public static java.lang.String getLocalizedString(int theNotificationType) throws VWExceptionGets 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 VWExceptionAppends 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:
toXMLin interfaceIVWtoXML- 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 VWExceptionSets 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 VWExceptionGets 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()
-
-