Agentflow
V3.1

pe.pase
Class Artifact

java.lang.Object
  extended by pe.pase.Artifact
All Implemented Interfaces:
com.flowring.entity.Entity, java.io.Serializable
Direct Known Subclasses:
AFArtifact

public class Artifact
extends java.lang.Object
implements java.io.Serializable, com.flowring.entity.Entity

An abstract representation of Artifact.

The Artifact is defined as the electronic-document operated by end-users in Agentflow System. It can be described by its logic and form. The former describes the hidden information used for Agentflow System and the later is the facade of the document used for display.

The Logical Information:

The logical information described the ArtifactID, ArtifactName, ArtifactSynopsis, relationship between Artifacts, and ArtifactState. The ArtifactState is used to determine the routing of the Artifact in the Agentflow System. For example, consider the Process 'payment' of the Work Flow 'purchasing'. (Please reference pe.pase.DBProcess to get the detail of the example.) In the Process, the user can pay by credit card, check, cash, and so on. Then, the Process invoked next depends on the type of payment. Therefore, the Agentflow System uses the ArtifactState to define the different "State" of the Process.(The usage of ArtifactState rather than ProcessState is because the state is determined by the content of Artifact.)

The detail of fields to describe the Artifact logical information are listed below:

Descriptor Comment
ArtifactID the identifier of Artifact in the Agentflow System
ArtifactSerialNo the user-defined serial number of the Artifact
ArtifactName the name of the Artifact
ArtifactSynopsis the comment of the Artifact
ProjectID the ID of attached project
ProcessInfoSpec the guide to describe how to execute the Process
ParentArtifactID the ID of parent Artifact
SubArtifactID the ID of sub Artifact
ArtifactState the ArtifactState
InitArtifactState the initial ArtifactState of the artifact

The ParentArtifactID and SubArtifactID is reserved to the future extension of Artifact-Composition.

The form Information:

The form of Artifact is composed by several Component, such as the TextField, the ComboBox, the Label, and so on. The form defined in Artiface can be regarded as a UI "Template". It defines the facade, behavior, and related-coordinate of each Componetns by a list of data objects. The detail of the data object can reference pe.pase.ArtFormItem.

Besides the ArtFormItem, the EnableScript and VisibleScript is the other two form-related field. They are used to indicate the properties of editable and visible of each Component at different ArtifactState.(The 'ediable' means the component is visible but is not editable). The fields are String with format as following: [columnName=State1,State2,State3,...][TextField1=1,1,1,...][CheckBox1=1,0,0,...]...

At the last, the Agentflow System will initiate the Artifact Instance while the execution time. Please reference the class pe.pase.PASEartInstance.

Since:
version 1.0.0
Version:
1.1.5,
Author:
yschen@flowring.com
See Also:
DBProcess, ArtFormItem, PASEartInstance, Serialized Form

Field Summary
static int CUSTOM_TYPE
           
static int CUSTOMAP_TYPE
           
static java.lang.String DEFAULT_VALUE_EXECUTE_TIME
           
static java.lang.String DEFAULT_VALUE_FUNC_VAR
           
static java.lang.String EXECUTE_TIME_EVERY
           
static java.lang.String EXECUTE_TIME_FIRST
           
static java.lang.String EXECUTE_TIME_INITIAL
           
static java.lang.String EXECUTE_TIME_NEVER
           
static int JAVA_TYPE
           
static int JSP_TYPE
           
 
Constructor Summary
Artifact()
           
Artifact(java.lang.String aID)
          Constructor.
 
Method Summary
 void addArtMultiLanguage(ArtMultiLanguage item)
           
 void addArtState(PASEartState state)
          Add a artifact state.
 void addSubArtifactID(java.lang.String artID)
          Add a subartifact id.
 ArtFormItem getArtFormItem(java.lang.String itemName)
          Get the artifact form item by name
 ArtFormItem getArtFormItemById(java.lang.String itemId)
          Get the artifact form item by item_id
 java.util.Vector getArtFormItemList()
          Get the list of artifact form item
 java.lang.String getArtifactID()
          Get the artifact id
 java.util.Map getArtMultiLanguage()
           
 java.util.Vector getArtStateList()
          Get the list of artifact state
 java.lang.String getDefaultValueScript()
           
 java.lang.String getEnableScript()
          Get the enable script.
 java.lang.String getExecutableDVScript()
           
 byte[] getFormSnapshot()
           
 java.lang.Object getHashKey()
           
 java.lang.String getID()
          Get the artifact id
 java.lang.String getInitStateID()
          Get the initial artifact state id
 java.lang.String getInstanceIDEncoding()
          Get the format of serial number.
 java.util.HashMap getJarFileMap()
           
 MobileForm getMobileFormByArtStateName(java.lang.String astName)
           
 java.util.Vector<MobileForm> getMobileForms()
           
 java.lang.String getName()
          Get the artifact name
 java.lang.String getParentID()
          Get the id of parent
 java.lang.String getProjectID()
          Get the id of project which owns this artifact.
 byte[] getScriptAdaptorJarFile()
           
 java.util.Vector getSubArtifactIDList()
          Get the list of subartifact
 java.lang.String getSynopsis()
           
 int getType()
           
 java.lang.String getVisibleScript()
          Get the visible script.
 boolean isVersion2()
           
 void removeArtMultiLanguage(ArtMultiLanguage item)
           
 boolean removeArtStateID(PASEartState state)
          Remove a artifact state.
 boolean removeSubArtifactID(java.lang.String artID)
          Remove a subartifact id.
 void setArtifactID(java.lang.String id)
          Set the artifact id
 void setArtMultiLanguage(java.util.Map map)
           
 void setArtStateList(java.util.Vector prList)
          Set the list of artifact state
 void setDefaultValueScript(java.lang.String script)
           
 void setEnableScript(java.lang.String script)
          Set the enable script.
 void setExecutableDVScript(java.lang.String script)
           
 void setFormSnapshot(byte[] fs)
           
 void setID(java.lang.String id)
          Set the artifact id
 void setInitStateID(java.lang.String state)
          Set the initial artifact state id
 void setInstanceIDEncoding(java.lang.String encoding)
          Set the format of artifact serial number.
 void setJarFileMap(java.util.HashMap hm)
           
 void setMobileForms(java.util.Vector<MobileForm> mobileForms)
           
 void setName(java.lang.String name)
          Set the artifact name
 void setParentID(java.lang.String parentID)
          Set the id of parent
 void setProjectID(java.lang.String id)
          Set the id of project which owns this artifact
 void setScriptAdaptorJarFile(byte[] bs)
           
 void setSubArtifactIDList(java.util.Vector prList)
          Set the list of subartifact
 void setSynopsis(java.lang.String desc)
          Set the artifact synopsis
 void setType(int newType)
           
 void setVersion2(boolean version2)
           
 void setVisibleScript(java.lang.String script)
          Set the visible script.
 void update(java.lang.Object obj)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CUSTOM_TYPE

public static final int CUSTOM_TYPE
See Also:
Constant Field Values

CUSTOMAP_TYPE

public static final int CUSTOMAP_TYPE
See Also:
Constant Field Values

DEFAULT_VALUE_EXECUTE_TIME

public static final java.lang.String DEFAULT_VALUE_EXECUTE_TIME
See Also:
Constant Field Values

DEFAULT_VALUE_FUNC_VAR

public static final java.lang.String DEFAULT_VALUE_FUNC_VAR
See Also:
Constant Field Values

EXECUTE_TIME_EVERY

public static final java.lang.String EXECUTE_TIME_EVERY
See Also:
Constant Field Values

EXECUTE_TIME_FIRST

public static final java.lang.String EXECUTE_TIME_FIRST
See Also:
Constant Field Values

EXECUTE_TIME_INITIAL

public static final java.lang.String EXECUTE_TIME_INITIAL
See Also:
Constant Field Values

EXECUTE_TIME_NEVER

public static final java.lang.String EXECUTE_TIME_NEVER
See Also:
Constant Field Values

JAVA_TYPE

public static final int JAVA_TYPE
See Also:
Constant Field Values

JSP_TYPE

public static final int JSP_TYPE
See Also:
Constant Field Values
Constructor Detail

Artifact

public Artifact()

Artifact

public Artifact(java.lang.String aID)
Constructor. Construct a instance of Artifact with the specified artifact id.

Parameters:
id - the artifact id
Since:
version 1.0.0
Method Detail

addArtMultiLanguage

public void addArtMultiLanguage(ArtMultiLanguage item)

addArtState

public void addArtState(PASEartState state)
Add a artifact state.

Parameters:
state - the given state
Since:
version 1.0.0
See Also:
PASEartState

addSubArtifactID

public void addSubArtifactID(java.lang.String artID)
Add a subartifact id.

Parameters:
artID - the given id
Since:
version 1.0.0

getArtFormItem

public ArtFormItem getArtFormItem(java.lang.String itemName)
Get the artifact form item by name

Returns:
the ArtFormItem.
Since:
version 2.0.0
See Also:
ArtFormItem

getArtFormItemById

public ArtFormItem getArtFormItemById(java.lang.String itemId)
Get the artifact form item by item_id

Returns:
the ArtFormItem.
Since:
version 2.0.0
See Also:
ArtFormItem

getArtFormItemList

public java.util.Vector getArtFormItemList()
Get the list of artifact form item

Returns:
the list. (each element in Vector is instance of ArtFormItem)
Since:
version 1.0.0
See Also:
ArtFormItem

getArtifactID

public java.lang.String getArtifactID()
Get the artifact id

Returns:
the id
Since:
version 1.0.0

getArtMultiLanguage

public java.util.Map getArtMultiLanguage()
Returns:
all ArtMultiLanguage of the artifact's components
Since:
version 3.0
See Also:
ArtMultiLanguage

getArtStateList

public java.util.Vector getArtStateList()
Get the list of artifact state

Returns:
the list. (each element in Vector is a instance of PASEartState)
Since:
version 1.0.0
See Also:
PASEartState

getDefaultValueScript

public java.lang.String getDefaultValueScript()

getEnableScript

public java.lang.String getEnableScript()
Get the enable script. The script represents which components are enabled at some stages.

Returns:
the enable script
Since:
version 1.0.0

getExecutableDVScript

public java.lang.String getExecutableDVScript()

getFormSnapshot

public byte[] getFormSnapshot()

getHashKey

public java.lang.Object getHashKey()
Specified by:
getHashKey in interface com.flowring.entity.Entity

getID

public java.lang.String getID()
Get the artifact id

Returns:
the id
Since:
version 1.0.0

getInitStateID

public java.lang.String getInitStateID()
Get the initial artifact state id

Returns:
the state id
Since:
version 1.0.0

getInstanceIDEncoding

public java.lang.String getInstanceIDEncoding()
Get the format of serial number. The serial number could be composed by different field of the artifact or the attached task. The fields include: %M : member id which is user-define %R : role id which is user-define %D : department id which is user-define %P : project id which is user-define %lS: 'l' is the length of the artifact instance id 'S' is the artifact instance id %y : year of the start time of task %m : month of the start time of task %d : day of the start time of task \x : display the character after '\' as part of the serial number

Returns:
the format of artifact serial number
Since:
version 1.0.0

getJarFileMap

public java.util.HashMap getJarFileMap()

getMobileFormByArtStateName

public MobileForm getMobileFormByArtStateName(java.lang.String astName)

getMobileForms

public java.util.Vector<MobileForm> getMobileForms()

getName

public java.lang.String getName()
Get the artifact name

Returns:
the name
Since:
version 1.0.0

getParentID

public java.lang.String getParentID()
Get the id of parent

Returns:
the id
Since:
version 1.0.0

getProjectID

public java.lang.String getProjectID()
Get the id of project which owns this artifact.

Returns:
the id
Since:
version 1.0.0

getScriptAdaptorJarFile

public byte[] getScriptAdaptorJarFile()

getSubArtifactIDList

public java.util.Vector getSubArtifactIDList()
Get the list of subartifact

Returns:
the list(each element in Vector is a artifact id)
Since:
version 1.0.0

getSynopsis

public java.lang.String getSynopsis()

getType

public int getType()

getVisibleScript

public java.lang.String getVisibleScript()
Get the visible script. The script represents which components are visible at some stages.

Returns:
the visible script
Since:
version 1.0.0

isVersion2

public boolean isVersion2()

removeArtMultiLanguage

public void removeArtMultiLanguage(ArtMultiLanguage item)

removeArtStateID

public boolean removeArtStateID(PASEartState state)
Remove a artifact state.

Parameters:
state - the given state
Returns:
true if the removal is sucessful; false otherwise
Since:
version 1.0.0
See Also:
PASEartState

removeSubArtifactID

public boolean removeSubArtifactID(java.lang.String artID)
Remove a subartifact id.

Parameters:
artID - the given id
Returns:
true if the removal is sucessful; false otherwise
Since:
version 1.0.0

setArtifactID

public void setArtifactID(java.lang.String id)
Set the artifact id

Parameters:
id - the given id
Since:
version 1.0.0

setArtMultiLanguage

public void setArtMultiLanguage(java.util.Map map)

setArtStateList

public void setArtStateList(java.util.Vector prList)
Set the list of artifact state

Parameters:
prList - the given list. (each element in Vector is a instance of PASEartState)
Since:
version 1.0.0
See Also:
PASEartState

setDefaultValueScript

public void setDefaultValueScript(java.lang.String script)

setEnableScript

public void setEnableScript(java.lang.String script)
Set the enable script. The script represents which components are enabled at some stages.

Parameters:
script - the given enable script
Since:
version 1.0.0

setExecutableDVScript

public void setExecutableDVScript(java.lang.String script)

setFormSnapshot

public void setFormSnapshot(byte[] fs)

setID

public void setID(java.lang.String id)
Set the artifact id

Parameters:
id - the given id
Since:
version 1.0.0

setInitStateID

public void setInitStateID(java.lang.String state)
Set the initial artifact state id

Parameters:
state - the given state id
Since:
version 1.0.0

setInstanceIDEncoding

public void setInstanceIDEncoding(java.lang.String encoding)
Set the format of artifact serial number.

Parameters:
encoding - the given format of artifact serial number
Since:
version 1.0.0

setJarFileMap

public void setJarFileMap(java.util.HashMap hm)

setMobileForms

public void setMobileForms(java.util.Vector<MobileForm> mobileForms)

setName

public void setName(java.lang.String name)
Set the artifact name

Parameters:
name - the given name
Since:
version 1.0.0

setParentID

public void setParentID(java.lang.String parentID)
Set the id of parent

Parameters:
parentID - the given id
Since:
version 1.0.0

setProjectID

public void setProjectID(java.lang.String id)
Set the id of project which owns this artifact

Parameters:
the - given id
Since:
version 1.0.0

setScriptAdaptorJarFile

public void setScriptAdaptorJarFile(byte[] bs)

setSubArtifactIDList

public void setSubArtifactIDList(java.util.Vector prList)
Set the list of subartifact

Parameters:
prList - the given list(each element in Vector is a artifact id)
Since:
version 1.0.0

setSynopsis

public void setSynopsis(java.lang.String desc)
Set the artifact synopsis

Parameters:
desc - the given synopsis
Since:
version 1.0.0

setType

public void setType(int newType)

setVersion2

public void setVersion2(boolean version2)

setVisibleScript

public void setVisibleScript(java.lang.String script)
Set the visible script. The script represents which components are visible at some stages.

Parameters:
script - the given visible script
Since:
version 1.0.0

update

public void update(java.lang.Object obj)
Specified by:
update in interface com.flowring.entity.Entity

Agentflow
V3.1

Submit a bug or feature
Copyright 1999-2010 Flowring , Inc. 12F., No.120, Sec2, Gongdao 5th Rd.,
Hsinchu City 300, Taiwan (R.O.C.) All Rights Reserved.