|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.novell.nds.dirxml.shimhost.Filter
Class holding DirXML filter information for a shim.
Note that class names and attribute names are treated as case-insenstive.
Nested Class Summary | |
static class |
Filter.FilterAttr
Class representing a <filter-attr> element. |
static class |
Filter.FilterClass
Class representing a <filter-class> element. |
static class |
Filter.FilterItem
Base class for FilterClass and FilterAttr classes. |
Field Summary | |
static String |
ATTR_ATTR_NAME
Name of the XML 'attr-name' attribute. |
static String |
ATTR_CLASS_NAME
Name of the XML 'class-name' attribute. |
static String |
ATTR_MERGE_AUTHORITY
Name of the XML 'merge-authority' attribute. |
static String |
ATTR_PUBLISHER
Name of the XML 'publisher' attribute. |
static String |
ATTR_PUBLISHER_CREATE_HOMEDIR
Name of the XML 'publisher-create-homedir' attribute. |
static String |
ATTR_PUBLISHER_OPTIMIZE_MODIFY
Name of the XML 'publisher-optimize-modify' attribute. |
static String |
ATTR_PUBLISHER_TRACK_TEMPLATE_MEMBER
Name of the XML 'publisher-track-template-member' attribute. |
static String |
ATTR_SUBSCRIBER
Name of the XML 'subscriber' attribute. |
static int |
MERGE_APP
Constant representing the "app" value for the 'merge-authority' attribute on <filter-attr> elements. |
static int |
MERGE_DEFAULT
Constant representing the "default" value for the 'merge-authority' attribute on <filter-attr> elements. |
static int |
MERGE_EDIR
Constant representing the "edir" value for the 'merge-authority' attribute on <filter-attr> elements. |
static int |
MERGE_NONE
Constant representing the "none" value for the 'merge-authority' attribute on <filter-attr> elements. |
static int |
PUB
Constant representing the Publisher channel. |
static int |
SUB
Constant representing the Subscriber channel. |
static int |
SYNC_IGNORE
Constant representing the "ignore" value for the 'subscriber' and 'publisher' attributes on <filter-class> and <filter-attr> elements. |
static int |
SYNC_NOTIFY
Constant representing the "notify" value for the 'subscriber' and 'publisher' attributes on <filter-attr> elements. |
static int |
SYNC_RESET
Constant representing the "reset" value for the 'subscriber' and 'publisher' attributes on <filter-attr> elements. |
static int |
SYNC_SYNC
Constant representing the "sync" value for the 'subscriber' and 'publisher' attributes on <filter-class> and <filter-attr> elements. |
static String |
TAG_FILTER
Tag name of the <filter> element. |
static String |
TAG_FILTER_ATTR
Tag name of the <filter-attr> element. |
static String |
TAG_FILTER_CLASS
Tag name of the <filter-class> element. |
static String |
VAL_FALSE
"false" |
static String |
VAL_TRUE
"true" |
Constructor Summary | |
Filter()
Create a new, empty Filter instance. |
|
Filter(Element filterElement)
Create a Filter object from an XML representation. |
|
Filter(Filter source)
Construct a new Filter based on an existing Filter . |
Method Summary | |
static boolean |
getBoolean(String string)
Get the boolean value corresponding to an XML attribute string value. |
static String |
getBooleanString(boolean value)
Get the XML attribute string value for a boolean value. |
Filter.FilterClass |
getFilterClass(String className)
Get the FilterClass instance for a class in this Filter instance
if it exists. |
static int |
getMergeAuthorityInt(String string)
Get the sync mode constant corresponding to the passed merge authority string (XML attribute value). |
static String |
getMergeAuthorityString(int auth)
Get the XML attribute value given a merge authority constant ( MERGE_EDIR ,
MERGE_APP , etc.) |
static int |
getSyncModeInt(String string)
Get the sync mode constant corresponding to the passed sync mode string (XML attribute value). |
static String |
getSyncModeString(int mode)
Get the XML attribute value given a sync mode constant ( SYNC_SYNC ,
SYNC_IGNORE , etc.) |
boolean |
hasBeenModified()
Return true if this instance has been modified.
|
Iterator |
iterator()
Get an Iterator that returns the FilterClass instances in
this Filter . |
Filter.FilterClass |
newFilterClass(String className)
Create a new entry in this Filter instance for a class,
if such an entry doesn't already exist. |
Filter.FilterClass |
removeFilterClass(String className)
Remove the entry for a class from this Filter instance
if it exists. |
void |
resetModified()
Reset the modified flag for this instance such that hasBeenModified()
will return false . |
Element |
toV1FilterXML(Node parent,
int channel)
Construct a DirXML 1.x representation of the filter for the passed channel. |
Element |
toXML(Node parent)
Create an XML representation for this Filter object under the passed
Node .
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int SUB
FilterItem.getSyncMode()
, FilterItem.setSyncMode()
and toV1FilterXML()
.
Filter.FilterItem.getSyncMode(int)
,
Filter.FilterItem.setSyncMode(int, int)
,
toV1FilterXML(org.w3c.dom.Node, int)
,
Constant Field Valuespublic static final int PUB
FilterItem.getSyncMode()
, FilterItem.setSyncMode()
and toV1FilterXML()
.
Filter.FilterItem.getSyncMode(int)
,
Filter.FilterItem.setSyncMode(int, int)
,
toV1FilterXML(org.w3c.dom.Node, int)
,
Constant Field Valuespublic static final int SYNC_SYNC
getSyncModeString()
, getSyncModeInt()
, FilterItem.getSyncMode()
,
and FilterItem.setSyncMode()
.
getSyncModeString(int)
,
getSyncModeInt(java.lang.String)
,
Filter.FilterItem.getSyncMode(int)
,
Filter.FilterItem.setSyncMode(int, int)
,
Constant Field Valuespublic static final int SYNC_RESET
getSyncModeString()
, getSyncModeInt()
, FilterItem.getSyncMode()
,
and FilterItem.setSyncMode()
.
getSyncModeString(int)
,
getSyncModeInt(java.lang.String)
,
Filter.FilterItem.getSyncMode(int)
,
Filter.FilterItem.setSyncMode(int, int)
,
Constant Field Valuespublic static final int SYNC_NOTIFY
getSyncModeString()
, getSyncModeInt()
, FilterItem.getSyncMode()
,
and FilterItem.setSyncMode()
.
getSyncModeString(int)
,
getSyncModeInt(java.lang.String)
,
Filter.FilterItem.getSyncMode(int)
,
Filter.FilterItem.setSyncMode(int, int)
,
Constant Field Valuespublic static final int SYNC_IGNORE
getSyncModeString()
, getSyncModeInt()
, FilterItem.getSyncMode()
,
and FilterItem.setSyncMode()
.
getSyncModeString(int)
,
getSyncModeInt(java.lang.String)
,
Filter.FilterItem.getSyncMode(int)
,
Filter.FilterItem.setSyncMode(int, int)
,
Constant Field Valuespublic static final int MERGE_DEFAULT
getMergeAuthorityString()
,
getMergeAuthorityInt()
, FilterAttr.getMergeAuthority()
,
and FilterAttr.setMergeAuthority()
.
getMergeAuthorityString(int)
,
getMergeAuthorityInt(java.lang.String)
,
Filter.FilterAttr.getMergeAuthority()
,
Filter.FilterAttr.setMergeAuthority(int)
,
Constant Field Valuespublic static final int MERGE_EDIR
getMergeAuthorityString()
,
getMergeAuthorityInt()
, FilterAttr.getMergeAuthority()
,
and FilterAttr.setMergeAuthority()
.
getMergeAuthorityString(int)
,
getMergeAuthorityInt(java.lang.String)
,
Filter.FilterAttr.getMergeAuthority()
,
Filter.FilterAttr.setMergeAuthority(int)
,
Constant Field Valuespublic static final int MERGE_APP
getMergeAuthorityString()
,
getMergeAuthorityInt()
, FilterAttr.getMergeAuthority()
,
and FilterAttr.setMergeAuthority()
.
getMergeAuthorityString(int)
,
getMergeAuthorityInt(java.lang.String)
,
Filter.FilterAttr.getMergeAuthority()
,
Filter.FilterAttr.setMergeAuthority(int)
,
Constant Field Valuespublic static final int MERGE_NONE
getMergeAuthorityString()
,
getMergeAuthorityInt()
, FilterAttr.getMergeAuthority()
,
and FilterAttr.setMergeAuthority()
.
getMergeAuthorityString(int)
,
getMergeAuthorityInt(java.lang.String)
,
Filter.FilterAttr.getMergeAuthority()
,
Filter.FilterAttr.setMergeAuthority(int)
,
Constant Field Valuespublic static final String TAG_FILTER
public static final String TAG_FILTER_CLASS
public static final String TAG_FILTER_ATTR
public static final String ATTR_CLASS_NAME
public static final String ATTR_ATTR_NAME
public static final String ATTR_PUBLISHER
public static final String ATTR_SUBSCRIBER
public static final String ATTR_PUBLISHER_CREATE_HOMEDIR
public static final String ATTR_PUBLISHER_TRACK_TEMPLATE_MEMBER
public static final String ATTR_MERGE_AUTHORITY
public static final String ATTR_PUBLISHER_OPTIMIZE_MODIFY
public static final String VAL_TRUE
public static final String VAL_FALSE
Constructor Detail |
public Filter()
Filter
instance.
public Filter(Filter source)
Filter
based on an existing Filter
.
source
- Filter
on which to base new instancepublic Filter(Element filterElement) throws XMLException
Filter
object from an XML representation.
filterElement
- <filter> element containing representation
XMLException
- if XML representation is incorrect in some wayMethod 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 ConfigElement
true
or false
resetModified()
public void resetModified()
hasBeenModified()
will return false
.
resetModified
in interface ConfigElement
hasBeenModified()
public Iterator iterator()
Iterator
that returns the FilterClass
instances in
this Filter
.
Iterator
that returns FilterClass
instancespublic Filter.FilterClass getFilterClass(String className)
FilterClass
instance for a class in this Filter
instance
if it exists.
className
- name of class
FilterClass
instance, or null
public Filter.FilterClass newFilterClass(String className)
Filter
instance for a class,
if such an entry doesn't already exist.
className
- name of class
FilterClass
instancepublic Filter.FilterClass removeFilterClass(String className)
Filter
instance
if it exists.
className
- name of class
FilterClass
instance or null
public Element toXML(Node parent)
Filter
object under the passed
Node
.
Note that the act of creating an XML representation does not reset this instance's
modified flag. It must be reset by calling resetModified()
.
toXML
in interface ConfigElement
parent
- Node
under which to construct XML representation.
hasBeenModified()
,
resetModified()
public Element toV1FilterXML(Node parent, int channel)
parent
- Node
under which to construct XML representationchannel
- SUB
or PUB
public static String getSyncModeString(int mode) throws IllegalArgumentException
SYNC_SYNC
,
SYNC_IGNORE
, etc.)
mode
- SYNC_SYNC
, SYNC_NOTIFY
,
SYNC_RESET
, SYNC_IGNORE
String
containing the XML attribute value corresponding to the
passed constant ("sync", "notify", "reset", "ignore")
IllegalArgumentException
- if mode isn't a correct valuepublic static int getSyncModeInt(String string) throws IllegalArgumentException
string
- XML attribute value ("sync", "notify", "reset", "ignore")
SYNC_SYNC
, SYNC_NOTIFY
,
SYNC_RESET
, SYNC_IGNORE
IllegalArgumentException
- if string parameter is incorrectpublic static String getMergeAuthorityString(int auth) throws IllegalArgumentException
MERGE_EDIR
,
MERGE_APP
, etc.)
auth
- MERGE_DEFAULT
, MERGE_NONE
,
MERGE_EDIR
, MERGE_APP
String
containing the XML attribute value corresponding to the
passed constant ("default", "none", "edir", "app")
IllegalArgumentException
- if auth isn't a correct valuepublic static int getMergeAuthorityInt(String string) throws IllegalArgumentException
string
- XML attribute value ("default", "none", "edir", "app")
MERGE_DEFAULT
, MERGE_NONE
,
MERGE_EDIR
, MERGE_APP
IllegalArgumentException
- if string parameter is incorrectpublic static String getBooleanString(boolean value)
value
- true
or false
public static boolean getBoolean(String string) throws IllegalArgumentException
string
- "true" or "false"
true
or false
IllegalArgumentException
- if string parameter isn't one of "true" or "false"
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |