Package com.uc4.communication.requests
Class TaskPromptSetContent
- java.lang.Object
-
- com.uc4.communication.requests.XMLRequest
-
- com.uc4.communication.requests.TaskPromptSetContent
-
- All Implemented Interfaces:
java.lang.Iterable<PromptElement>
public class TaskPromptSetContent extends XMLRequest implements java.lang.Iterable<PromptElement>
This request reads the content of a PromptSet (List of PromptElements) for a specified task. Sample for read and modify PromptSet: TaskPromptSetContent prompt = null; TaskPromptSetNames names = new TaskPromptSetNames(runID); connection.sendRequestAndWait(names); Iterator<TaskPromptSetName> it = names.iterator(); while (it.hasNext()) { TaskPromptSetName promptName = (TaskPromptSetName) it.next(); if( promptName.getName().getName().compareTo("JOBS.FTP.LS") == 0 ) { prompt = new TaskPromptSetContent(promptName, runID); connection.sendRequestAndWait(prompt); prompt.ocvValues().changeValue("prompt_0_sourceDir", "/bin"); SubmitPrompt sumbit = new SubmitPrompt(names, prompt); connection.sendRequestAndWait(sumbit); break; } }
-
-
Constructor Summary
Constructors Constructor Description TaskPromptSetContent(PromptSet promptSet)
Preview of a prompt set object.TaskPromptSetContent(PromptSetDefinition promptSetDef)
Deprecated.Use TaskPromptSetContent(PromptSetDefinition promptSetDef, UC4Object obj) insteadTaskPromptSetContent(PromptSetDefinition promptSetDef, ITaskItem task)
Creates a request to get the content of a PromptSet of a JOBP task.TaskPromptSetContent(PromptSetDefinition promptSetDef, UC4Object obj)
Creates a request to get the content of a PromptSet of an object.TaskPromptSetContent(PromptSetDefinition promptSetDef, JobPlanMonitor.Task task)
Creates a request to get the content of a PromptSet of a JOBP task that was executed.TaskPromptSetContent(TaskPromptSetName promptSetName, int runID)
Creates a request to get the content of a PromptSet for execution.TaskPromptSetContent(UC4ObjectName promptSetName, int runID)
Deprecated.Use the constructorTaskPromptSetContent(TaskPromptSetName promptSetName, int runID)
instead.TaskPromptSetContent(UC4ObjectName promptSetName, ITaskItem task)
Creates a request to get the content of a PromptSet of a JOBP task.
-
Method Summary
All Methods Instance Methods Concrete 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.PromptSetDefinition
getPromptSetDef()
Returns the definition of the PromptSet.java.lang.String
getPromptSetID()
UC4ObjectName
getPromptSetName()
Returns the name of the PromptSet.UC4HostName
getRaAgentName()
Returns the name of the Agent if this is an RA panel.java.lang.String
getRaCaption()
Returns the caption of the tab if this is an RA prompt.java.lang.String
getRaJobtype()
Returns the job type if this is an RA panel.java.lang.String
getRaSubtype()
Returns the sub type of the Job if this is an RA panel.protected java.lang.String
getSrc()
Returns the request source.java.lang.String
getTaskIdnr()
java.lang.String
getTaskSrc()
java.lang.String
getText()
Returns the caption of the prompt set.java.lang.String
getType()
Returns the type of this prompt.protected void
handleContent(com.uc4.util.XMLDocument doc, ConnectionAttributes session)
Sub classes extract the values from the XML document and provide public getter methods.protected boolean
isAllowedInClientZero()
This method is used internally.java.util.Iterator<PromptElement>
iterator()
The returned Iterator can be used to set values of PromptElements the execution of an executable object.OCVPanel
ocvValues()
This method provides access to the RA Job values.int
size()
Returns the number of PromptElements.-
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
-
-
-
-
Constructor Detail
-
TaskPromptSetContent
@Deprecated public TaskPromptSetContent(UC4ObjectName promptSetName, int runID)
Deprecated.Use the constructorTaskPromptSetContent(TaskPromptSetName promptSetName, int runID)
instead.Creates a request to get the content of a PromptSet for execution.- Parameters:
promptSetName
- Name of the PromptSetrunID
- RunID of the task
-
TaskPromptSetContent
public TaskPromptSetContent(PromptSet promptSet)
Preview of a prompt set object.- Parameters:
promptSet
- Prompt Set
-
TaskPromptSetContent
public TaskPromptSetContent(TaskPromptSetName promptSetName, int runID)
Creates a request to get the content of a PromptSet for execution.- Parameters:
promptSetName
- Name of the PromptSetrunID
- RunID of the task
-
TaskPromptSetContent
@Deprecated public TaskPromptSetContent(PromptSetDefinition promptSetDef)
Deprecated.Use TaskPromptSetContent(PromptSetDefinition promptSetDef, UC4Object obj) insteadCreates a request to get the content of a PromptSet of a JOBP task.- Parameters:
promptSetDef
- Prompt Set definition
-
TaskPromptSetContent
public TaskPromptSetContent(PromptSetDefinition promptSetDef, UC4Object obj)
Creates a request to get the content of a PromptSet of an object.- Parameters:
promptSetDef
- Prompt Set definitionobj
- UC4 Object
-
TaskPromptSetContent
public TaskPromptSetContent(PromptSetDefinition promptSetDef, ITaskItem task)
Creates a request to get the content of a PromptSet of a JOBP task.- Parameters:
promptSetDef
- Prompt Set definitiontask
- Workflow task
-
TaskPromptSetContent
public TaskPromptSetContent(PromptSetDefinition promptSetDef, JobPlanMonitor.Task task)
Creates a request to get the content of a PromptSet of a JOBP task that was executed.- Parameters:
promptSetDef
- Prompt Set definitiontask
- The JobPlanMonitor task
-
TaskPromptSetContent
public TaskPromptSetContent(UC4ObjectName promptSetName, ITaskItem task)
Creates a request to get the content of a PromptSet of a JOBP task.- Parameters:
promptSetName
- Name of the promptSettask
- Workflow task
-
-
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
-
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
-
getRaAgentName
public UC4HostName getRaAgentName()
Returns the name of the Agent if this is an RA panel.- Returns:
- Name of the Agent or an empty UC4HostName instance, never
null
-
getRaJobtype
public java.lang.String getRaJobtype()
Returns the job type if this is an RA panel. Otherwisenull
is returned.- Returns:
- Job type or
null
if this is not an RA panel
-
getRaSubtype
public java.lang.String getRaSubtype()
Returns the sub type of the Job if this is an RA panel. Otherwisenull
is returned.- Returns:
- RA Job sub type or
null
if this is not an RA panel
-
getRaCaption
public java.lang.String getRaCaption()
Returns the caption of the tab if this is an RA prompt.- Returns:
- Caption or
null
if this is not an RA panel
-
iterator
public java.util.Iterator<PromptElement> iterator()
The returned Iterator can be used to set values of PromptElements the execution of an executable object. After all values are set (the method setValue() has been called for all PromptElements which are returned by this Iterator) the requestSubmitPrompt
is used to send the values to the Automation Engine. It is not possible to remove PromptElements by using theIterator.remove()
method. An Exception will be thrown in this case.- Specified by:
iterator
in interfacejava.lang.Iterable<PromptElement>
- Returns:
- Iterator over
PromptElement
-
getText
public java.lang.String getText()
Returns the caption of the prompt set.- Returns:
- Caption
-
ocvValues
public OCVPanel ocvValues()
This method provides access to the RA Job values. If this Prompt is not a RA prompt the return value isnull
.- Returns:
- Values or
null
if this prompt has not the type "RA"
-
getPromptSetName
public UC4ObjectName getPromptSetName()
Returns the name of the PromptSet.- Returns:
- Name of the PromptSet
-
getPromptSetDef
public PromptSetDefinition getPromptSetDef()
Returns the definition of the PromptSet.- Returns:
- PromptSetDefinition of the PromptSet
-
size
public int size()
Returns the number of PromptElements.- Returns:
- Number of Prompt
-
getType
public java.lang.String getType()
Returns the type of this prompt. If "RA" is returned the methodocvValues()
can be used to read and modify values.- Returns:
- "PROMPTSET" or "RA"
-
getPromptSetID
public java.lang.String getPromptSetID()
- Returns:
- ID of the PromptSet
-
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
-
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
-
getTaskIdnr
public java.lang.String getTaskIdnr()
-
getTaskSrc
public java.lang.String getTaskSrc()
-
-