ALBPM Process API

fuego.papi
Class VarDefinition

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

public class VarDefinition
extends Object
implements Serializable

This class contains all the information related with a process variable. Apart from the id, type, mask, and size of the variable, this class can provide the label related to any given location specified (on demand).

See Also:
Serialized Form

Field Summary
static String ACTIVITY_DEADLINE_ID
          The id of the default variable "Activity Deadline"
static String ACTIVITY_ID
          The id of the default variable "Activity"
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 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 DEADLINE_ID
          The id of the default variable "Deadline"
static String DESCRIPTION_ID
          The id of the default variable "Description"
static String DOCUMENTATION_ID
          The id of the default variable "Deadline"
static String FILENAME_ID
          The id of the default variable "Filename" for an Attachment
static String HAS_ATTACHMENTS
          If the instance has or not attachments
static String HAS_NOTES
          If the instance has or not notes
static String INSTANCE_NUMBER
          The id of the default variable "Process Instance Number" for an Instance
static String LOCKER_ID
          The id of the default variable "Locker" for an Attachment
static String MAIN_TASK_PARTICIPANT_ID
          The participant which has the instance main task selected
static String NAME_ID
          The id of the default variable "Name" for an Attachment
static String PARENT_COPY_ID
          The id of the default variable "Parent copy or thread" for an Instance
static String PARTICIPANT_ID
          The id of the default variable "Participant"
static String PRIORITY_ID
          The id of the default variable "Priority"
static String PROCESS_DEADLINE_ID
          The id of the default variable "Process Deadline"
static String PROCESS_ID
          The id of the default variable "Process"
static String RECEIVED_ID
          The id of the default variable "Received"
static String SIZE_ID
          The id of the default variable "Size" for an Attachment
static String STATUS_ID
          The id of the default variable "Status"
static String TASK_ID
          The id of the default variable "Task" for an Activity
static String VERSION_ID
          The id of the default variable "Version" for an Attachment
 
Constructor Summary
VarDefinition(String varId, int varKind, String varMask, int varSize, int varFractionSize, Map varLabels)
           
VarDefinition(String varId, int varKind, String varMask, int varSize, Map varLabels)
           
 
Method Summary
static VarDefinition[] createApplicationDefaults()
          This methos returns the default variable definitions for an Application.
static VarDefinition[] createAttachmentDefaults()
          This methos returns the default variable definitions for an Attachment.
static VarDefinition[] createInstanceDefaults()
          This methos returns the default variable definitions for an Instance.
static String getDatabaseColumnName(String varId)
          Returns the database column name of the variable.
static SortedMap<String,VarDefinition> getDefaultVarDefinition()
          Return all defautl variables definition
static VarDefinition getDefaultVarDefinition(String variableId)
          Return a specific VarDefinition (Only for default variables, not incluide external variables).
 int getFractionSize()
          This method returns the specific size of the instance variable fraction part.
 String getId()
          This method returns the identificator of this variable.
 int getKind()
          This method returns the Kind of the variable.
 String getLabel(Locale locale)
          This method returns the label of the variable for the given location.
 Map getLabels()
          Returns all labels for this variable
 String getMask()
          This method returns a mask, usefull to print the value of this variable for any given instance.
 fuego.resources.Msg getMsg()
          Returns the Msg with all labels for this variable.
 int getSize()
          This method returns 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.

 boolean isExternal()
          External variable or not
static boolean isExternal(String variableId)
          Return if the variable identification is external vairable or not.
 void setFractionSize(int size)
          This method sets the specific size of the instance variable fraction part.
 void setSize(int size)
          This method sets the specific 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.

 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DESCRIPTION_ID

@NonNls
public static final String DESCRIPTION_ID
The id of the default variable "Description"

See Also:
Constant Field Values

STATUS_ID

@NonNls
public static final String STATUS_ID
The id of the default variable "Status"

See Also:
Constant Field Values

PRIORITY_ID

@NonNls
public static final String PRIORITY_ID
The id of the default variable "Priority"

See Also:
Constant Field Values

DEADLINE_ID

@NonNls
public static final String DEADLINE_ID
The id of the default variable "Deadline"

See Also:
Constant Field Values

DOCUMENTATION_ID

@NonNls
public static final String DOCUMENTATION_ID
The id of the default variable "Deadline"

See Also:
Constant Field Values

RECEIVED_ID

@NonNls
public static final String RECEIVED_ID
The id of the default variable "Received"

See Also:
Constant Field Values

PROCESS_DEADLINE_ID

@NonNls
public static final String PROCESS_DEADLINE_ID
The id of the default variable "Process Deadline"

See Also:
Constant Field Values

ACTIVITY_DEADLINE_ID

@NonNls
public static final String ACTIVITY_DEADLINE_ID
The id of the default variable "Activity Deadline"

See Also:
Constant Field Values

PROCESS_ID

@NonNls
public static final String PROCESS_ID
The id of the default variable "Process"

See Also:
Constant Field Values

ACTIVITY_ID

@NonNls
public static final String ACTIVITY_ID
The id of the default variable "Activity"

See Also:
Constant Field Values

PARTICIPANT_ID

@NonNls
public static final String PARTICIPANT_ID
The id of the default variable "Participant"

See Also:
Constant Field Values

COPY_ID

@NonNls
public static final String COPY_ID
The id of the default variable "Copy"

See Also:
Constant Field Values

TASK_ID

@NonNls
public static final String TASK_ID
The id of the default variable "Task" for an Activity

See Also:
Constant Field Values

AUTHOR_ID

@NonNls
public static final String AUTHOR_ID
The id of the default variable "Author" for an Instance

See Also:
Constant Field Values

AUTHOR_DISPLAYNAME

@NonNls
public static String AUTHOR_DISPLAYNAME
The Display Name of the default variable "Author" for an Instance


CREATION_TIME_ID

@NonNls
public static final String CREATION_TIME_ID
The id of the default variable "Creation time" for an Instance

See Also:
Constant Field Values

PARENT_COPY_ID

@NonNls
public static final String PARENT_COPY_ID
The id of the default variable "Parent copy or thread" for an Instance

See Also:
Constant Field Values

INSTANCE_NUMBER

@NonNls
public static final String INSTANCE_NUMBER
The id of the default variable "Process Instance Number" for an Instance

See Also:
Constant Field Values

NAME_ID

@NonNls
public static final String NAME_ID
The id of the default variable "Name" for an Attachment

See Also:
Constant Field Values

CREATOR_ID

@NonNls
public static final String CREATOR_ID
The id of the default variable "Creator" for an Attachment

See Also:
Constant Field Values

VERSION_ID

@NonNls
public static final String VERSION_ID
The id of the default variable "Version" for an Attachment

See Also:
Constant Field Values

FILENAME_ID

@NonNls
public static final String FILENAME_ID
The id of the default variable "Filename" for an Attachment

See Also:
Constant Field Values

LOCKER_ID

@NonNls
public static final String LOCKER_ID
The id of the default variable "Locker" for an Attachment

See Also:
Constant Field Values

SIZE_ID

@NonNls
public static final String SIZE_ID
The id of the default variable "Size" for an Attachment

See Also:
Constant Field Values

HAS_ATTACHMENTS

@NonNls
public static final String HAS_ATTACHMENTS
If the instance has or not attachments

See Also:
Constant Field Values

HAS_NOTES

@NonNls
public static String HAS_NOTES
If the instance has or not notes


MAIN_TASK_PARTICIPANT_ID

@NonNls
public static String MAIN_TASK_PARTICIPANT_ID
The participant which has the instance main task selected

Constructor Detail

VarDefinition

public VarDefinition(String varId,
                     int varKind,
                     String varMask,
                     int varSize,
                     Map varLabels)

VarDefinition

public VarDefinition(String varId,
                     int varKind,
                     String varMask,
                     int varSize,
                     int varFractionSize,
                     Map varLabels)
Method Detail

getDatabaseColumnName

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

Parameters:
varId - The variable Id to obtain the database column name
Returns:
A String with the database column name.

getDefaultVarDefinition

public static SortedMap<String,VarDefinition> getDefaultVarDefinition()
Return all defautl variables definition

Returns:
An array VarDefinition

getDefaultVarDefinition

public static VarDefinition getDefaultVarDefinition(String variableId)
Return a specific VarDefinition (Only for default variables, not incluide external variables).

Parameters:
variableId -
Returns:
the VarDefinition

isExternal

public static boolean isExternal(String variableId)
Return if the variable identification is external vairable or not.

Parameters:
variableId -
Returns:
true if it is External

createApplicationDefaults

public static VarDefinition[] createApplicationDefaults()
This methos returns the default variable definitions for an Application. These are (same order than the returned array): TASK DESCRIPTION PROCESS


createAttachmentDefaults

public static VarDefinition[] createAttachmentDefaults()
This methos returns the default variable definitions for an Attachment. These are (same order than the returned array): NAME VERSION CREATOR SIZE FILENAME LOCKER


createInstanceDefaults

public static VarDefinition[] createInstanceDefaults()
This methos returns the default variable definitions for an Instance. These are (same order than the returned array): PRIORITY ATTACHMENTS NOTES DESCRIPTION PROCESS ACTIVITY STATUS RECEIVED DEADLINE PROCESS_DEADLINE ACTIVITY_DEADLINE PARTICIPANT COPY PARENT_COPY INSTANCE_NUMBER


setFractionSize

public void setFractionSize(int size)
This method sets the specific size of the instance variable fraction part. You should only use this method for DECIMAL variables.

Parameters:
size - The new size of the variable.

getFractionSize

public int getFractionSize()
This method returns the specific size of the instance variable fraction part. If the variable is not a DECIMAL, 0 is returned.

Returns:
int The size of the variable fraction part.

getId

public String getId()
This method returns the identificator of this variable.

Returns:
String The identificator of this variable

getKind

public int getKind()
This method returns the Kind of the variable. In order to find out what the number means, it must be used the class fuego.lang.Kind.

Returns:
int The kind of the variable

getLabel

public String getLabel(Locale locale)
This method returns the label of the variable for the given location. The label represents the name of the variable, but it cannot be used in order to perform any operation with the variable over an instance. In those cases the id must be used ( @see getId() ).

Parameters:
locale - The location where to find the label
Returns:
String The name of the variable for the given location

getLabels

public Map getLabels()
Returns all labels for this variable

Returns:
labels for this variable

getMask

public String getMask()
This method returns a mask, usefull to print the value of this variable for any given instance.

Returns:
String The mask for the variable

setSize

public void setSize(int size)
This method sets the specific 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 - The new size of the variable.

getSize

public int getSize()
This method returns 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:
int The size of the variable.

isExternal

public boolean isExternal()
External variable or not

Returns:
true if the variable is an external variable

getMsg

public fuego.resources.Msg getMsg()
Returns the Msg with all labels for this variable. null if the varible is external.

Returns:
Msg with all labels. null if the varible is external.

ALBPM Process API

© Copyright 1996/2005 Fuego Inc. All Rights Reserved