com.novell.nds.dirxml.driver
Class DriverFilter

java.lang.Object
  extended by com.novell.nds.dirxml.driver.DriverFilter

public class DriverFilter
extends Object

Allows easy use of publisher or subscriber filter passed to shim init() method.


Constructor Summary
DriverFilter()
          Construct an empty DriverFilter instance.
DriverFilter(Element filterElement)
          Construct a DriverFilter instance based on a driver-filter element from an XDS document
 
Method Summary
 ClassFilter getClassFilter(String className)
          Return the ClassFilter corresponding to the passed class name.
 boolean passClass(String className)
          Return true if the passed class is in the filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DriverFilter

public DriverFilter(Element filterElement)
Construct a DriverFilter instance based on a driver-filter element from an XDS document

Parameters:
filterElement - The DOM element containing the filter information

DriverFilter

public DriverFilter()
Construct an empty DriverFilter instance.

This is useful for constructing an empty filter so that the filter reference doesn't have to be checked for 0 each time it is used if no filter is provided (which shouldn't happen anyway).

Method Detail

passClass

public boolean passClass(String className)
Return true if the passed class is in the filter.

This is a convenience method that is implemented using getClassFilter().

Parameters:
className - The name of the class to check.
Returns:
true if class is in filter.

getClassFilter

public ClassFilter getClassFilter(String className)
Return the ClassFilter corresponding to the passed class name.

Parameters:
className - The name of the class for which the filter is to be returned.
Returns:
The ClassFilter for the passed class name, or null if passed class isn't in filter.