|
Version: ${maven.project.version} | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.soaplab.services.cmdline.NamedValues
public class NamedValues
A container for parameter name, parameter tag and its value, or values.
The contents of this container is somewhere in between user inputs and ready-to-use arguments for the command-line. It is used for job classes that do not create the full command-line (such as Gowlab jobs) but they still need an easy access to the user inputs (such as replacing missing inputs with their default values, checking if repetitivness (multiple values for the same parameter) is allowed, etc.).
One container represents one parameter. The parameter
internal ID
should be always present (but see about an exception
below). The tag
may be empty - this is the case
when no tag (qualifier) is defined in the parameter metadata, and
also if the parameter METHOD template is defined/used. The tag here
does not have any prefix (such as minus sign).
The values
come from the user input data. There
may be multiple values in these cases: (a) a parameter can be
repetitive, or (b) it is a multi-choice list parameter.
The boolean parameter is present only if it has a true
value (from the user or by default). Its value is actually its tag
- that's why for these parameters the same value is both in the
tag
and in the values
.
Be aware that for repetitive parameters, this container is different from the way how it is expressed on a command-line. Here, the tag is present only once. On the command-line, it is repeated for each individual value (unless a parameter METHOD template defines it otherwise). For example, the following parameter ( as define din an ACD file):
string: str [ information: "str: A ordinary string with a tag 'strtag'" additional: "Y" qualifier: strtag default: "Ciao mundi" ]and if a user sends two values ('a' and 'b'), will look on the command line:
-strtag a -strtag bbut this container will contain:
Param ID Param Tag Value(s) ------------------------------------------------- str strtag [a, b]If service metadata specify a global METHOD template then this container have empty parameter ID (because the role of individual parameters is hidden/lost inside the global template). Also the parameter tag is empty. Only values have contents.
Currently, the IO parameters do not use this structure.
Constructor Summary | |
---|---|
NamedValues()
Constructor - a container without parameter ID (used when a service metadata have a global METHOD template). |
|
NamedValues(java.lang.String paramId)
Constructor - a parameter ID is needed (in most cases). |
Method Summary | |
---|---|
void |
addValue(java.lang.String value)
Add a single value to the data representing user inputs. |
java.lang.String |
getId()
Return an ID of a parameter whose data this container keeps. |
java.lang.String |
getTag()
Return a tag (qualifier) for this parameter (without any prefixes, such as minus sign or slash - even if such character is define din the parameter metadata). |
java.util.List<java.lang.String> |
getValues()
Return a list of data values representing user inputs. |
void |
setTag(java.lang.String paramTag)
Set a tag (qualifier). |
void |
setValues(java.util.List<java.lang.String> values)
Set all values representing user inputs. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NamedValues(java.lang.String paramId)
public NamedValues()
Method Detail |
---|
public java.lang.String getId()
public void setTag(java.lang.String paramTag)
public java.lang.String getTag()
public java.util.List<java.lang.String> getValues()
public void addValue(java.lang.String value)
public void setValues(java.util.List<java.lang.String> values)
|
Version: ${maven.project.version} | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |