ALBPM Process API (PAPI)

fuego.papi
Class VarDefinition

java.lang.Object
  extended byfuego.papi.VarDefinition
All Implemented Interfaces:
Serializable

public class VarDefinition
extends Object
implements Serializable

VarDefinition contains all information related to a process variable.

In addition to the ID, type, mask, and size of the variable, this class can provide the label for a selected location (on demand).

See Also:
Serialized Form

Field Summary
static String ACTIVITY_DEADLINE_ID
          The ID of the default variable "Activity Deadline".
static String ACTIVITY_DEADLINE_ID45
          Deprecated. use ACTIVITY_DEADLINE_ID instead
static String ACTIVITY_ID
          The ID of the default variable "Activity".
static String ACTIVITY_ID45
          Deprecated. use ACTIVITY_ID instead
static String AUTHOR_DISPLAYNAME
          The Display Name of the default variable "Author" for an instance.
static String AUTHOR_ID
          The ID of the default variable "Author" for an instance.
static String COPY_ID
          The ID of the default variable "Copy".
static String COPY_ID45
          Deprecated. use COPY_ID instead
static String CREATION_TIME_ID
          The ID of the default variable "Creation Time" for an instance.
static String CREATOR_ID
          The ID of the default variable "Creator" for an attachment.
static String CREATOR_ID45
          Deprecated. use CREATOR_ID instead
static String DEADLINE_ID
          The ID of the default variable "Deadline".
static String DEADLINE_ID45
          Deprecated. use DEADLINE_ID instead
static String DESCRIPTION_ID
          The ID of the default variable "Description".
static String DESCRIPTION_ID45
          Deprecated. use DESCRIPTION_ID instead
static String FILENAME_ID
          The ID of the default variable "Filename" for an attachment.
static String FILENAME_ID45
          Deprecated. use FILENAME_ID instead
static String HAS_ATTACHMENTS
          Indicates whether or not the instance has attachments.
static String HAS_NOTES
          Indicates whether or not the instance has notes.
static String INSTANCE_NUMBER
          The ID of the default variable "Instance Number".
static String LOCKER_ID
          The ID of the default variable "Locker" for an attachment.
static String LOCKER_ID45
          Deprecated. use LOCKER_ID instead
static String MAIN_TASK_PARTICIPANT_ID
          The ID of the participant who has selected main task for an instance.
static String NAME_ID
          The ID of the default variable "Name" for an attachment.
static String NAME_ID45
          Deprecated. use NAME_ID instead
static String PARTICIPANT_ID
          The ID of the default variable "Participant".
static String PARTICIPANT_ID45
          Deprecated. use PARTICIPANT_ID instead
static String PRIORITY_ID
          The ID of the default variable "Priority".
static String PRIORITY_ID45
          Deprecated. use PRIORITY_ID instead
static String PROCESS_DEADLINE_ID
          The ID of the default variable "Process Deadline".
static String PROCESS_DEADLINE_ID45
          Deprecated. use PROCESS_DEADLINE_ID instead
static String PROCESS_ID
          The ID of the default variable "Process".
static String PROCESS_ID45
          Deprecated. use PROCESS_ID instead
static String RECEIVED_ID
          The ID of the default variable "Received".
static String RECEIVED_ID45
          Deprecated. use RECEIVED_ID instead
static String SIZE_ID
          The ID of the default variable "Size" for an attachment.
static String SIZE_ID45
          Deprecated. use SIZE_ID instead
static String STATUS_ID
          The ID of the default variable "Status".
static String STATUS_ID45
          Deprecated. use STATUS_ID instead
static String TASK_ID
          The ID of the default variable "Task" for an activity.
static String TASK_ID45
          Deprecated. use TASK_ID instead
static String VERSION_ID
          The ID of the default variable "Version" for an attachment.
static String VERSION_ID45
          Deprecated. use VERSION_ID instead
 
Constructor Summary
VarDefinition(String varId, int varKind, String varMask, int varSize, int varFractionSize, Map varLabels)
          Creates a new VarDefinition object with a decimal part.
VarDefinition(String varId, int varKind, String varMask, int varSize, Map varLabels)
          Creates a new VarDefinition object.
 
Method Summary
static VarDefinition[] createApplicationDefaults()
          Creates the default variable definitions for an application.
static VarDefinition[] createAttachmentDefaults()
          Creates the default variable definitions for an attachment.
static VarDefinition[] createInstanceDefaults()
          Creates the default variable definitions for an instance.
static String getDatabaseColumnName(String varId)
          Gets the database column name of the variable.
static SortedMap getDefaultVarDefinition()
          Gets all default variable definitions.
static VarDefinition getDefaultVarDefinition(String variableId)
          Gets a specific VarDefinition for default variables.
 int getFractionSize()
          Gets the size of the fractional part of the instance variable.
 String getId()
          Gets the identifier for this variable.
 int getKind()
          Gets the kind of the variable.
 String getLabel(Locale locale)
          Gets the label of the variable for the given location.
 String getMask()
          Gets a mask, which is useful for printing the value of this variable for any given instance.
 int getSize()
          Gets the specific size of the instance variable.
 boolean isExternal()
          Returns true if the variable is an external variable.
static boolean isExternal(String variableId)
          Returns true if the variable identification is an external variable.
 void setFractionSize(int size)
          Sets the size of the fractional part of the instance variable.
 void setSize(int size)
          Sets the size of the instance variable.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DESCRIPTION_ID45

public static String DESCRIPTION_ID45
Deprecated. use DESCRIPTION_ID instead

The ID of the default variable "Description".


STATUS_ID45

public static String STATUS_ID45
Deprecated. use STATUS_ID instead

The ID of the default variable "Status".


PRIORITY_ID45

public static String PRIORITY_ID45
Deprecated. use PRIORITY_ID instead

The ID of the default variable "Priority".


DEADLINE_ID45

public static String DEADLINE_ID45
Deprecated. use DEADLINE_ID instead

The ID of the default variable "Deadline".


RECEIVED_ID45

public static String RECEIVED_ID45
Deprecated. use RECEIVED_ID instead

The ID of the default variable "Received".


PROCESS_DEADLINE_ID45

public static String PROCESS_DEADLINE_ID45
Deprecated. use PROCESS_DEADLINE_ID instead

The ID of the default variable "Process Deadline".


ACTIVITY_DEADLINE_ID45

public static String ACTIVITY_DEADLINE_ID45
Deprecated. use ACTIVITY_DEADLINE_ID instead

The ID of the default variable "Activity Deadline".


PROCESS_ID45

public static String PROCESS_ID45
Deprecated. use PROCESS_ID instead

The ID of the default variable "Process".


ACTIVITY_ID45

public static String ACTIVITY_ID45
Deprecated. use ACTIVITY_ID instead

The ID of the default variable "Activity".


PARTICIPANT_ID45

public static String PARTICIPANT_ID45
Deprecated. use PARTICIPANT_ID instead

The ID of the default variable "Participant".


COPY_ID45

public static String COPY_ID45
Deprecated. use COPY_ID instead

The ID of the default variable "Copy".


TASK_ID45

public static String TASK_ID45
Deprecated. use TASK_ID instead

The ID of the default variable "Task" for an activity.


NAME_ID45

public static String NAME_ID45
Deprecated. use NAME_ID instead

The ID of the default variable "Name" for an attachment.


CREATOR_ID45

public static String CREATOR_ID45
Deprecated. use CREATOR_ID instead

The ID of the default variable "Creator" for an attachment.


VERSION_ID45

public static String VERSION_ID45
Deprecated. use VERSION_ID instead

The ID of the default variable "Version" for an attachment.


FILENAME_ID45

public static String FILENAME_ID45
Deprecated. use FILENAME_ID instead

The ID of the default variable "Filename" for an attachment.


LOCKER_ID45

public static String LOCKER_ID45
Deprecated. use LOCKER_ID instead

The ID of the default variable "Locker" for an attachment.


SIZE_ID45

public static String SIZE_ID45
Deprecated. use SIZE_ID instead

The ID of the default variable "Size" for an attachment.


DESCRIPTION_ID

public static String DESCRIPTION_ID
The ID of the default variable "Description".


STATUS_ID

public static String STATUS_ID
The ID of the default variable "Status".


PRIORITY_ID

public static String PRIORITY_ID
The ID of the default variable "Priority".


DEADLINE_ID

public static String DEADLINE_ID
The ID of the default variable "Deadline".


RECEIVED_ID

public static String RECEIVED_ID
The ID of the default variable "Received".


PROCESS_DEADLINE_ID

public static String PROCESS_DEADLINE_ID
The ID of the default variable "Process Deadline".


ACTIVITY_DEADLINE_ID

public static String ACTIVITY_DEADLINE_ID
The ID of the default variable "Activity Deadline".


PROCESS_ID

public static String PROCESS_ID
The ID of the default variable "Process".


ACTIVITY_ID

public static String ACTIVITY_ID
The ID of the default variable "Activity".


PARTICIPANT_ID

public static String PARTICIPANT_ID
The ID of the default variable "Participant".


COPY_ID

public static String COPY_ID
The ID of the default variable "Copy".


TASK_ID

public static String TASK_ID
The ID of the default variable "Task" for an activity.


AUTHOR_ID

public static String AUTHOR_ID
The ID of the default variable "Author" for an instance.


AUTHOR_DISPLAYNAME

public static String AUTHOR_DISPLAYNAME
The Display Name of the default variable "Author" for an instance.


CREATION_TIME_ID

public static String CREATION_TIME_ID
The ID of the default variable "Creation Time" for an instance.


NAME_ID

public static String NAME_ID
The ID of the default variable "Name" for an attachment.


CREATOR_ID

public static String CREATOR_ID
The ID of the default variable "Creator" for an attachment.


VERSION_ID

public static String VERSION_ID
The ID of the default variable "Version" for an attachment.


FILENAME_ID

public static String FILENAME_ID
The ID of the default variable "Filename" for an attachment.


LOCKER_ID

public static String LOCKER_ID
The ID of the default variable "Locker" for an attachment.


SIZE_ID

public static String SIZE_ID
The ID of the default variable "Size" for an attachment.


HAS_ATTACHMENTS

public static String HAS_ATTACHMENTS
Indicates whether or not the instance has attachments.


INSTANCE_NUMBER

public static String INSTANCE_NUMBER
The ID of the default variable "Instance Number".


MAIN_TASK_PARTICIPANT_ID

public static String MAIN_TASK_PARTICIPANT_ID
The ID of the participant who has selected main task for an instance.


HAS_NOTES

public static String HAS_NOTES
Indicates whether or not the instance has notes.

Constructor Detail

VarDefinition

public VarDefinition(String varId,
                     int varKind,
                     String varMask,
                     int varSize,
                     Map varLabels)
Creates a new VarDefinition object.

Parameters:
varId - ID of the variable
varKind - kind of the variable (see fuego.lang.Kind)
varMask - mask of the variable
varSize - size of the variable
varLabels - map with the labels of the variable, where the key is the language and the value is the label for that language

VarDefinition

public VarDefinition(String varId,
                     int varKind,
                     String varMask,
                     int varSize,
                     int varFractionSize,
                     Map varLabels)
Creates a new VarDefinition object with a decimal part.

Parameters:
varId - ID of the variable
varKind - kind of the variable (see fuego.lang.Kind)
varMask - mask of the variable
varSize - size of the variable
varFractionSize - fraction size of the variable
varLabels - map with the labels of the variable, where the key is the language and the value is the label for that language
Method Detail

getDatabaseColumnName

public static String getDatabaseColumnName(String varId)
Gets the database column name of the variable.

Parameters:
varId - the variable ID used to obtain the database column name
Returns:
database column name an empty string if the database column name does not exist

getDefaultVarDefinition

public static SortedMap getDefaultVarDefinition()
Gets all default variable definitions.

Returns:
an array VarDefinition

getDefaultVarDefinition

public static VarDefinition getDefaultVarDefinition(String variableId)
Gets a specific VarDefinition for default variables. For external variables, use ProcessServiceNESession#getVar().

Parameters:
variableId - ID of the variable to obtain
Returns:
the VarDefinition

isExternal

public static boolean isExternal(String variableId)
Returns true if the variable identification is an external variable.

Parameters:
variableId - ID of the variable to check
Returns:
true if it is external

createApplicationDefaults

public static VarDefinition[] createApplicationDefaults()
Creates the default variable definitions for an application.

These are (in the same order as the returned array):

Returns:
default application variables

createAttachmentDefaults

public static VarDefinition[] createAttachmentDefaults()
Creates the default variable definitions for an attachment.

These are (in the same order as the returned array):

Returns:
default attachment variables

createInstanceDefaults

public static VarDefinition[] createInstanceDefaults()
Creates the default variable definitions for an instance.

These are (in the same order as the returned array):

Returns:
default instance variables

isExternal

public boolean isExternal()
Returns true if the variable is an external variable.

Returns:
true if the variable is an external variable

setFractionSize

public void setFractionSize(int size)
Sets the size of the fractional part of the instance variable.

This method should only be used for DECIMAL variables.

Parameters:
size - the new size of the variable

getFractionSize

public int getFractionSize()
Gets the size of the fractional part of the instance variable.

If the variable is not a DECIMAL, 0 is returned.

Returns:
size of the fractional part of the instance variable

getId

public String getId()
Gets the identifier for this variable.

Returns:
identifier for this variable

getKind

public int getKind()
Gets the kind of the variable.

In order to find out what the number means, the fuego.lang.Kind class must be used.

Returns:
kind of the variable

getLabel

public String getLabel(Locale locale)
Gets the label of the variable for the given location.

The label represents the name of the variable, but it cannot be used to perform an operation with the variable over an instance. To perform operations over an instance using the variable, the ID must be used getId().

Parameters:
locale - the desired locale
Returns:
name of the variable for the given location

getMask

public String getMask()
Gets a mask, which is useful for printing the value of this variable for any given instance.

Returns:
mask for the variable

setSize

public void setSize(int size)
Sets the size of the instance variable.

In case the type of the varible is DECIMAL, the value passed to this method represents both int + fraction size.
In order to set the fraction size, see getFractionSize().

Parameters:
size - new size of the variable

getSize

public int getSize()
Gets the specific size of the instance variable.

In case the type of the varible is DECIMAL, the value returned by this method represents both int + fraction size.
In order to obtain the fraction size, see getFractionSize().

Returns:
size of the variable

ALBPM Process API (PAPI)

© Copyright 1996/2005 Fuego Inc. All Rights Reserved