Agentflow
V3.1

pe.pase
Class PASEartInstance

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

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

An abstract representation of Artifact Instance.

The Artifact Instance is initiated from Artifact.(The concept of 'initiate' relationship comes from the relationship between 'class' and 'object' in the Object-Oreinted language.) Therefore, the field of the class can also be divided into the logical and the form informaiotn introduced in pe.pase.Artifact. In the following description, we use attached-Artifact to represent the Atrifact that some Artifact Instance are initiated from.

The Logical Information:

Only part of the logical information in the Artifact are also used the class: the ArtifactID, ArtInstanceName, ArtInstanceSerialNo, and the ArtInstanceState. The content of the first two field are the same as in Artifact. Then the content of the ArtInstaceSerialNo is generated from the ArtifactSerialNo, the format of artifact serial number. At last, the ArtInstanceState indicates the current state of the Artiact Instance. Its data object is represented by the ArtifactState defined in the attached-Artifact. The following is the summary table of the fileds' desciption.

Descriptor Comment
ArtInstanceID the identifier of Aritact Instance in the Agentflow System
ArtifactID the ID of Artifact that the Instance is initiated from
ArtInstanceSerianNo the ArtifactSerialNo of Artifact that the Instance is initiated from
ArtInstanceName the Artifactname of Artifact that the Instance is initiated from
ArtInstanceState the current ArtifactState

The form Information:

One field is used to show the form information: the DataMap. It represents the value of each Component defined in the ArtFormItem of the attached-Artifact.

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

Constructor Summary
PASEartInstance()
           
PASEartInstance(java.lang.String id)
          Constructor.
 
Method Summary
 void addAppValue(java.lang.String key, java.lang.Object value)
          For system use.
 void addAppValue(java.lang.String key, java.lang.String value)
          For script use.
 java.lang.Object clone()
          Make a copy of the PASEartInstance object
 java.util.HashMap getAppDataMap()
          Get the data map
 java.lang.String getAppValue(java.lang.String key)
          Get the value of the specified component
 java.lang.String getArtifactID()
          Get the artifact id
 PASEartState getArtState()
          Get the current artifact state
 java.lang.Object getHashKey()
           
 java.lang.String getID()
          Get the artifact instance id
 java.lang.String getMyID()
          Get the artifact instance serial number
 java.lang.String getName()
          Get the artifact instance name
 void setAppDataMap(java.util.HashMap data)
          Set the data map
 void setAppValue(java.lang.String key, java.lang.Object value)
          For system use.
 void setAppValue(java.lang.String key, java.lang.String value)
          For script use.
 void setArtifactID(java.lang.String id)
          Set the artifact id
 void setArtState(PASEartState as)
          Set the current artifact state
 void setID(java.lang.String id)
          Set the artifact instance id
 void setMyID(java.lang.String id)
          Set the artifact instance serial number
 void setName(java.lang.String name)
          Set the artifact instance name
 java.lang.String toString()
          Returns a string representation of the artifact instance
 void update(java.lang.Object obj)
          Set the artifact state and data map of the Artifact instance
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PASEartInstance

public PASEartInstance()

PASEartInstance

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

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

addAppValue

public void addAppValue(java.lang.String key,
                        java.lang.Object value)
For system use. Add the specified component pair (component name:component value) into data map

Parameters:
key - the given component name
value - the given component value
Since:
version 1.0.0

addAppValue

public void addAppValue(java.lang.String key,
                        java.lang.String value)
For script use. Add the specified component pair (component name:component value) into data map The script will auto convert the 'value' to string type, mapping this function.

Parameters:
key - the given component name
value - the given component value
Since:
version 1.1

clone

public java.lang.Object clone()
Make a copy of the PASEartInstance object

Overrides:
clone in class java.lang.Object
Returns:
the object
Since:
version 1.0.0

getAppDataMap

public java.util.HashMap getAppDataMap()
Get the data map

Returns:
the data map ( key : value = component name : component value)
Since:
version 1.0.0

getAppValue

public java.lang.String getAppValue(java.lang.String key)
Get the value of the specified component

Returns:
the component value, if error, return null.
Since:
version 1.0.0

getArtifactID

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

Returns:
the artifact id
Since:
version 1.0.0

getArtState

public PASEartState getArtState()
Get the current artifact state

Returns:
the artifact instance state
Since:
version 1.0.0
See Also:
PASEartState

getHashKey

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

getID

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

Returns:
the artifact instance id
Since:
version 1.0.0

getMyID

public java.lang.String getMyID()
Get the artifact instance serial number

Returns:
the artifact instance serial number
Since:
version 1.0.0

getName

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

Returns:
the artifact instance name
Since:
version 1.0.0

setAppDataMap

public void setAppDataMap(java.util.HashMap data)
Set the data map

Parameters:
data - the data map ( key : value = component name : component value)
Since:
version 1.0.0

setAppValue

public void setAppValue(java.lang.String key,
                        java.lang.Object value)
For system use. Set the value to component

Parameters:
key - the given component name
value - the given component value
Since:
version 1.0.1

setAppValue

public void setAppValue(java.lang.String key,
                        java.lang.String value)
For script use. Set the value to component. The script will auto convert the 'value' to string type, mapping this function.

Parameters:
key - the given component name
value - the given component value
Since:
version 1.1

setArtifactID

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

Parameters:
name - the given artifact id
Since:
version 1.0.0

setArtState

public void setArtState(PASEartState as)
Set the current artifact state

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

setID

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

Parameters:
id - the given artifact instance id
Since:
version 1.0.0

setMyID

public void setMyID(java.lang.String id)
Set the artifact instance serial number

Parameters:
id - the given artifact instance serial number
Since:
version 1.0.0

setName

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

Parameters:
name - the given artifact instance name
Since:
version 1.0.0

toString

public java.lang.String toString()
Returns a string representation of the artifact instance

Overrides:
toString in class java.lang.Object
Returns:
the artifact instance name
Since:
version 1.0.0

update

public void update(java.lang.Object obj)
Set the artifact state and data map of the Artifact instance

Specified by:
update in interface com.flowring.entity.Entity
Parameters:
obj - the given PASEartInstance object
Since:
version 1.0.0

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.