|
||||||||||
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 gov.nasa.arc.brahms.common.rt.CompositeActivityCtx
public class CompositeActivityCtx
The CompositeActivityCtx maintains the context of a composite activity being or to be executed by an active instance. The context maintains start and end times for an activity, the duration, priority, status, state of the frames that are part of the composite activity and the active detectables of the composite activity.
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 | |
---|---|
CompositeActivityCtx(CompositeActivity act)
Constructor, creates a new context for the specified CompositeActivity. |
Method Summary | |
---|---|
void |
addActiveDetectable(IDetectableCtx detectable)
Adds the specified detectable as an active detectable to the list of active detectables. |
void |
addAvailableFrame(IFrameCtx frame)
Adds the specified frame context as an available frame. |
void |
addCompletedFrame(IFrameCtx frame)
Adds the given frame context as a completed frame. |
void |
addImpassedFrame(IWorkframeCtx frame)
Adds the specified frame context as an impassed frame. |
void |
addInterruptedFrame(IWorkframeCtx frame)
Adds the specified frame context as an interrupted frame. |
java.util.ListIterator |
getActiveDetectables()
Returns the list of active detectables. |
java.util.ListIterator |
getAvailableThoughtframes()
Returns a list of all the available thoughtframes. |
java.util.ListIterator |
getAvailableWorkframes()
Returns a list of all the available workframes. |
java.util.Set<java.lang.String> |
getCompletedThoughtframeNames()
Return a list of the fully qualified names for all the thoughtframes for which completed thoughtframe contexts exist. |
java.util.ListIterator |
getCompletedThoughtframes(java.lang.String frameName)
Return a list of all the completed thoughtframe contexts for the thoughtframe with the specified fully qualified name. |
java.util.Set<java.lang.String> |
getCompletedWorkframeNames()
Return a list of the fully qualified names for all the workframes for which completed workframe contexts exist. |
java.util.ListIterator |
getCompletedWorkframes(java.lang.String frameName)
Return a list of all the completed workframe contexts for the workframe with the specified fully qualified name. |
IWorkframeCtx |
getCurrentWork()
Returns the workframe currently active in the activity. |
java.util.ListIterator |
getImpassedFrames()
Returns a list of all the impassed workframes. |
java.util.ListIterator |
getInterruptedFrames()
Returns a list of all the interrupted workframes. |
protected IThoughtframeCtx |
getPriorityAvailableThoughtframe()
Returns the highest priority available thoughtframe. |
protected IWorkframeCtx |
getPriorityAvailableWorkframe()
Returns the highest priority available workframe. |
protected IWorkframeCtx |
getPriorityInterruptedFrame()
Returns the highest priority interrupted workframe. |
boolean |
hasAvailableThoughtframes()
Inficates whether there are any available thoughtframes. |
boolean |
hasAvailableWorkframes()
Inficates whether there are any available workframes. |
boolean |
hasCompletedThoughtframes()
Inficates whether there are any completed thoughtframes. |
boolean |
hasCompletedWorkframes()
Inficates whether there are any completed workframes. |
boolean |
hasImpassedFrames()
Inficates whether there are any impassed workframes. |
boolean |
hasInterruptedFrames()
Inficates whether there are any interrupted workframes. |
void |
removeActiveDetectable(IDetectableCtx detectable)
Removes the specified detectable as an active detectable from the list of active detectables. |
void |
removeAvailableFrame(IFrameCtx frame)
Removes the specifies frame as an available frame. |
void |
removeCompletedFrame(IFrameCtx frame)
Removes the given frame context as a completed frame context |
void |
removeImpassedFrame(IWorkframeCtx frame)
Removes the specified frame context as an impassed frame. |
void |
removeInterruptedFrame(IWorkframeCtx frame)
Removes the specified frame context as an interrupted frame. |
void |
setCurrentWork(IWorkframeCtx frame)
Sets the workframe currently active in the activity |
Methods inherited from class gov.nasa.arc.brahms.common.rt.ActivityCtx |
---|
getCompletionCause, getDisplayText, getParentFrame, getPerformedBy, getPriority, getReferencedBy, getState, getStatus, setCompletionCause, setDisplayText, setParentFrame, setPerformedBy, setPriority, setReferencedBy, setState, setState, setStatus, toString |
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.IActivityCtx |
---|
getCompletionCause, getDisplayText, getParentFrame, getPerformedBy, getPriority, getReferencedBy, getStatus, setCompletionCause, setDisplayText, setParentFrame, setPerformedBy, setReferencedBy, setStatus |
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 CompositeActivityCtx(CompositeActivity act)
act
- the CompositeActivity for which to create a contextMethod Detail |
---|
public void addAvailableFrame(IFrameCtx frame) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
addAvailableFrame
in interface ICompositeActivityCtx
frame
- the available work or thoughtframe
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if frame is nullpublic void removeAvailableFrame(IFrameCtx frame) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
removeAvailableFrame
in interface ICompositeActivityCtx
frame
- the frame to be removed as an available frame.
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if a null frame is specified, no
available frames are present or the specified frame is
not presentpublic java.util.ListIterator getAvailableWorkframes() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getAvailableWorkframes
in interface ICompositeActivityCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if there are no available workframespublic boolean hasAvailableWorkframes()
hasAvailableWorkframes
in interface ICompositeActivityCtx
public boolean hasAvailableThoughtframes()
hasAvailableThoughtframes
in interface ICompositeActivityCtx
public java.util.ListIterator getAvailableThoughtframes() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getAvailableThoughtframes
in interface ICompositeActivityCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if there are no available thoughtframesprotected IWorkframeCtx getPriorityAvailableWorkframe()
protected IThoughtframeCtx getPriorityAvailableThoughtframe()
public void addInterruptedFrame(IWorkframeCtx frame) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
addInterruptedFrame
in interface ICompositeActivityCtx
frame
- the interrupted workframe to be added
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if frame is nullpublic void removeInterruptedFrame(IWorkframeCtx frame) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
removeInterruptedFrame
in interface ICompositeActivityCtx
frame
- the interrupted workframe to be removed
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if frame is null, no interrupted frames
are available, or the frame is not present as an interrupted framepublic java.util.ListIterator getInterruptedFrames() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getInterruptedFrames
in interface ICompositeActivityCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if there are no interrupted workframespublic boolean hasInterruptedFrames()
hasInterruptedFrames
in interface ICompositeActivityCtx
protected IWorkframeCtx getPriorityInterruptedFrame()
public void addImpassedFrame(IWorkframeCtx frame) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
addImpassedFrame
in interface ICompositeActivityCtx
frame
- the impassed workframe to be added
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if frame is nullpublic void removeImpassedFrame(IWorkframeCtx frame) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
removeImpassedFrame
in interface ICompositeActivityCtx
frame
- the impassed workframe to be removed
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if frame is null, no impassed frames
are available, or the frame is not present as an impassed framepublic java.util.ListIterator getImpassedFrames() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getImpassedFrames
in interface ICompositeActivityCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if there are no impassed workframespublic boolean hasImpassedFrames()
hasImpassedFrames
in interface ICompositeActivityCtx
public void addCompletedFrame(IFrameCtx frame) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
addCompletedFrame
in interface ICompositeActivityCtx
frame
- the IFrameCtx to be added as a completed frame
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if frame context is null or frame context
references no framepublic void removeCompletedFrame(IFrameCtx frame) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
removeCompletedFrame
in interface ICompositeActivityCtx
frame
- the frame context to be removed
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if frame is null, no completed frames exist for
the frame for which the specified frame is a context or if the
specified frame context is not found or if the specified frame
is not referencing a workframe or thoughtframepublic java.util.ListIterator getCompletedWorkframes(java.lang.String frameName) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getCompletedWorkframes
in interface ICompositeActivityCtx
frameName
- the fully qualified name for the workframe
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if an invalid name is specified or no completed frames existpublic java.util.Set<java.lang.String> getCompletedWorkframeNames() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getCompletedWorkframeNames
in interface ICompositeActivityCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if no completed frames existpublic boolean hasCompletedWorkframes()
hasCompletedWorkframes
in interface ICompositeActivityCtx
public java.util.ListIterator getCompletedThoughtframes(java.lang.String frameName) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getCompletedThoughtframes
in interface ICompositeActivityCtx
frameName
- the fully qualified name for the thoughtframe
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if an invalid name is specified or no completed frames existpublic java.util.Set<java.lang.String> getCompletedThoughtframeNames() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getCompletedThoughtframeNames
in interface ICompositeActivityCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if no completed frames existpublic boolean hasCompletedThoughtframes()
hasCompletedThoughtframes
in interface ICompositeActivityCtx
public void setCurrentWork(IWorkframeCtx frame)
setCurrentWork
in interface ICompositeActivityCtx
frame
- the current work (IWorkframeCtx) of the activitypublic IWorkframeCtx getCurrentWork()
getCurrentWork
in interface ICompositeActivityCtx
public void addActiveDetectable(IDetectableCtx detectable) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
addActiveDetectable
in interface ICompositeActivityCtx
detectable
- the IDetectableCtx for the detectable active in the activity
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if the detectable is nullpublic void removeActiveDetectable(IDetectableCtx detectable) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
removeActiveDetectable
in interface ICompositeActivityCtx
detectable
- the IDetectableCtx for the detectable to be removed as an active detectable
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if the detectable is null or no active detectables exist
or the specified detectable is not foundpublic java.util.ListIterator getActiveDetectables() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getActiveDetectables
in interface ICompositeActivityCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if no active detectables exist
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |