|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.novell.nds.dirxml.shimhost.ShimConfigParams
public class ShimConfigParams
Encapsulation of XML shim parameters for shim init() methods defined
by shim authors. There are two types of these shim parameters:
"old-style" parameters and GCV-style parameters. This class hides
the difference when possible.
setGCVResolver() can be called to set a resolver object that will be used
instead of the default behavior.
| Field Summary | |
|---|---|
static String |
ATTR_NAME
Name of the XML 'name' attribute. |
static int |
DRIVER_OPTIONS
Constant specifying the options for the DriverShim.init() method. |
static int |
PUBLISHER_OPTIONS
Constant specifying the options for the PublicationShim.init() method. |
static int |
SUBSCRIBER_OPTIONS
Constant specifying the options for the SubscriptionShim.init() method. |
static String |
TAG_DRIVER_CONFIG
Tag name of the <driver-config> element. |
static String |
TAG_DRIVER_OPTIONS
Tag name of the <driver-options> element. |
static String |
TAG_PUBLISHER_OPTIONS
Tag name of the <publisher-options> element. |
static String |
TAG_SUBSCRIBER_OPTIONS
Tag name of the <subscriber-options> element. |
| Constructor Summary | |
|---|---|
ShimConfigParams()
Construct an empty ShimConfigParams instance. |
|
ShimConfigParams(Element driverConfig)
Construct a new ShimConfigParams instance from an XML <driver-config> element. |
|
| Method Summary | |
|---|---|
String |
getName()
Get name of these parameters |
ConfigElement |
getParams(int type)
Return the parameter set for a particular shim (driver, subscriber, publisher). |
boolean |
hasBeenModified()
Return true if this instance has been modified. |
void |
resetModified()
Reset the modified flag for this instance such that hasBeenModified()
will return false. |
void |
setGCVResolver(ShimParams.ReferenceResolver resolver)
Set a resolver object for resolving GCV references in GCV-style configuration parameters. |
void |
setName(String newName)
Set name of these parameters |
Element |
toInitDoc(Node parent,
int shimType)
Create an XML representation of one of the sets of parameters suitable for use with a shim init document. |
Element |
toXML(Node parent)
Create an XML representation of the shim configuration parameters. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String TAG_DRIVER_CONFIG
public static final String TAG_DRIVER_OPTIONS
public static final String TAG_SUBSCRIBER_OPTIONS
public static final String TAG_PUBLISHER_OPTIONS
public static final String ATTR_NAME
public static final int DRIVER_OPTIONS
DriverShim.init() method. Used
as a parameter toInitDoc(). Value of 0.
toInitDoc(org.w3c.dom.Node, int),
Constant Field Valuespublic static final int SUBSCRIBER_OPTIONS
SubscriptionShim.init() method. Used
as a parameter toInitDoc(). Value of 1.
toInitDoc(org.w3c.dom.Node, int),
Constant Field Valuespublic static final int PUBLISHER_OPTIONS
PublicationShim.init() method. Used
as a parameter toInitDoc(). Value of 2.
toInitDoc(org.w3c.dom.Node, int),
Constant Field Values| Constructor Detail |
|---|
public ShimConfigParams()
ShimConfigParams instance.
public ShimConfigParams(Element driverConfig)
throws XMLException
driverConfig - Element containing XML representation
XMLException - if the XML representation is incorrect| Method Detail |
|---|
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 called
hasBeenModified in interface ConfigElementtrue or falseresetModified()public void resetModified()
hasBeenModified()
will return false.
resetModified in interface ConfigElementhasBeenModified()
public ConfigElement getParams(int type)
throws IllegalArgumentException
type - one of DRIVER_OPTIONS, SUBSCRIBER_OPTIONS, PUBLISHER_OPTIONS
null, an OldStyleParams instance, or a ShimParams instance.
IllegalArgumentException - thrown if type parameter is incorrectpublic Element toXML(Node parent)
resetModified().
toXML in interface ConfigElementparent - Node under which to create the XML representation
ElementhasBeenModified(),
resetModified()
public Element toInitDoc(Node parent,
int shimType)
throws IllegalArgumentException
parent - Node under which to construct the XML representationshimType - one of DRIVER_OPTIONS, SUBSCRIBER_OPTIONS,
or PUBLISHER_OPTIONS
Element
IllegalArgumentExceptionpublic String getName()
public void setName(String newName)
newName - namepublic void setGCVResolver(ShimParams.ReferenceResolver resolver)
null is passed then a default (fake)
GCV resolver is used which will resolve all GCVs, but not necessarily
to the type expected (all resolutions are to string-type GCVs with
the same value).
resolver - implementation to resolve <gcv-ref> elements in
GCV-style init params
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||