public class Parameter extends java.lang.Object implements CloneImplemented, java.io.Serializable
ParameterList
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected static java.lang.String |
CLASS_TYPE_TAG |
static java.lang.String |
ENC_SUFFIX |
protected static java.lang.String |
ENC_VALUE_TAG |
protected static java.lang.String |
KEY_TAG |
protected static java.lang.String |
NAME_TAG |
protected static java.lang.String |
OTHER_TYPE_TAG |
protected static java.lang.String |
TYPE_MAP_TAG |
protected static java.lang.String |
VALUE_TAG |
Constructor and Description |
---|
Parameter(org.w3c.dom.Element paramEl) |
Parameter(java.lang.String singleToken)
Constructs a parameter that is a single-value type parameter.
|
Parameter(java.lang.String key,
java.lang.String value)
Constructs a parameter.
|
Parameter(java.lang.String key,
java.lang.String value,
java.lang.Object type)
Constructs a parameter.
|
Parameter(java.lang.String name,
java.lang.String key,
java.lang.String value)
Constructs a parameter.
|
Parameter(java.lang.String name,
java.lang.String key,
java.lang.String value,
java.lang.Object type)
Constructs a parameter.
|
Parameter(java.lang.String name,
java.lang.String key,
java.lang.String value,
java.lang.Object type,
boolean enableValidation)
Constructs a parameter.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
betweenTerms()
Returns the char to smash between parameters if you want a default
|
java.lang.Object |
clone()
Will return a replica of this Parameter
|
boolean |
equals(java.lang.Object o)
Does a comparison of the given Object.
|
java.lang.String |
getKey()
Gets the key attribute for this Parameter
|
java.lang.String |
getName()
Gets the label for this parameter.
|
java.lang.Object |
getType()
Returns the Parameter's declared type.
|
java.lang.String |
getValue()
Gets the value attribute for this Parameter
|
int |
hashCode() |
boolean |
isEnableValidation()
Check Parameter is enabled for validation or not.
|
boolean |
isEncrypted()
Return true if this is to be encrypted when stored
|
static boolean |
isParameterTag(org.w3c.dom.Element e) |
boolean |
isSingle()
Is this a singleton parameter?
|
void |
setEnableValidation(boolean enableValidation)
Set enableValidation attribute for validation
|
void |
setEncrypted(boolean encrypted)
Set flag if the value is to be encrypted when stored
|
void |
setKey(java.lang.String key)
Sets the key attribute for this Parameter
|
void |
setName(java.lang.String name)
Allows us to set a label or name for the Parameter.
|
void |
setSingle(boolean single)
Sets the singleton attribute for this parameter
|
void |
setType(java.lang.Object type)
Allows you to set the Paramter type.
|
void |
setValue(java.lang.String value)
Sets the value attribute for this Parameter
|
protected void |
streamType(java.io.PrintWriter pw,
int indent) |
java.lang.String |
toString()
Builds a key=value string, or just a value string for the parameter
|
java.lang.String |
toString(boolean decoded)
Builds a key=value string, or just a value string for the parameter
|
void |
writeSimpleUnsafeXML(java.io.PrintWriter pw) |
void |
writeXML(java.io.PrintWriter pw,
int indent) |
public static final java.lang.String ENC_SUFFIX
protected static final java.lang.String TYPE_MAP_TAG
protected static final java.lang.String KEY_TAG
protected static final java.lang.String NAME_TAG
protected static final java.lang.String VALUE_TAG
protected static final java.lang.String ENC_VALUE_TAG
protected static final java.lang.String CLASS_TYPE_TAG
protected static final java.lang.String OTHER_TYPE_TAG
public Parameter(java.lang.String name, java.lang.String key, java.lang.String value, java.lang.Object type)
name
- - a human-readable label for the parameter. Used at times
when you need to build dynamic user interfaces from a ParameterListkey
- - the key to store and recall this parameter withvalue
- - the value for this parametertype
- - the Parameter's type, see the class description for morepublic Parameter(java.lang.String name, java.lang.String key, java.lang.String value, java.lang.Object type, boolean enableValidation)
name
- - a human-readable label for the parameter. Used at times
when you need to build dynamic user interfaces from a ParameterListkey
- - the key to store and recall this parameter withvalue
- - the value for this parametertype
- - the Parameter's type, see the class description for moreenableValidation
- - Enable Validation in Custom Editorpublic Parameter(java.lang.String name, java.lang.String key, java.lang.String value)
name
- - a human-readable label for the parameter. Used at times
when you need to build dynamic user interfaces from a ParameterListkey
- - the key to store and recall this parameter withvalue
- - the value for this parameterpublic Parameter(java.lang.String key, java.lang.String value, java.lang.Object type)
key
- - the key to store and recall this parameter withvalue
- - the value for this parameterpublic Parameter(java.lang.String key, java.lang.String value)
key
- - the key to store and recall this parameter withvalue
- - the value for this parameterpublic Parameter(java.lang.String singleToken)
singleToken
- - the value to store as a parameterParameterList
public Parameter(org.w3c.dom.Element paramEl)
public void setName(java.lang.String name)
name
- the label for the parameterpublic java.lang.String getName()
public java.lang.Object getType()
public void setType(java.lang.Object type)
type
- - the Parameter's typepublic void setEnableValidation(boolean enableValidation)
enableValidation
- - validation flagpublic boolean isEnableValidation()
public java.lang.Object clone()
clone
in interface CloneImplemented
clone
in class java.lang.Object
public boolean isEncrypted()
public void setEncrypted(boolean encrypted)
encrypted
- public void setKey(java.lang.String key)
key
- - the new key (nullable)
public java.lang.String getKey()
(nullable)
public void setValue(java.lang.String value)
value
- - new value (nullable)
public java.lang.String getValue()
(nullable)
public boolean isSingle()
public void setSingle(boolean single)
single
- boolean for whether this parameter is singleton or notpublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(boolean decoded)
decoded
- -- if true URLDecode the valuepublic static java.lang.String betweenTerms()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- object for comparisonpublic int hashCode()
hashCode
in class java.lang.Object
public void writeSimpleUnsafeXML(java.io.PrintWriter pw)
public void writeXML(java.io.PrintWriter pw, int indent)
protected void streamType(java.io.PrintWriter pw, int indent)
public static boolean isParameterTag(org.w3c.dom.Element e)
Copyright © 1998-2014 CA, Inc. All Rights Reserved.