Package com.uc4.communication.requests
Class JobPlanMonitor
java.lang.Object
com.uc4.communication.requests.XMLRequest
com.uc4.communication.requests.JobPlanMonitor
- All Implemented Interfaces:
Iterable<JobPlanMonitor.Task>
Reads a JobPlan Monitor.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Deprecated.Do not use it.static class
static class
Deprecated.Do not use it.static class
Task in the ProcessFlow monitor. -
Constructor Summary
ConstructorsConstructorDescriptionJobPlanMonitor
(int runID, boolean active) Constructs a newJobPlanMonitor
request. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
createRequest
(com.uc4.util.XMLDocument doc, Element request, ConnectionAttributes sessionInfo) Creates the XML Document for the request.protected JobPlanMonitor.Task
createTask
(Element taskElement, ConnectionAttributes session, JobPlanMonitor monitor) Creates a task in the Workflow monitor.protected JobPlanMonitor.Task
createTask
(Element taskElement, ConnectionAttributes session, JobPlanMonitor monitor, com.uc4.util.XMLDocument doc) Creates a task in the Workflow monitor.Returns the end task.int
Returns the estimated runtime in seconds.getFirstTaskByName
(String name) Returns the first task in the JobPlan monitor which has the specified object name.int
getRunID()
returns the RunID of the ProcessFlow.protected String
getSrc()
Returns the request source.Returns the start task.Returns the SubType of the Workflow.getTaskByLnr
(String lnr) Returns the task with the specified activation number.getTaskByRunID
(int runID) Returns the task with the specified runID.getTaskByRunIDWithType
(int runID, String objectType) Returns the task with the specified runID and Type.protected void
handleContent
(com.uc4.util.XMLDocument doc, ConnectionAttributes session) Sub classes extract the values from the XML document and provide public getter methods.boolean
isActive()
Returnstrue
if the monitor was read form the activity window.protected boolean
This method is used internally.boolean
Returnstrue
if this instance of the JobPlanMonitor class represents a ProcessFlow which has been opened for modification.boolean
Returnstrue
if no workflow monitor data was returned.iterator()
void
setEstimatedRunTime
(int ert) Sets the estimated runtime in seconds for the entry.void
setIncludeTaskProperties
(boolean includeTaskProperties) If this method is set to true, the properties of task are also returned in the monitor.int
size()
Returns the number of tasks in the ProcessFlow.Deprecated.use iterator() insteadMethods inherited from class com.uc4.communication.requests.XMLRequest
assertClientZero, assertServerVersion, checkClient, checkID, checkLnr, checkNull, checkSelStatisticsPrivilege, checkSystemOverviewPrivilege, checkUC4ObjectEmptyName, checkUC4ObjectName, createNATFor, createNATRequest, emptyAttributes, getAllMessageBoxes, getMessageBox, getRequestID, handleResponse, ignoreMessageBox, send, setMessageBox, showQuarantineNotification
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
JobPlanMonitor
public JobPlanMonitor(int runID, boolean active) Constructs a newJobPlanMonitor
request.- Parameters:
runID
- RunIDactive
- true if the monitor should be read from the activity window, false if the statistics should be queried
-
-
Method Details
-
createRequest
protected void createRequest(com.uc4.util.XMLDocument doc, Element request, ConnectionAttributes sessionInfo) Description copied from class:XMLRequest
Creates the XML Document for the request. This method is used internally.- Specified by:
createRequest
in classXMLRequest
- Parameters:
doc
- Document, used to create new Elementsrequest
- Request Element - classes append information to this request elementsessionInfo
- Information about the session
-
getSrc
Description copied from class:XMLRequest
Returns the request source. This method is used internally.- Specified by:
getSrc
in classXMLRequest
- Returns:
- Source
-
setIncludeTaskProperties
public void setIncludeTaskProperties(boolean includeTaskProperties) If this method is set to true, the properties of task are also returned in the monitor. The value should be set to false if the values are not used in order to improve the performance for large Workflows.- Parameters:
includeTaskProperties
- true to include properties of each task in the response.
-
isWrongMonitor
public boolean isWrongMonitor()Returnstrue
if no workflow monitor data was returned. This can happen for example if the RunID of a Schedule was used.- Returns:
- true if the response of this request did not contain a valid workflow monitor, false if the monitor type is ok.
-
size
public int size()Returns the number of tasks in the ProcessFlow.- Returns:
- Number of tasks
-
handleContent
Description copied from class:XMLRequest
Sub classes extract the values from the XML document and provide public getter methods.- Overrides:
handleContent
in classXMLRequest
- Parameters:
doc
- XML Documentsession
- Info about the user session
-
createTask
protected JobPlanMonitor.Task createTask(Element taskElement, ConnectionAttributes session, JobPlanMonitor monitor) Creates a task in the Workflow monitor. Sub classes may override this method.- Parameters:
taskElement
- XML Element of the tasksession
- Session Infomonitor
- Monitor instance- Returns:
- Task
-
createTask
protected JobPlanMonitor.Task createTask(Element taskElement, ConnectionAttributes session, JobPlanMonitor monitor, com.uc4.util.XMLDocument doc) Creates a task in the Workflow monitor. Sub classes may override this method.- Parameters:
taskElement
- XML Element of the tasksession
- Session Infomonitor
- Monitor instancedoc
- XMLDocument instance- Returns:
- Task
-
getTaskByRunID
Returns the task with the specified runID.- Parameters:
runID
- runID of the task- Returns:
- Task or
null
if not found
-
getTaskByRunIDWithType
Returns the task with the specified runID and Type.- Parameters:
runID
- runID of the taskobjectType
- objectType of the task- Returns:
- Task or
null
if not found
-
getFirstTaskByName
Returns the first task in the JobPlan monitor which has the specified object name.- Parameters:
name
- Name of the UC4 object- Returns:
- Task or
null
if not found
-
getTaskByLnr
Returns the task with the specified activation number.- Parameters:
lnr
- Activation number- Returns:
- Task or
null
if not found
-
isModificationMode
public boolean isModificationMode()Returnstrue
if this instance of the JobPlanMonitor class represents a ProcessFlow which has been opened for modification.- Returns:
- true if in modification mode, false otherwise
-
taskIterator
Deprecated.use iterator() instead- Returns:
- Iterator over
JobPlanMonitor.Task
-
iterator
- Specified by:
iterator
in interfaceIterable<JobPlanMonitor.Task>
-
getRunID
public int getRunID()returns the RunID of the ProcessFlow.- Returns:
- RunID
-
getStartTask
Returns the start task.- Returns:
- START task
-
getEndTask
Returns the end task.- Returns:
- END task
-
getSubType
Returns the SubType of the Workflow.- Returns:
- Workflow SubTyp
-
getEstimatedRunTime
public int getEstimatedRunTime()Returns the estimated runtime in seconds.- Returns:
- Estimated Runtime in seconds
-
setEstimatedRunTime
public void setEstimatedRunTime(int ert) Sets the estimated runtime in seconds for the entry.- Parameters:
ert
- The estimated runtime.
-
isActive
public boolean isActive()Returnstrue
if the monitor was read form the activity window.- Returns:
- true if active, otherwise false
-
isAllowedInClientZero
protected boolean isAllowedInClientZero()Description copied from class:XMLRequest
This method is used internally. Tests if thisXMLRequest
is allowed in client 0. The default implementation returnsfalse
, subclasses may override.- Overrides:
isAllowedInClientZero
in classXMLRequest
- Returns:
true
if this request is allowed in client 0,false
otherwise
-