wt.lifecycle
Class LifeCycleSignature

java.lang.Object
  extended bywt.fc.WTObject
      extended bywt.lifecycle.LifeCycleSignature
All Implemented Interfaces:
DisplayIdentification, Externalizable, NetFactor, ObjectMappable, Persistable, Serializable, Signable

public class LifeCycleSignature
extends WTObject
implements Signable, Externalizable

LifeCycleSignature captures a role player's ballot and comments for a specific object in a specific phase of a life cycle.

Use the newLifeCycleSignature static factory method(s), not the LifeCycleSignature constructor, to construct instances of this class. Instances must be constructed using the static factory(s), in order to ensure proper initialization of the instance.



Supported API: true

Extendable: false

See Also:
Signable, Phase, LifeCycleHistory, wt.workflow.WorkItem, Serialized Form

Field Summary
private static String CLASSNAME
           
private  String comments
           
private static int COMMENTS_UPPER_LIMIT
           
static long EXTERNALIZATION_VERSION_UID
           
protected static long OLD_FORMAT_VERSION_UID
           
static String PHASE_NAME
          Label for the attribute; Phase name this signature is associated with.
private static int PHASE_NAME_UPPER_LIMIT
           
private  String phaseName
           
private static String RESOURCE
           
static String ROLE_NAME
          Label for the attribute; The name of the Role

Supported API: true
private static int ROLE_NAME_UPPER_LIMIT
           
private  String roleName
           
(package private) static long serialVersionUID
           
private  ObjectReference signedObject
           
private  WTPrincipalReference signer
           
private static int SIGNER_NAME_UPPER_LIMIT
           
private  String signerName
           
private  boolean vote
           
static String VOTE
          Label for the attribute; The signer's vote.
 
Fields inherited from class wt.fc.WTObject
CREATE_TIMESTAMP, MODIFY_TIMESTAMP
 
Fields inherited from interface wt.lifecycle.Signable
COMMENTS, SIGNED_OBJECT, SIGNER, SIGNER_NAME
 
Fields inherited from interface wt.fc.Persistable
IDENTITY, PERSIST_INFO, TYPE
 
Fields inherited from interface wt.identity.DisplayIdentification
DISPLAY_IDENTIFIER, DISPLAY_IDENTITY, DISPLAY_TYPE
 
Constructor Summary
LifeCycleSignature()
           
 
Method Summary
 void checkAttributes()
          Validate the values of this Persistable object's attributes.
private  void commentsValidate(String a_Comments)
           
 boolean equals(Object obj)
          Indicates whether the given object is equal to this object from a persistence perspective, by comparing the two objects ObjectIdentifiers.
 String getComments()
          Gets the value of the attribute: COMMENTS.
 String getConceptualClassname()
          Deprecated.  
 String getPhaseName()
          Gets the value of the attribute: PHASE_NAME.
 String getRoleName()
          Gets the value of the attribute: ROLE_NAME.
static SearchCondition getSearchCondition(LifeCycleManaged object)
           
static SearchCondition getSearchCondition(Role aRole)
           
static SearchCondition getSearchCondition(String phaseName)
           
static SearchCondition getSearchCondition(WTUser user)
           
 ObjectReference getSignedObject()
          Gets the object for the association that plays role: SIGNED_OBJECT.
 WTPrincipalReference getSigner()
          Gets the object for the association that plays role: SIGNER.
 String getSignerName()
          Gets the value of the attribute: SIGNER_NAME.
 int hashCode()
          Returns a hash code for this object based upon its ObjectIdentifier.
 boolean isVote()
          Gets the value of the attribute: VOTE.
static LifeCycleSignature newLifeCycleSignature()
          Default factory for the class.
protected static LifeCycleSignature newLifeCycleSignature(Persistable object, String signerName, String comments, Role role, boolean vote)
           
static LifeCycleSignature newLifeCycleSignature(Persistable object, WTPrincipal signer, String comments, Role role, boolean vote)
          Factory to create a WTSignature instance

Supported API: false
private  void phaseNameValidate(String a_PhaseName)
           
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
 void readExternal(PersistentRetrieveIfc input)
          Used by Persistent Data Service to populate the persistent attributes of this class from a persistent store.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(LifeCycleSignature thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
private  void roleNameValidate(String a_RoleName)
           
 void setComments(String a_Comments)
          Sets the value of the attribute: COMMENTS.
 void setPhaseName(String a_PhaseName)
          Sets the value of the attribute: PHASE_NAME.
 void setRoleName(String a_RoleName)
          Sets the value of the attribute: ROLE_NAME.
 void setSignedObject(ObjectReference a_SignedObject)
          Sets the object for the association that plays role: SIGNED_OBJECT.
 void setSigner(WTPrincipalReference a_Signer)
          Sets the object for the association that plays role: SIGNER.
 void setSignerName(String a_SignerName)
          Sets the value of the attribute: SIGNER_NAME.
 void setVote(boolean a_Vote)
          Sets the value of the attribute: VOTE.
private  void signedObjectValidate(ObjectReference a_SignedObject)
           
private  void signerNameValidate(String a_SignerName)
           
private  void signerValidate(WTPrincipalReference a_Signer)
           
private  void voteValidate(boolean a_Vote)
           
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 void writeExternal(PersistentStoreIfc output)
          Used by Persistent Data Service to obtain the values of the persistent attributes of this class, so they can be written to a persistent store.
 
Methods inherited from class wt.fc.WTObject
duplicate, finalize, getClassInfo, getCreateTimestamp, getDisplayIdentifier, getDisplayIdentity, getDisplayType, getIdentity, getModifyTimestamp, getPersistInfo, getType, initialize, readVersion, setPersistInfo, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface wt.fc.Persistable
getIdentity, getPersistInfo, getType, setPersistInfo
 
Methods inherited from interface wt.fc.NetFactor
getClassInfo
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

ROLE_NAME

public static final String ROLE_NAME
Label for the attribute; The name of the Role

Supported API: true

See Also:
Constant Field Values

ROLE_NAME_UPPER_LIMIT

private static int ROLE_NAME_UPPER_LIMIT

roleName

private String roleName

VOTE

public static final String VOTE
Label for the attribute; The signer's vote. Approve/Disapprove. Required attribute.

Supported API: true

See Also:
Constant Field Values

vote

private boolean vote

PHASE_NAME

public static final String PHASE_NAME
Label for the attribute; Phase name this signature is associated with. Used in searches.

Supported API: false

See Also:
Constant Field Values

PHASE_NAME_UPPER_LIMIT

private static int PHASE_NAME_UPPER_LIMIT

phaseName

private String phaseName

SIGNER_NAME_UPPER_LIMIT

private static int SIGNER_NAME_UPPER_LIMIT

signerName

private String signerName

COMMENTS_UPPER_LIMIT

private static int COMMENTS_UPPER_LIMIT

comments

private String comments

signedObject

private ObjectReference signedObject

signer

private WTPrincipalReference signer

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values
Constructor Detail

LifeCycleSignature

public LifeCycleSignature()
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class WTObject
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class WTObject
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(LifeCycleSignature thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(PersistentStoreIfc output)
                   throws SQLException,
                          DatastoreException
Used by Persistent Data Service to obtain the values of the persistent attributes of this class, so they can be written to a persistent store.

(Not intended for general use.)

Supported API: false

Specified by:
writeExternal in interface ObjectMappable
Overrides:
writeExternal in class WTObject
Parameters:
output -
Throws:
SQLException
DatastoreException

readExternal

public void readExternal(PersistentRetrieveIfc input)
                  throws SQLException,
                         DatastoreException
Used by Persistent Data Service to populate the persistent attributes of this class from a persistent store.

(Not intended for general use.)

Supported API: false

Specified by:
readExternal in interface ObjectMappable
Overrides:
readExternal in class WTObject
Parameters:
input -
Throws:
SQLException
DatastoreException

getConceptualClassname

public String getConceptualClassname()
Deprecated.  

Returns the conceptual (modeled) name for the class.

Supported API: false

Specified by:
getConceptualClassname in interface NetFactor
Returns:
String

getRoleName

public String getRoleName()
Gets the value of the attribute: ROLE_NAME. The name of the Role

Supported API: true

Returns:
String

setRoleName

public void setRoleName(String a_RoleName)
                 throws WTPropertyVetoException
Sets the value of the attribute: ROLE_NAME. The name of the Role

Supported API: true

Parameters:
a_RoleName -
Throws:
WTPropertyVetoException

roleNameValidate

private void roleNameValidate(String a_RoleName)
                       throws WTPropertyVetoException
Parameters:
a_RoleName -
Throws:
WTPropertyVetoException

isVote

public boolean isVote()
Gets the value of the attribute: VOTE. The signer's vote. Approve/Disapprove. Required attribute.

Supported API: true

Returns:
boolean

setVote

public void setVote(boolean a_Vote)
             throws WTPropertyVetoException
Sets the value of the attribute: VOTE. The signer's vote. Approve/Disapprove. Required attribute.

Supported API: true

Parameters:
a_Vote -
Throws:
WTPropertyVetoException

voteValidate

private void voteValidate(boolean a_Vote)
                   throws WTPropertyVetoException
Parameters:
a_Vote -
Throws:
WTPropertyVetoException

getPhaseName

public String getPhaseName()
Gets the value of the attribute: PHASE_NAME. Phase name this signature is associated with. Used in searches.

Supported API: false

Returns:
String

setPhaseName

public void setPhaseName(String a_PhaseName)
                  throws WTPropertyVetoException
Sets the value of the attribute: PHASE_NAME. Phase name this signature is associated with. Used in searches.

Supported API: false

Parameters:
a_PhaseName -
Throws:
WTPropertyVetoException

phaseNameValidate

private void phaseNameValidate(String a_PhaseName)
                        throws WTPropertyVetoException
Parameters:
a_PhaseName -
Throws:
WTPropertyVetoException

newLifeCycleSignature

public static LifeCycleSignature newLifeCycleSignature(Persistable object,
                                                       WTPrincipal signer,
                                                       String comments,
                                                       Role role,
                                                       boolean vote)
                                                throws WTException
Factory to create a WTSignature instance

Supported API: false

Parameters:
object - the Persistable object that the LifeCycleSignature is associated to
signer - the WTPrincipal who did the work
comments - any comments the signer recorded about the work accomplished
role - the Role object, used to represent the role the signer was participating as
vote - a boolean signer designation, used to record the disposition
Returns:
LifeCycleSignature
Throws:
WTException

newLifeCycleSignature

public static LifeCycleSignature newLifeCycleSignature()
                                                throws WTException
Default factory for the class.

Supported API: false

Returns:
LifeCycleSignature
Throws:
WTException

getSignerName

public String getSignerName()
Gets the value of the attribute: SIGNER_NAME. Full name of signing user. Required attribute.

Supported API: true

Specified by:
getSignerName in interface Signable
Returns:
String

setSignerName

public void setSignerName(String a_SignerName)
                   throws WTPropertyVetoException
Sets the value of the attribute: SIGNER_NAME. Full name of signing user. Required attribute.

Supported API: true

Specified by:
setSignerName in interface Signable
Parameters:
a_SignerName -
Throws:
WTPropertyVetoException

signerNameValidate

private void signerNameValidate(String a_SignerName)
                         throws WTPropertyVetoException
Parameters:
a_SignerName -
Throws:
WTPropertyVetoException

getComments

public String getComments()
Gets the value of the attribute: COMMENTS. Note: Should be removed in favor of Annotatable.

Supported API: true

Specified by:
getComments in interface Signable
Returns:
String

setComments

public void setComments(String a_Comments)
                 throws WTPropertyVetoException
Sets the value of the attribute: COMMENTS. Note: Should be removed in favor of Annotatable.

Supported API: true

Specified by:
setComments in interface Signable
Parameters:
a_Comments -
Throws:
WTPropertyVetoException

commentsValidate

private void commentsValidate(String a_Comments)
                       throws WTPropertyVetoException
Parameters:
a_Comments -
Throws:
WTPropertyVetoException

getSignedObject

public ObjectReference getSignedObject()
Gets the object for the association that plays role: SIGNED_OBJECT.

Supported API: false

Specified by:
getSignedObject in interface Signable
Returns:
ObjectReference

setSignedObject

public void setSignedObject(ObjectReference a_SignedObject)
                     throws WTPropertyVetoException
Sets the object for the association that plays role: SIGNED_OBJECT.

Supported API: false

Specified by:
setSignedObject in interface Signable
Parameters:
a_SignedObject -
Throws:
WTPropertyVetoException

signedObjectValidate

private void signedObjectValidate(ObjectReference a_SignedObject)
                           throws WTPropertyVetoException
Parameters:
a_SignedObject -
Throws:
WTPropertyVetoException

getSigner

public WTPrincipalReference getSigner()
Gets the object for the association that plays role: SIGNER.

Supported API: false

Specified by:
getSigner in interface Signable
Returns:
WTPrincipalReference

setSigner

public void setSigner(WTPrincipalReference a_Signer)
               throws WTPropertyVetoException
Sets the object for the association that plays role: SIGNER.

Supported API: false

Specified by:
setSigner in interface Signable
Parameters:
a_Signer -
Throws:
WTPropertyVetoException

signerValidate

private void signerValidate(WTPrincipalReference a_Signer)
                     throws WTPropertyVetoException
Parameters:
a_Signer -
Throws:
WTPropertyVetoException

equals

public boolean equals(Object obj)
Indicates whether the given object is equal to this object from a persistence perspective, by comparing the two objects ObjectIdentifiers. Changed or stale copies are still considered equal by this method. Delegates to PersistenceHelper.equals(Persistable,Object).

Warning: Certain core Windchill operations may depend upon equals being ObjectIdentifier-based. Changes to the default implementation should be done with care, if at all.

Supported API: false

Overrides:
equals in class WTObject
Parameters:
obj -
Returns:
boolean

hashCode

public int hashCode()
Returns a hash code for this object based upon its ObjectIdentifier. Delegates to PersistenceHelper.hashCode(Persistable).

Warning: Certain core Windchill operations may depend upon hashCode being ObjectIdentifier-based. Changes to the default implementation should be done with care, if at all.

Supported API: false

Overrides:
hashCode in class WTObject
Returns:
int

getSearchCondition

public static SearchCondition getSearchCondition(LifeCycleManaged object)
                                          throws WTException
Throws:
WTException

getSearchCondition

public static SearchCondition getSearchCondition(Role aRole)
                                          throws WTException
Throws:
WTException

getSearchCondition

public static SearchCondition getSearchCondition(WTUser user)
                                          throws WTException
Throws:
WTException

getSearchCondition

public static SearchCondition getSearchCondition(String phaseName)
                                          throws WTException
Throws:
WTException

newLifeCycleSignature

protected static LifeCycleSignature newLifeCycleSignature(Persistable object,
                                                          String signerName,
                                                          String comments,
                                                          Role role,
                                                          boolean vote)
                                                   throws WTException
Throws:
WTException

checkAttributes

public void checkAttributes()
                     throws InvalidAttributeException
Description copied from interface: Persistable
Validate the values of this Persistable object's attributes.

Supported API: false

Specified by:
checkAttributes in interface Persistable
Overrides:
checkAttributes in class WTObject
Throws:
InvalidAttributeException