|
||||||||||
| 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.IntegerWithUnitParameter
This class defines a parameter that consists of two parts -- an integer value and a string value. The string value will be presented in a drop-down list form that allows the user to choose an appropriate set of units to use for the integer value.
| Field Summary |
| Fields inherited from class com.sun.slamd.parameter.Parameter |
description, displayName, isRequired, name, value |
| Constructor Summary | |
IntegerWithUnitParameter()
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. |
|
IntegerWithUnitParameter(java.lang.String name,
int value,
java.lang.String[] choices)
Creates a new integer with unit parameter with the specified name, value required/optional indicator, and set of choices. |
|
IntegerWithUnitParameter(java.lang.String name,
java.lang.String displayName,
int value,
java.lang.String[] choices)
Creates a new integer with unit parameter with the specified name, display name, value, required/optional indicator, and set of choices. |
|
IntegerWithUnitParameter(java.lang.String name,
java.lang.String displayName,
java.lang.String description,
int value,
boolean hasLowerBound,
int lowerBound,
boolean hasUpperBound,
int upperBound,
java.lang.String[] choices,
java.lang.String selectedChoice)
Creates a new integer with unit parameter with the specified name, display name, description, value, required/optional indicator, and choices as well as information pertaining to upper and lower bounds. |
|
IntegerWithUnitParameter(java.lang.String name,
java.lang.String displayName,
java.lang.String description,
int value,
java.lang.String[] choices)
Creates a new integer with unit parameter with the specified name, display name, description, value, required/optional indicator, and choices. |
|
| Method Summary | |
java.lang.Object |
clone()
Creates a clone of this parameter. |
java.lang.String[] |
getChoices()
Retrieves the list of choices available for the unit drop-down list. |
java.lang.String |
getDisplayValue()
Retrieves a String that can be used when displaying the value of this parameter to the end user. |
java.lang.String |
getHTMLDisplayValue()
Retrieves a String that can be used when displaying the value of this parameter to the end user in the context of an HTML page. |
java.lang.String |
getHTMLInputForm(java.lang.String prefix)
Retrieves a string of text that can be used to request a value for this parameter using an HTML form. |
int |
getIntValue()
Retrieves the value associated with this parameter as a Java integer. |
java.lang.String |
getInvalidReason(java.lang.Object value)
Retrieves the reason that the specified value is not valid. |
int |
getLowerBound()
Retrieves the lower bound that will be used if a lower bound is to be enforced. |
java.lang.String |
getSelectedChoice()
Retrieves the value that has been selected from the drop-down list. |
int |
getUpperBound()
Retrieves the upper bound that will be used if an upper bound is to be enforced. |
java.lang.Object |
getValue()
Retrieves the value associated with this parameter. |
java.lang.String |
getValueString()
Retrieves a string representation of the value of this parameter. |
int |
getVisibleColumns()
Retrieves the number of columns that should be visible in the HTML input form. |
boolean |
hasLowerBound()
Indicates whether a lower bound will be enforced for this parameter. |
boolean |
hasUpperBound()
Indicates whether an upper bound will be enforced for 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 |
setChoices(java.lang.String[] choices)
Specifies the list of choices available for the unit drop-down list. |
void |
setLowerBound(int lowerBound)
Specifies the value to use as the lower bound, and indicates that a lower bound is to be enforced for this parameter. |
void |
setSelectedChoice(java.lang.String selectedChoice)
Specifies the choice that has been selected from the drop-down list. |
void |
setUpperBound(int upperBound)
Specifies the value to use as the upper bound, and indicates that an upper bound is to be enforced for this parameter. |
void |
setValue(int value,
java.lang.String selectedChoice)
Specifies the value 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. |
void |
setVisibleColumns(int visibleColumns)
Specifies the number of columns that should be visible in the HTML input form. |
void |
unsetLowerBound()
Specifies that a lower bound should not be enforced for this parameter. |
void |
unsetUpperBound()
Specifies that an upper bound should not be enforced for this parameter. |
| Methods inherited from class com.sun.slamd.parameter.Parameter |
decode, encode, getDescription, getDisplayName, getHTMLPostValue, getInvalidReason, getName, 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 IntegerWithUnitParameter()
setName, setDisplayName,
setDescription, or setValueFromString, then it
should be done here.
public IntegerWithUnitParameter(java.lang.String name,
int value,
java.lang.String[] choices)
name - The name to use for this parameter.value - The value to use for this parameter.choices - The set of choices for this parameter.
public IntegerWithUnitParameter(java.lang.String name,
java.lang.String displayName,
int value,
java.lang.String[] choices)
name - The name to use for this parameter.displayName - The name to use for this parameter when it is
displayed to the end user.value - The value to use for this parameter.choices - The set of choices for this parameter.
public IntegerWithUnitParameter(java.lang.String name,
java.lang.String displayName,
java.lang.String description,
int value,
java.lang.String[] choices)
name - The name to use for this parameter.displayName - The name to use for this parameter when it is
displayed to the end user.description - The description to use for this parameter.value - The value to use for this parameter.choices - The set of choices for this parameter.
public IntegerWithUnitParameter(java.lang.String name,
java.lang.String displayName,
java.lang.String description,
int value,
boolean hasLowerBound,
int lowerBound,
boolean hasUpperBound,
int upperBound,
java.lang.String[] choices,
java.lang.String selectedChoice)
name - The name to use for this parameter.displayName - The name to use for this parameter when it is
displayed to the end user.description - The description to use for this parameter.value - The value to use for this parameter.hasLowerBound - Indicates whether the lower bound will be enforced
for this parameter.lowerBound - The lower bound to use for this parameter (will
only be effective if hasLowerBound is true).hasUpperBound - Indicates whether the upper bound will be enforced
for this parameter.upperBound - The upper bound to use for this parameter (will
only be effective if hasUpperBound is true).choices - The set of choices for this parameter.selectedChoice - The choice that should be selected by default.| Method Detail |
public int getIntValue()
public java.lang.String getSelectedChoice()
public void setSelectedChoice(java.lang.String selectedChoice)
throws InvalidValueException
selectedChoice - The choice that has been selected from the
drop-down list.
InvalidValueException - If the specified choice is not a valid
option.public java.lang.Object getValue()
null will be returned. If it does have a value,
then that value will be returned as a Java Integer object.
getValue in class Parameter
public void setValue(int value,
java.lang.String selectedChoice)
throws InvalidValueException
value - The value to use for this parameter.selectedChoice - The selected choice indicating the unit for the
value.
InvalidValueException - If the specified value does not meet the
upper or lower bounds requirements (if they
are to be enforced).
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 cannot be interpreted
as a Java integer, or if it does not meet
the upper or lower bounds requirements (if
they are to be enforced).public void setValueFrom(Parameter parameter)
setValueFrom in class Parameterparameter - The parameter from which to take the value for this
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 getValueString()
getValueString in class Parameterpublic int getLowerBound()
public void setLowerBound(int lowerBound)
lowerBound - The value to use as the lower bound.public void unsetLowerBound()
public boolean hasLowerBound()
true if a lower bound will be enforced, or
false if not.public int getUpperBound()
public void setUpperBound(int upperBound)
upperBound - The value to use as the upper bound.public void unsetUpperBound()
public boolean hasUpperBound()
true if an upper bound will be enforced, or
false if not.public java.lang.String[] getChoices()
public void setChoices(java.lang.String[] choices)
choices - The list of choices available for the unit drop-down list.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 getHTMLDisplayValue()
getHTMLDisplayValue in class Parameterpublic int getVisibleColumns()
public void setVisibleColumns(int visibleColumns)
visibleColumns - The number of columns that should be visible in the
HTML input form.public 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 | |||||||||