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 classDeprecated.Do not use it.static classstatic classDeprecated.Do not use it.static classTask in the ProcessFlow monitor. -
Constructor Summary
ConstructorsConstructorDescriptionJobPlanMonitor(int runID, boolean active) Constructs a newJobPlanMonitorrequest. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcreateRequest(com.uc4.util.XMLDocument doc, Element request, ConnectionAttributes sessionInfo) Creates the XML Document for the request.protected JobPlanMonitor.TaskcreateTask(Element taskElement, ConnectionAttributes session, JobPlanMonitor monitor) Creates a task in the Workflow monitor.protected JobPlanMonitor.TaskcreateTask(Element taskElement, ConnectionAttributes session, JobPlanMonitor monitor, com.uc4.util.XMLDocument doc) Creates a task in the Workflow monitor.Returns the end task.intReturns the estimated runtime in seconds.getFirstTaskByName(String name) Returns the first task in the JobPlan monitor which has the specified object name.intgetRunID()returns the RunID of the ProcessFlow.protected StringgetSrc()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 voidhandleContent(com.uc4.util.XMLDocument doc, ConnectionAttributes session) Sub classes extract the values from the XML document and provide public getter methods.booleanisActive()Returnstrueif the monitor was read form the activity window.protected booleanThis method is used internally.booleanReturnstrueif this instance of the JobPlanMonitor class represents a ProcessFlow which has been opened for modification.booleanReturnstrueif no workflow monitor data was returned.iterator()voidsetEstimatedRunTime(int ert) Sets the estimated runtime in seconds for the entry.voidsetIncludeTaskProperties(boolean includeTaskProperties) If this method is set to true, the properties of task are also returned in the monitor.intsize()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, showQuarantineNotificationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
JobPlanMonitor
public JobPlanMonitor(int runID, boolean active) Constructs a newJobPlanMonitorrequest.- 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:XMLRequestCreates the XML Document for the request. This method is used internally.- Specified by:
createRequestin 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:XMLRequestReturns the request source. This method is used internally.- Specified by:
getSrcin 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()Returnstrueif 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:XMLRequestSub classes extract the values from the XML document and provide public getter methods.- Overrides:
handleContentin 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
nullif 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
nullif 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
nullif not found
-
getTaskByLnr
Returns the task with the specified activation number.- Parameters:
lnr- Activation number- Returns:
- Task or
nullif not found
-
isModificationMode
public boolean isModificationMode()Returnstrueif 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:
iteratorin 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()Returnstrueif the monitor was read form the activity window.- Returns:
- true if active, otherwise false
-
isAllowedInClientZero
protected boolean isAllowedInClientZero()Description copied from class:XMLRequestThis method is used internally. Tests if thisXMLRequestis allowed in client 0. The default implementation returnsfalse, subclasses may override.- Overrides:
isAllowedInClientZeroin classXMLRequest- Returns:
trueif this request is allowed in client 0,falseotherwise
-