Package com.uc4.communication.requests
Class JobPlanMonitor
- java.lang.Object
-
- com.uc4.communication.requests.XMLRequest
-
- com.uc4.communication.requests.JobPlanMonitor
-
- All Implemented Interfaces:
java.lang.Iterable<JobPlanMonitor.Task>
public class JobPlanMonitor extends XMLRequest implements java.lang.Iterable<JobPlanMonitor.Task>
Reads a JobPlan Monitor.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JobPlanMonitor.JobPlanMonitorExternal
Deprecated.Do not use it.static class
JobPlanMonitor.JobPlanMonitorRuntime
Deprecated.Do not use it.static class
JobPlanMonitor.Task
Task in the ProcessFlow monitor.
-
Constructor Summary
Constructors Constructor Description JobPlanMonitor(int runID, boolean active)
Constructs a newJobPlanMonitor
request.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
createRequest(com.uc4.util.XMLDocument doc, org.w3c.dom.Element request, ConnectionAttributes sessionInfo)
Creates the XML Document for the request.protected JobPlanMonitor.Task
createTask(org.w3c.dom.Element taskElement, ConnectionAttributes session, JobPlanMonitor monitor)
Creates a task in the Workflow monitor.protected JobPlanMonitor.Task
createTask(org.w3c.dom.Element taskElement, ConnectionAttributes session, JobPlanMonitor monitor, com.uc4.util.XMLDocument doc)
Creates a task in the Workflow monitor.JobPlanMonitor.Task
getEndTask()
Returns the end task.int
getEstimatedRunTime()
Returns the estimated runtime in seconds.JobPlanMonitor.Task
getFirstTaskByName(java.lang.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 java.lang.String
getSrc()
Returns the request source.JobPlanMonitor.Task
getStartTask()
Returns the start task.java.lang.String
getSubType()
Returns the SubType of the Workflow.JobPlanMonitor.Task
getTaskByLnr(java.lang.String lnr)
Returns the task with the specified activation number.JobPlanMonitor.Task
getTaskByRunID(int runID)
Returns the task with the specified runID.JobPlanMonitor.Task
getTaskByRunIDWithType(int runID, java.lang.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
isAllowedInClientZero()
This method is used internally.boolean
isModificationMode()
Returnstrue
if this instance of the JobPlanMonitor class represents a ProcessFlow which has been opened for modification.boolean
isWrongMonitor()
Returnstrue
if no workflow monitor data was returned.java.util.Iterator<JobPlanMonitor.Task>
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.java.util.Iterator<JobPlanMonitor.Task>
taskIterator()
Deprecated.use iterator() instead-
Methods 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
-
-
-
-
Method Detail
-
createRequest
protected void createRequest(com.uc4.util.XMLDocument doc, org.w3c.dom.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
protected java.lang.String 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
protected void handleContent(com.uc4.util.XMLDocument doc, ConnectionAttributes session)
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(org.w3c.dom.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(org.w3c.dom.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
public JobPlanMonitor.Task getTaskByRunID(int runID)
Returns the task with the specified runID.- Parameters:
runID
- runID of the task- Returns:
- Task or
null
if not found
-
getTaskByRunIDWithType
public JobPlanMonitor.Task getTaskByRunIDWithType(int runID, java.lang.String objectType)
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
public JobPlanMonitor.Task getFirstTaskByName(java.lang.String name)
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
public JobPlanMonitor.Task getTaskByLnr(java.lang.String lnr)
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 public java.util.Iterator<JobPlanMonitor.Task> taskIterator()
Deprecated.use iterator() instead- Returns:
- Iterator over
JobPlanMonitor.Task
-
iterator
public java.util.Iterator<JobPlanMonitor.Task> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<JobPlanMonitor.Task>
-
getRunID
public int getRunID()
returns the RunID of the ProcessFlow.- Returns:
- RunID
-
getStartTask
public JobPlanMonitor.Task getStartTask()
Returns the start task.- Returns:
- START task
-
getEndTask
public JobPlanMonitor.Task getEndTask()
Returns the end task.- Returns:
- END task
-
getSubType
public java.lang.String 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
-
-