|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gov.nasa.arc.brahms.common.rt.BrahmsObjectCtx gov.nasa.arc.brahms.common.rt.ActivityCtx
public class ActivityCtx
The ActivityCtx maintains the context of an activity being or to be executed by an active instance. The context maintains the start and end times for an activity, the duration, priority, and status.
Field Summary |
---|
Fields inherited from interface gov.nasa.arc.brahms.common.rt.IRuntimeConstants |
---|
ABORTED, ACTIVE, ACTIVITY, AVAILABLE, COMPLETED, CONSEQUENCE, DETECTABLE, ENDED, ENGINE, EXTERNAL_AGENT, FROM, IMPASSED, INITIAL, INTERRUPTED, JAVA_PROPERTY, sABORTED, sACTIVE, sAVAILABLE, sCOMPLETED, sENDED, sIMPASSED, sINTERRUPTED, sUNAVAILABLE, TO, TRANSFER, UNAVAILABLE |
Constructor Summary | |
---|---|
ActivityCtx(Activity act)
Constructor, creates a new context for the specified Activity. |
Method Summary | |
---|---|
DetectableCtx |
getCompletionCause()
Returns the cause of the activities completion if not normal completion, throws an exception is no cause is set. |
ParameterCtx |
getDisplayText()
Returns the activities display text. |
IWorkframeCtx |
getParentFrame()
Returns the frame context in which this activity is executed, serving as the parent of the activity. |
IActiveInstanceCtx |
getPerformedBy()
Returns the active instance performing the activity. |
ParameterCtx |
getPriority()
Returns the activities priority. |
ActivityRef |
getReferencedBy()
Returns the activity reference referencing this activity and causing the creation of this context. |
ActivityStateCtx |
getState()
Returns the current state of the activity context. |
int |
getStatus()
Returns the activities current status. |
void |
setCompletionCause(DetectableCtx detectable)
Sets the cause of the activities completion if not normal completion, throws an exception is no cause is set. |
void |
setDisplayText(ParameterCtx p)
Sets the activities display text. |
void |
setParentFrame(IWorkframeCtx parent)
Sets the frame context in which this activity is executed, serving as the parent of the activity. |
void |
setPerformedBy(IActiveInstanceCtx ai)
Sets the active instance performing the activity. |
void |
setPriority(ParameterCtx p)
Sets the activities priority. |
void |
setReferencedBy(ActivityRef referencedBy)
Sets the activity reference referencing this activity and causing the creation of this context. |
void |
setState(ActivityStateCtx state)
Sets the current state of the activity context. |
void |
setState(ActivityStateCtx state,
boolean maintainHistory)
Sets the current state of the activity context. |
void |
setStatus(int status)
Sets the activities current status. |
java.lang.String |
toString()
Returns the fully qualified name of the activity this is a context for and the context id. |
Methods inherited from class gov.nasa.arc.brahms.common.rt.BrahmsObjectCtx |
---|
addNote, getContextFor, getEndTime, getID, getNote, getNotes, getStartTime, removeNote, setContextFor, setEndTime, setID, setStartTime |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface gov.nasa.arc.brahms.common.rt.IBrahmsObjectCtx |
---|
addNote, getContextFor, getEndTime, getID, getNote, getNotes, getStartTime, removeNote, setEndTime, setID, setStartTime |
Constructor Detail |
---|
public ActivityCtx(Activity act)
act
- the Activity for which to create a contextMethod Detail |
---|
public void setReferencedBy(ActivityRef referencedBy)
setReferencedBy
in interface IActivityCtx
referencedBy
- the ActivityRef referencing this activitypublic ActivityRef getReferencedBy()
getReferencedBy
in interface IActivityCtx
public void setParentFrame(IWorkframeCtx parent) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
setParentFrame
in interface IActivityCtx
parent
- the IWorkframeCtx in which the activity is executed
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- in case of an internal errorpublic IWorkframeCtx getParentFrame() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getParentFrame
in interface IActivityCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- in case of an internal errorpublic void setPerformedBy(IActiveInstanceCtx ai) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
setPerformedBy
in interface IActivityCtx
ai
- the active instance performing the activity.
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if a null active instance is specifiedpublic IActiveInstanceCtx getPerformedBy() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getPerformedBy
in interface IActivityCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if no active instance is specifiedpublic void setDisplayText(ParameterCtx p) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
setDisplayText
in interface IActivityCtx
p
- the ParameterCtx defining the display text of the activity
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if a null display text is definedpublic ParameterCtx getDisplayText() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getDisplayText
in interface IActivityCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if no display text is definedpublic void setPriority(ParameterCtx p) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
p
- the ParameterCtx defining the priority of the activity
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if a null priority us definedpublic ParameterCtx getPriority() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getPriority
in interface IActivityCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if no priority is definedpublic void setStatus(int status) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
setStatus
in interface IActivityCtx
status
- the status of the activity
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if status is an invalid statusIRuntimeConstants
public int getStatus() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getStatus
in interface IActivityCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if activity has no status or invalid statusIRuntimeConstants
public void setState(ActivityStateCtx state)
state
- the ActivityStateCtx with the state informationpublic void setState(ActivityStateCtx state, boolean maintainHistory)
state
- the ActivityStateCtx with the state informationmaintainHistory
- true if history must be maintained, false otherwisepublic ActivityStateCtx getState()
public void setCompletionCause(DetectableCtx detectable) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
setCompletionCause
in interface IActivityCtx
detectable
- the DetectableCtx referencing the detectable causing the completion
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if detectable is nullpublic DetectableCtx getCompletionCause() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getCompletionCause
in interface IActivityCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if no cause is set for the activitypublic java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |