Package com.uc4.communication.requests
Class TaskPromptSetContent
java.lang.Object
com.uc4.communication.requests.XMLRequest
com.uc4.communication.requests.TaskPromptSetContent
- All Implemented Interfaces:
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
ConstructorsConstructorDescriptionTaskPromptSetContent
(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
(PromptSetDefinition promptSetDef, String idnr) Creates a request to get the content of a PromptSet of an object.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.TaskPromptSetContent
(TaskPromptSetContent original, PromptSetDefinition def) Clone the given original TaskPromptSetContent for the given task, and using the given PromptSetDefinition -
Method Summary
Modifier and TypeMethodDescriptionvoid
Elements missing in the promptset definition, but present in the prompt will be addedprotected void
createRequest
(com.uc4.util.XMLDocument doc, Element request, ConnectionAttributes sessionInfo) Creates the XML Document for the request.Returns the definition of the PromptSet.Returns the name of the PromptSet.Returns the name of the Agent if this is an RA panel.Returns the caption of the tab if this is an RA prompt.Returns the job type if this is an RA panel.Returns the sub type of the Job if this is an RA panel.protected String
getSrc()
Returns the request source.getText()
Returns the caption of the prompt set.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
This method is used internally.iterator()
The returned Iterator can be used to set values of PromptElements the execution of an executable object.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
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
-
TaskPromptSetContent
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
Preview of a prompt set object.- Parameters:
promptSet
- Prompt Set
-
TaskPromptSetContent
Creates a request to get the content of a PromptSet for execution.- Parameters:
promptSetName
- Name of the PromptSetrunID
- RunID of the task
-
TaskPromptSetContent
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
Creates a request to get the content of a PromptSet of an object.- Parameters:
promptSetDef
- Prompt Set definitionobj
- UC4 Object
-
TaskPromptSetContent
Creates a request to get the content of a PromptSet of an object.- Parameters:
promptSetDef
- Prompt Set definitionidnr
- the idnr of the object to be requested
-
TaskPromptSetContent
Creates a request to get the content of a PromptSet of a JOBP task.- Parameters:
promptSetDef
- Prompt Set definitiontask
- Workflow task
-
TaskPromptSetContent
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
Creates a request to get the content of a PromptSet of a JOBP task.- Parameters:
promptSetName
- Name of the promptSettask
- Workflow task
-
TaskPromptSetContent
Clone the given original TaskPromptSetContent for the given task, and using the given PromptSetDefinition
-
-
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
-
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
-
applyMissingDefinitions
public void applyMissingDefinitions()Elements missing in the promptset definition, but present in the prompt will be added- Parameters:
promptsElements2
-
-
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
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
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
Returns the caption of the tab if this is an RA prompt.- Returns:
- Caption or
null
if this is not an RA panel
-
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 interfaceIterable<PromptElement>
- Returns:
- Iterator over
PromptElement
-
getText
Returns the caption of the prompt set.- Returns:
- Caption
-
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
Returns the name of the PromptSet.- Returns:
- Name of the PromptSet
-
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
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
- Returns:
- ID of the PromptSet
-
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
-
getTaskSrc
-