public class OldStyleParams extends java.lang.Object implements ConfigElement
| Modifier and Type | Class and Description |
|---|---|
static class |
OldStyleParams.Param
Encapsulation of a single shim parameter.
|
static class |
OldStyleParams.PasswordParam
Encapsulation of a "password-ref" shim parameter.
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ATTR_DISPLAY_NAME
Name of the XML 'display-name' attribute.
|
static java.lang.String |
ATTR_TYPE
Name of the XML 'type' attribute.
|
static java.lang.String |
VAL_PASSWORD_REF
"password-ref"
|
| Constructor and Description |
|---|
OldStyleParams()
Create an empty
OldStyleParams instance. |
OldStyleParams(org.w3c.dom.Node parent)
Create an
OldStyleParams instance from an XML representation. |
| Modifier and Type | Method and Description |
|---|---|
void |
addParam(OldStyleParams.Param param)
Add an old-style shim parameter to this instance.
|
OldStyleParams.Param |
getParam(java.lang.String paramName)
Get a shim parameter from this instance by name.
|
boolean |
hasBeenModified()
Return
true if this instance has been modified. |
java.util.Iterator |
iterator()
Get an
Iterator that will return all the Param instances in
this OldStyleParams instance. |
void |
removeParam(java.lang.String paramName)
Remove a shim parameter from this instance.
|
void |
resetModified()
Reset the modified flag for this instance such that
hasBeenModified()
will return false. |
org.w3c.dom.Element |
toXML(org.w3c.dom.Node parent)
Create an XML representation of the shim parameters
encapsulated in this instance.
|
public static final java.lang.String ATTR_DISPLAY_NAME
public static final java.lang.String ATTR_TYPE
public static final java.lang.String VAL_PASSWORD_REF
public OldStyleParams()
OldStyleParams instance.public OldStyleParams(org.w3c.dom.Node parent)
OldStyleParams instance from an XML representation.parent - Node containing the parameter elements (typically
<driver-options>, <subscriber-options>, or <publisher-options>public boolean hasBeenModified()
true if this instance has been modified.
The instance is considered to have been modified if a change was made
that affects the persistent representation since:
resetModified() was last calledhasBeenModified in interface ConfigElementtrue or falseresetModified(),
toXML(org.w3c.dom.Node)public void resetModified()
hasBeenModified()
will return false.resetModified in interface ConfigElementhasBeenModified()public void addParam(OldStyleParams.Param param)
param - Param instance to addpublic void removeParam(java.lang.String paramName)
paramName - name of parameterpublic OldStyleParams.Param getParam(java.lang.String paramName)
paramName - name of parameterParam instance or null, if no parameter has the passed namepublic java.util.Iterator iterator()
Iterator that will return all the Param instances in
this OldStyleParams instance.Iteratorpublic org.w3c.dom.Element toXML(org.w3c.dom.Node parent)
resetModified().toXML in interface ConfigElementparent - Node under which to construct XML representationElementhasBeenModified(),
resetModified()