|
||||||||||
| 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.LongParameter
This class defines a parameter whose value is a 64-bit mathematical integer (no decimal values) that supports a much wider range of values than the standard integer parameter type. It can also support upper and lower bounds, although they are not required to be enforced.
| Field Summary |
| Fields inherited from class com.sun.slamd.parameter.Parameter |
description, displayName, isRequired, name, value |
| Constructor Summary | |
LongParameter()
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. |
|
LongParameter(java.lang.String name)
Creates a new long parameter with the specified name. |
|
LongParameter(java.lang.String name,
boolean isRequired,
long value)
Creates a new long parameter with the specified name, value, and required/optional indicator. |
|
LongParameter(java.lang.String name,
long value)
Creates a new long parameter with the specified name and value. |
|
LongParameter(java.lang.String name,
java.lang.String displayName,
boolean isRequired,
long value)
Creates a new long parameter with the specified name, display name, value, and required/optional indicator. |
|
LongParameter(java.lang.String name,
java.lang.String displayName,
java.lang.String description,
boolean isRequired,
long value)
Creates a new long parameter with the specified name, display name, description, value, and required/optional indicator. |
|
LongParameter(java.lang.String name,
java.lang.String displayName,
java.lang.String description,
boolean isRequired,
long value,
boolean hasLowerBound,
long lowerBound,
boolean hasUpperBound,
long upperBound)
Creates a new long parameter with the specified name, display name, description, value, and required/optional indicator, as well as information pertaining to upper and lower bounds. |
|
| Method Summary | |
java.lang.Object |
clone()
Creates a clone of this parameter. |
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. |
java.lang.String |
getInvalidReason(java.lang.Object value)
Retrieves the reason that the specified value is not valid. |
long |
getLongValue()
Retrieves the value associated with this parameter as a Java long. |
long |
getLowerBound()
Retrieves the lower bound that will be used if a lower bound is to be enforced. |
long |
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 |
setLowerBound(long lowerBound)
Specifies the value to use as the lower bound, and indicates that a lower bound is to be enforced for this parameter. |
void |
setUpperBound(long 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(long value)
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 LongParameter()
setName, setDisplayName,
setDescription, or setValueFromString, then it
should be done here.
public LongParameter(java.lang.String name)
name - The name to use for this parameter.
public LongParameter(java.lang.String name,
long value)
name - The name to use for this parameter.value - The value to use for this parameter.
public LongParameter(java.lang.String name,
boolean isRequired,
long value)
name - The name to use for this parameter.isRequired - Indicates whether this parameter is required to have a
value.value - The value to use for this parameter.
public LongParameter(java.lang.String name,
java.lang.String displayName,
boolean isRequired,
long value)
name - The name to use for this parameter.displayName - The name to use for this parameter when it is
displayed to the end user.isRequired - Indicates whether this parameter is required to have a
value.value - The value to use for this parameter.
public LongParameter(java.lang.String name,
java.lang.String displayName,
java.lang.String description,
boolean isRequired,
long value)
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.isRequired - Indicates whether this parameter is required to have a
value.value - The value to use for this parameter.
public LongParameter(java.lang.String name,
java.lang.String displayName,
java.lang.String description,
boolean isRequired,
long value,
boolean hasLowerBound,
long lowerBound,
boolean hasUpperBound,
long upperBound)
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.isRequired - Indicates whether this parameter is required to have
a value.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).| Method Detail |
public long getLongValue()
public java.lang.Object getValue()
null will be returned. If it does have a value,
then that value will be returned as a Java Long object.
getValue in class Parameter
public void setValue(long value)
throws InvalidValueException
value - The value to use for this parameter.
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 long, 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 long getLowerBound()
public void setLowerBound(long 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 long getUpperBound()
public void setUpperBound(long 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 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 | |||||||||