|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.slamd.parameter.Parameter
This class defines a generic parameter that can be passed to a job to customize the way that it operates. It also defines functions that can be used to request and accept the value in the context of an HTML form.
| Field Summary | |
protected java.lang.String |
description
|
protected java.lang.String |
displayName
|
protected boolean |
isRequired
|
protected java.lang.String |
name
|
protected java.lang.Object |
value
|
| Constructor Summary | |
Parameter()
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. |
|
Parameter(java.lang.String name,
java.lang.String displayName,
java.lang.String description,
boolean isRequired,
java.lang.Object value)
Creates a new instance of the Parameter based on the provided information. |
|
| Method Summary | |
abstract java.lang.Object |
clone()
Creates a clone of this parameter. |
static Parameter |
decode(ASN1Element element)
Decodes the provided ASN.1 element as a parameter. |
ASN1Element |
encode()
Encodes this parameter as an ASN.1 element. |
java.lang.String |
getDescription()
Retrieves the description for this parameter. |
java.lang.String |
getDisplayName()
Retrieves the name of this parameter as it is displayed to the end user. |
abstract 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. |
abstract 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 |
getHTMLPostValue()
Retrieves the value of this parameter as it would be submitted by a browser posting the request. |
java.lang.String |
getInvalidReason()
Retrieves the reason that the current value is not valid. |
abstract java.lang.String |
getInvalidReason(java.lang.Object value)
Retrieves the reason that the specified value is not valid. |
java.lang.String |
getName()
Retrieves the name of this parameter as it is used internally. |
java.lang.Object |
getValue()
Retrieves the value for this parameter. |
abstract java.lang.String |
getValueString()
Retrieves a string representation of the value of this parameter. |
boolean |
hasValue()
Indicates whether a value has been specified for this parameter. |
abstract 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. |
boolean |
isRequired()
Indicates whether this parameter is required to have a value. |
boolean |
isValid()
Indicates whether the current value for this parameter is valid. |
boolean |
isValid(java.lang.Object value)
Indicates whether the specified value would be a valid value for this parameter. |
void |
setDescription(java.lang.String description)
Specifies the description for this parameter. |
void |
setDisplayName(java.lang.String displayName)
Specifies the name of this parameter as it should be displayed to the end user. |
void |
setName(java.lang.String name)
Specifies the name to use for this parameter. |
void |
setRequired(boolean isRequired)
Specifies whether this parameter is required to have a value. |
void |
setValue(java.lang.Object value)
Specifies the value to use for this parameter. |
abstract void |
setValueFrom(Parameter parameter)
Sets the value for this parameter from the information in the provided parameter. |
abstract void |
setValueFromString(java.lang.String valueString)
Specifies the value to use for this parameter from the provided String. |
java.lang.String |
toString()
Retrieves a string representation of this parameter. |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected boolean isRequired
protected java.lang.Object value
protected java.lang.String description
protected java.lang.String displayName
protected java.lang.String name
| Constructor Detail |
public Parameter()
setName, setDisplayName,
setDescription, or setValueFromString, then it
should be done here.
public Parameter(java.lang.String name,
java.lang.String displayName,
java.lang.String description,
boolean isRequired,
java.lang.Object value)
name - The name of the parameter as it is used internally.displayName - The name of the parameter as it is to be displayed to
the end user.description - A description of this parameter that provides more
information than just the name.isRequired - Indicates whether this parameter must have a value.value - The value for this parameter.| Method Detail |
public final java.lang.String getName()
public final void setName(java.lang.String name)
name - The name to use for this parameter.public final java.lang.String getDisplayName()
public final void setDisplayName(java.lang.String displayName)
displayName - The name of this parameter as it should be displayed
to the end user.public final java.lang.String getDescription()
public final void setDescription(java.lang.String description)
description - The description for this parameter.public final boolean isRequired()
true if this parameter is required to have a value,
or false if it does not need a value.public final void setRequired(boolean isRequired)
isRequired - Indicates whether this parameter is required to have
a value.public java.lang.Object getValue()
public void setValue(java.lang.Object value)
throws InvalidValueException
value - The value to use for this parameter.
InvalidValueException - If the specified value is not acceptable
for use in this parameter.public abstract void setValueFrom(Parameter parameter)
parameter - The parameter from which to take the value for this
parameter.public abstract java.lang.String getValueString()
public abstract void setValueFromString(java.lang.String valueString)
throws InvalidValueException
valueString - 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 boolean hasValue()
true if a value has been specified for this parameter
or false if not.public final boolean isValid()
true if the current value for this parameter is
valid, or false if it is not.public final boolean isValid(java.lang.Object value)
value - The value for which to make the determination.
true if the specified value would be a valid value
for this parameter, or false if it would not be.public final java.lang.String getInvalidReason()
null if it is valid.public abstract java.lang.String getInvalidReason(java.lang.Object value)
value - The value for which to make the determination.
null if it is valid.public abstract java.lang.String getDisplayValue()
public java.lang.String getHTMLDisplayValue()
public java.lang.String getHTMLPostValue()
public abstract java.lang.String getHTMLInputForm(java.lang.String prefix)
prefix - The prefix that should be placed in front of the parameter
name as the name of the form element.
public abstract void htmlInputFormToValue(java.lang.String[] values)
throws InvalidValueException
values - 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.String toString()
public abstract java.lang.Object clone()
public static final Parameter decode(ASN1Element element)
throws SLAMDException
element - The ASN.1 element to decode.
SLAMDException - If the provided ASN.1 element cannot be decoded
as a parameter.public final ASN1Element encode()
Parameter ::= SEQUENCE {
className OCTET STRING,
name OCTET STRING,
value OCTET STRING }
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||