com.novell.nds.dirxml.shimhost
Class Filter.FilterItem

java.lang.Object
  extended bycom.novell.nds.dirxml.shimhost.Filter.FilterItem
Direct Known Subclasses:
Filter.FilterAttr, Filter.FilterClass
Enclosing class:
Filter

public abstract static class Filter.FilterItem
extends Object

Base class for FilterClass and FilterAttr classes. Contains common data for both.


Field Summary
protected  boolean modified
           
protected  String name
           
protected  int[] syncMode
           
 
Method Summary
protected abstract  void checkSyncMode(int mode)
          Implemented by derived classes to check sync mode parameters (filter-class doesn't allow "reset" or "notify"
protected abstract  String getElementName()
          Implemented by derived classes to return the tag name of the XML element used for an XML description of the class derived from FilterItem.
 String getName()
          Get the name of this FilterItem
 int getSyncMode(int channel)
          Get a channel sync mode for this FilterItem
 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 setSyncMode(int mode, int channel)
          Set a channel sync mode for this FilterItem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected final String name

syncMode

protected int[] syncMode

modified

protected boolean modified
Method Detail

getName

public String getName()
Get the name of this FilterItem

Returns:
name

hasBeenModified

public boolean hasBeenModified()
Return 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:

  1. The instance was constructed from an XML representation.
  2. resetModified() was last called

Returns:
true or false
See Also:
resetModified(), Filter.toXML(org.w3c.dom.Node)

resetModified

public void resetModified()
Reset the modified flag for this instance such that hasBeenModified() will return false.

See Also:
hasBeenModified()

getSyncMode

public int getSyncMode(int channel)
                throws IllegalArgumentException
Get a channel sync mode for this FilterItem

Parameters:
channel - SUB or PUB
Returns:
SYNC_SYNC, SYNC_NOTIFY, SYNC_RESET, or SYNC_IGNORE
Throws:
IllegalArgumentException - if channel is incorrect

setSyncMode

public void setSyncMode(int mode,
                        int channel)
                 throws IllegalArgumentException
Set a channel sync mode for this FilterItem

Parameters:
mode - SYNC_SYNC, SYNC_NOTIFY, SYNC_RESET, or SYNC_IGNORE
channel - SUB or PUB
Throws:
IllegalArgumentException - if mode is incorrect or if channel is incorrect.

checkSyncMode

protected abstract void checkSyncMode(int mode)
                               throws IllegalArgumentException
Implemented by derived classes to check sync mode parameters (filter-class doesn't allow "reset" or "notify"

Parameters:
mode - sync mode value to check.
Throws:
IllegalArgumentException - if mode parameter isn't one of SYNC_SYNC, SYNC_NOTIFY, SYNC_RESET, or SYNC_IGNORE or if mode parameter isn't valid for derived class.

getElementName

protected abstract String getElementName()
Implemented by derived classes to return the tag name of the XML element used for an XML description of the class derived from FilterItem.

Returns:
tag name