wt.projmgmt.execution
Class ProjectAssignment

java.lang.Object
  extended bywt.fc.WTObject
      extended bywt.workflow.work.WfAssignment
          extended bywt.projmgmt.execution.ProjectAssignment
All Implemented Interfaces:
DisplayIdentification, DomainAdministered, Externalizable, NetFactor, ObjectMappable, Persistable, RecentlyVisited, Serializable, WTContained

public class ProjectAssignment
extends WfAssignment
implements DomainAdministered, WTContained, Externalizable

Use the newProjectAssignment static factory method(s), not the ProjectAssignment 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: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
static String CONTAINER
          Label for the attribute.
private  WTContainerRef containerReference
           
private static String DEFAULT_ROLE
           
private  AdminDomainRef domainRef
           
static long EXTERNALIZATION_VERSION_UID
           
private  boolean inheritedDomain
           
protected static long OLD_FORMAT_VERSION_UID
           
static String PLAN
          Label for the attribute.
static String PLAN_REFERENCE
          Label for the attribute.
private  ObjectReference planReference
           
private static long R60_EXTERNALIZATION_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
private static boolean VERBOSE
           
 
Fields inherited from class wt.workflow.work.WfAssignment
ASSIGNEE, COMPLETE, PRINCIPALS, SOURCE, STATUS, TRIP_COUNT
 
Fields inherited from class wt.fc.WTObject
CREATE_TIMESTAMP, MODIFY_TIMESTAMP
 
Fields inherited from interface wt.admin.DomainAdministered
DOMAIN_REF, INHERITED_DOMAIN
 
Fields inherited from interface wt.inf.container.WTContained
CONTAINER_ID, CONTAINER_NAME, CONTAINER_REFERENCE
 
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
ProjectAssignment()
           
 
Method Summary
protected  WorkItem addProjectWorkItem(WTPrincipalReference pRef)
          Calls super.addWorkItem (Role.toRole (DEFAULT_ROLE), pRef)
protected  WTPrincipalReference checkDelegation(WTPrincipalReference pref)
           
private  void containerReferenceValidate(WTContainerRef a_ContainerReference)
           
protected  WorkItem createWorkItem(WTPrincipal principal)
          Creates and returns a ProjectWorkItem, owned by the principal passed as argument.
protected  void createWorkItems(WfAssignedActivity activity)
          Create the set of work items for this assignment

Supported API: false
protected  void deleteUncompletedWorkItems()
          Overrides method of WfAssignment that removes workitems that are not in the COMPLETED status.
 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 getConceptualClassname()
          Deprecated.  
 WTContainer getContainer()
          Gets the object for the association that plays role: CONTAINER.
 String getContainerName()
          Gets the value of the attribute: CONTAINER_NAME.
 WTContainerRef getContainerReference()
          Gets the value of the attribute: CONTAINER_REFERENCE.
 AdminDomainRef getDomainRef()
          Gets the object for the association that plays role: DOMAIN_REF.
private  ObjectIdentifier getId(Object obj)
           
private  String getIdString(Object obj)
           
private  QueryResult getPersonAssignments(ProjectActivity activity)
           
 ProjectPlan getPlan()
          Gets the object for the association that plays role: PLAN.
 ObjectReference getPlanReference()
          Gets the value of the attribute: PLAN_REFERENCE.
 int hashCode()
          Returns a hash code for this object based upon its ObjectIdentifier.
protected  void initialize(ProjectPlan plan)
          Supports initialization, following construction of an instance.
 boolean isInheritedDomain()
          Gets the value of the attribute: INHERITED_DOMAIN.
static ProjectAssignment newProjectAssignment(ProjectPlan plan)
          

Supported API: false
 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(ProjectAssignment thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
protected  ProjectAssignment reset()
           
protected  void sendNotification(WorkItem wi, WTPrincipalReference pRef)
          Send an email notification to all activity assignees.
protected  void setActivity(WfAssignedActivity a_Activity)
          Set the parent of this assignment, the WfAssignedActivity.
 void setContainer(WTContainer a_Container)
          Sets the object for the association that plays role: CONTAINER.
 void setContainerReference(WTContainerRef a_ContainerReference)
          Sets the value of the attribute: CONTAINER_REFERENCE.
 void setDomainRef(AdminDomainRef a_DomainRef)
          Sets the object for the association that plays role: DOMAIN_REF.
 void setInheritedDomain(boolean a_InheritedDomain)
          Sets the value of the attribute: INHERITED_DOMAIN.
 void setPlan(ProjectPlan a_Plan)
          Sets the object for the association that plays role: PLAN.
 void setPlanReference(ObjectReference a_PlanReference)
          Sets the value of the attribute: PLAN_REFERENCE.
 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.workflow.work.WfAssignment
accept, addWorkItem, buildWfBallot, buildWorkItem, checkBallotStatus, checkComplete, createBallot, delegate, deleteBallots, deletePotentialWorkItems, deleteWorkItems, finalizeAssignment, findRole, getActivity, getActivityTemplate, getAllEvents, getAssignee, getBallots, getParentProcess, getPrincipals, getSource, getStatus, getTripCount, initialize, initOldBlobs, isComplete, isOffered, newWfAssignment, readVersion, recalculateWorkItems, revokeTeamRights, sendNoWINotification, setAssignee, setComplete, setPrincipals, setSource, setStatus, setTripCount, tally, toString
 
Methods inherited from class wt.fc.WTObject
checkAttributes, duplicate, finalize, getClassInfo, getCreateTimestamp, getDisplayIdentifier, getDisplayIdentity, getDisplayType, getIdentity, getModifyTimestamp, getPersistInfo, getType, readVersion, setPersistInfo
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface wt.fc.NetFactor
getClassInfo
 
Methods inherited from interface wt.fc.Persistable
checkAttributes, getIdentity, getPersistInfo, getType, setPersistInfo
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

PLAN

public static final String PLAN
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

PLAN_REFERENCE

public static final String PLAN_REFERENCE
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

planReference

private ObjectReference planReference

inheritedDomain

private boolean inheritedDomain

domainRef

private AdminDomainRef domainRef

CONTAINER

public static final String CONTAINER
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

containerReference

private WTContainerRef containerReference

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

R60_EXTERNALIZATION_VERSION_UID

private static final long R60_EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

VERBOSE

private static final boolean VERBOSE

DEFAULT_ROLE

private static final String DEFAULT_ROLE
See Also:
Constant Field Values
Constructor Detail

ProjectAssignment

public ProjectAssignment()
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 WfAssignment
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 WfAssignment
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(ProjectAssignment 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 WfAssignment
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 WfAssignment
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
Overrides:
getConceptualClassname in class WfAssignment
Returns:
String

getPlan

public ProjectPlan getPlan()
Gets the object for the association that plays role: PLAN.

Supported API: false

Returns:
ProjectPlan

setPlan

public void setPlan(ProjectPlan a_Plan)
             throws WTException
Sets the object for the association that plays role: PLAN.

Supported API: false

Parameters:
a_Plan -
Throws:
WTException

getPlanReference

public ObjectReference getPlanReference()
Gets the value of the attribute: PLAN_REFERENCE.

Supported API: false

Returns:
ObjectReference

setPlanReference

public void setPlanReference(ObjectReference a_PlanReference)
Sets the value of the attribute: PLAN_REFERENCE.

Supported API: false

Parameters:
a_PlanReference -

createWorkItem

protected WorkItem createWorkItem(WTPrincipal principal)
                           throws WTException
Creates and returns a ProjectWorkItem, owned by the principal passed as argument. Overrides method of same name in WfAssigment.

Supported API: false

Overrides:
createWorkItem in class WfAssignment
Parameters:
principal -
Returns:
WorkItem
Throws:
WTException

newProjectAssignment

public static ProjectAssignment newProjectAssignment(ProjectPlan plan)
                                              throws WTException


Supported API: false

Parameters:
plan -
Returns:
ProjectAssignment
Throws:
WTException

initialize

protected void initialize(ProjectPlan plan)
                   throws WTException
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.

Supported API: false

Parameters:
plan -
Throws:
WTException

deleteUncompletedWorkItems

protected void deleteUncompletedWorkItems()
                                   throws WfException
Overrides method of WfAssignment that removes workitems that are not in the COMPLETED status.

Supported API: false

Overrides:
deleteUncompletedWorkItems in class WfAssignment
Throws:
WfException

isInheritedDomain

public boolean isInheritedDomain()
Gets the value of the attribute: INHERITED_DOMAIN. A boolean indicating whether the administrative domain is inherited. If the value is true, the domain is inherited from a parent object.

Supported API: false

Specified by:
isInheritedDomain in interface DomainAdministered
Returns:
boolean

setInheritedDomain

public void setInheritedDomain(boolean a_InheritedDomain)
                        throws WTPropertyVetoException
Sets the value of the attribute: INHERITED_DOMAIN. A boolean indicating whether the administrative domain is inherited. If the value is true, the domain is inherited from a parent object.

Supported API: false

Specified by:
setInheritedDomain in interface DomainAdministered
Parameters:
a_InheritedDomain -
Throws:
WTPropertyVetoException

getDomainRef

public AdminDomainRef getDomainRef()
Gets the object for the association that plays role: DOMAIN_REF.

Supported API: false

Specified by:
getDomainRef in interface DomainAdministered
Returns:
AdminDomainRef

setDomainRef

public void setDomainRef(AdminDomainRef a_DomainRef)
Sets the object for the association that plays role: DOMAIN_REF.

Supported API: false

Specified by:
setDomainRef in interface DomainAdministered
Parameters:
a_DomainRef -

getContainerName

public String getContainerName()
Gets the value of the attribute: CONTAINER_NAME. The name of the WTContainer this object is assigned to.

Supported API: false

Specified by:
getContainerName in interface WTContained
Returns:
String

getContainer

public WTContainer getContainer()
Gets the object for the association that plays role: CONTAINER.

Supported API: false

Specified by:
getContainer in interface WTContained
Returns:
WTContainer

setContainer

public void setContainer(WTContainer a_Container)
                  throws WTPropertyVetoException,
                         WTException
Sets the object for the association that plays role: CONTAINER.

Supported API: false

Specified by:
setContainer in interface WTContained
Parameters:
a_Container -
Throws:
WTPropertyVetoException
WTException

getContainerReference

public WTContainerRef getContainerReference()
Gets the value of the attribute: CONTAINER_REFERENCE.

Supported API: false

Specified by:
getContainerReference in interface WTContained
Returns:
WTContainerRef

setContainerReference

public void setContainerReference(WTContainerRef a_ContainerReference)
                           throws WTPropertyVetoException
Sets the value of the attribute: CONTAINER_REFERENCE.

Supported API: false

Specified by:
setContainerReference in interface WTContained
Parameters:
a_ContainerReference -
Throws:
WTPropertyVetoException

containerReferenceValidate

private void containerReferenceValidate(WTContainerRef a_ContainerReference)
                                 throws WTPropertyVetoException
Parameters:
a_ContainerReference -
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 WfAssignment
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 WfAssignment
Returns:
int

setActivity

protected void setActivity(WfAssignedActivity a_Activity)
Description copied from class: WfAssignment
Set the parent of this assignment, the WfAssignedActivity.

Overrides:
setActivity in class WfAssignment
Parameters:
a_Activity -

checkDelegation

protected WTPrincipalReference checkDelegation(WTPrincipalReference pref)
                                        throws WfException
Overrides:
checkDelegation in class WfAssignment
Throws:
WfException

sendNotification

protected void sendNotification(WorkItem wi,
                                WTPrincipalReference pRef)
                         throws WTException
Description copied from class: WfAssignment
Send an email notification to all activity assignees.

Overrides:
sendNotification in class WfAssignment
Throws:
WTException

reset

protected ProjectAssignment reset()
                           throws WTException
Throws:
WTException

createWorkItems

protected void createWorkItems(WfAssignedActivity activity)
                        throws WfException
Description copied from class: WfAssignment
Create the set of work items for this assignment

Supported API: false

Overrides:
createWorkItems in class WfAssignment
Parameters:
activity -
Throws:
WfException

addProjectWorkItem

protected WorkItem addProjectWorkItem(WTPrincipalReference pRef)
                               throws WTException
Calls super.addWorkItem (Role.toRole (DEFAULT_ROLE), pRef)

Throws:
WTException

getPersonAssignments

private QueryResult getPersonAssignments(ProjectActivity activity)
                                  throws WTException
Throws:
WTException

getId

private ObjectIdentifier getId(Object obj)

getIdString

private String getIdString(Object obj)