|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.slamd.parameter.Parameter
com.sun.slamd.parameter.MultiChoiceParameter
This class defines a parameter that provides the user with a list of options from which the value should be chosen. Parameters of this type will always be required to have a value.
| Field Summary |
| Fields inherited from class com.sun.slamd.parameter.Parameter |
description, displayName, isRequired, name, value |
| Constructor Summary | |
MultiChoiceParameter()
Creates a new instance of the Parameter to be used when decoding values transported over the network, and should not be used by jobs to create parameters. |
|
MultiChoiceParameter(java.lang.String name,
java.lang.String[] choices)
Creates a new multichoice parameter with the specified name and set of choices. |
|
MultiChoiceParameter(java.lang.String name,
java.lang.String[] choices,
java.lang.String value)
Creates a new multichoice parameter with the specified name, value, and set of choices. |
|
MultiChoiceParameter(java.lang.String name,
java.lang.String displayName,
java.lang.String[] choices,
java.lang.String value)
Creates a new multichoice parameter with the specified name, display name, value, and set of choices. |
|
MultiChoiceParameter(java.lang.String name,
java.lang.String displayName,
java.lang.String description,
java.lang.String[] choices,
java.lang.String value)
Creates a new multichoice parameter with the specified name, display name, description, value, and set of choices. |
|
MultiChoiceParameter(java.lang.String name,
java.lang.String displayName,
java.lang.String description,
java.lang.String[] choices,
java.lang.String[] displayValues,
java.lang.String value)
Creates a new multichoice parameter with the specified name, display name, description, value, and set of choices. |
|
| Method Summary | |
void |
addChoice(java.lang.String choice)
Adds the specified choice to the list of options. |
void |
addChoice(java.lang.String choice,
java.lang.String displayValue)
Adds the specified choice to the list of options. |
java.lang.Object |
clone()
Creates a clone of this parameter. |
java.lang.String[] |
getChoices()
Retrieves the set of acceptable values for this parameter. |
java.lang.String |
getDisplayValue()
Retrieves the value of this parameter in a form that can be displayed to the end user. |
java.lang.String[] |
getDisplayValues()
Retrieves the set of display values to use for this parameter. |
java.lang.String |
getHTMLInputForm(java.lang.String prefix)
Retrieves the text necessary to request the value of this Boolean parameter from an HTML form. |
java.lang.String |
getInvalidReason(java.lang.Object value)
Retrieves the reason that the specified value is not valid. |
java.lang.String |
getStringValue()
Retrieves the value of this parameter as a Java string. |
java.lang.String |
getValueString()
Retrieves a string representation of the value of this parameter. |
void |
htmlInputFormToValue(java.lang.String[] values)
Specifies the value of this parameter based on the provided text that would be returned from posting an HTML form. |
void |
removeChoice(java.lang.String choice)
Removes the specified choice from the list of options. |
void |
setChoices(java.lang.String[] choices)
Specify the set of acceptable values for this parameter. |
void |
setDisplayValues(java.lang.String[] displayValues)
Specifies the set of display values to use for this parameter. |
void |
setValue(java.lang.Object value)
Specifies the value to use for this parameter. |
void |
setValueFrom(Parameter parameter)
Sets the value for this parameter from the information in the provided parameter. |
void |
setValueFromString(java.lang.String valueString)
Specifies the value to use for this parameter from the provided String. |
| Methods inherited from class com.sun.slamd.parameter.Parameter |
decode, encode, getDescription, getDisplayName, getHTMLDisplayValue, getHTMLPostValue, getInvalidReason, getName, getValue, hasValue, isRequired, isValid, isValid, setDescription, setDisplayName, setName, setRequired, toString |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public MultiChoiceParameter()
setName, setDisplayName,
setDescription, or setValueFromString, then it
should be done here.
public MultiChoiceParameter(java.lang.String name,
java.lang.String[] choices)
name - The name to use for this parameter.choices - The set of values that may be used for this parameter.
public MultiChoiceParameter(java.lang.String name,
java.lang.String[] choices,
java.lang.String value)
name - The name to use for this parameter.choices - The set of values that may be used for this parameter.value - The value to use for this parameter.
public MultiChoiceParameter(java.lang.String name,
java.lang.String displayName,
java.lang.String[] choices,
java.lang.String value)
name - The name to use for this parameter.displayName - The name to use for this parameter if it to be
displayed to the end user.choices - The set of values that may be used for this parameter.value - The value to use for this parameter.
public MultiChoiceParameter(java.lang.String name,
java.lang.String displayName,
java.lang.String description,
java.lang.String[] choices,
java.lang.String value)
name - The name to use for this parameter.displayName - The name to use for this parameter if it to be
displayed to the end user.description - The description to use for this parameter.choices - The set of values that may be used for this parameter.value - The value to use for this parameter.
public MultiChoiceParameter(java.lang.String name,
java.lang.String displayName,
java.lang.String description,
java.lang.String[] choices,
java.lang.String[] displayValues,
java.lang.String value)
name - The name to use for this parameter.displayName - The name to use for this parameter if it to be
displayed to the end user.description - The description to use for this parameter.choices - The set of values that may be used for this
parameter.displayValues - The set of values that should be displayed in the
drop-down list box associated with this parameter.value - The value to use for this parameter.| Method Detail |
public java.lang.String[] getChoices()
public void setChoices(java.lang.String[] choices)
choices - The set of acceptable choices for this parameter.public java.lang.String[] getDisplayValues()
public void setDisplayValues(java.lang.String[] displayValues)
displayValues - The set of display values to use for this parameter.public void addChoice(java.lang.String choice)
choice - The new choice to add to the list of options.
public void addChoice(java.lang.String choice,
java.lang.String displayValue)
choice - The new choice to add to the list of options.displayValue - The value to display for this choice in the drop-down
list box.public void removeChoice(java.lang.String choice)
choice - The choice to be removed from the list of options.public java.lang.String getStringValue()
public void setValue(java.lang.Object value)
throws InvalidValueException
setValue in class Parametervalue - The value to use for this parameter.
InvalidValueException - If the specified value is not in the list
of choices.public void setValueFrom(Parameter parameter)
setValueFrom in class Parameterparameter - The parameter from which to take the value for this
parameter.public java.lang.String getValueString()
getValueString in class Parameter
public void setValueFromString(java.lang.String valueString)
throws InvalidValueException
setValueFromString in class ParametervalueString - The string representation of the value to use for this
parameter.
InvalidValueException - If the provided value cannot be used to
provide a value for this parameter.public java.lang.String getInvalidReason(java.lang.Object value)
getInvalidReason in class Parametervalue - The value for which to make the determination.
null if it is valid.public java.lang.String getDisplayValue()
getDisplayValue in class Parameterpublic java.lang.String getHTMLInputForm(java.lang.String prefix)
getHTMLInputForm in class Parameterprefix - The prefix that should be placed in front of the parameter
name as the name of the form element.
public void htmlInputFormToValue(java.lang.String[] values)
throws InvalidValueException
htmlInputFormToValue in class Parametervalues - The set of values for this parameter contained in the
servlet request.
InvalidValueException - If the specified value is not acceptable
for this parameter.public java.lang.Object clone()
clone in class Parameter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||