org.treebind
Class Ldap2JavaObjectFilter

java.lang.Object
  extended byorg.treebind.DefaultPipeElementImplementation
      extended byorg.treebind.DefaultFilterImplementation
          extended byorg.treebind.Ldap2JavaObjectFilter
All Implemented Interfaces:
Filter, PipeElement, Sink, Source

public class Ldap2JavaObjectFilter
extends DefaultFilterImplementation
implements Filter

Filter designed to stand between a LdapSource and a JavaObjectSink in a Ldap2JavaObjectPipe. This filter takes care or the impedence mismatches between the LDAP and Java object models.

Author:
vdv
See Also:
Filter, LdapSource, JavaObjectSink, Ldap2JavaObjectPipe

Constructor Summary
Ldap2JavaObjectFilter(Ldap2JavaObjectPipe pipe)
          Creates a new Ldap2JavaObjectFilter in its pipe.
 
Method Summary
 void addLeaf(Name role, Name nature, java.lang.Object value)
          Pour a new LeafProperty into the sink.
 Name convertNature(Name role, Name nature)
          Converts a nature.
 Name convertRole(Name role, Name nature)
          Converts a role.
 void endProperty()
          Declares to the sink the end of the current ComplexProperty.
 void startProperty(Name role, Name nature)
          Start pouring a new ComplexProperty into the sink.
 
Methods inherited from class org.treebind.DefaultFilterImplementation
getSink, setSink
 
Methods inherited from class org.treebind.DefaultPipeElementImplementation
getPipe, setPipe
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.treebind.Source
getSink, setSink
 
Methods inherited from interface org.treebind.PipeElement
getPipe, setPipe
 

Constructor Detail

Ldap2JavaObjectFilter

public Ldap2JavaObjectFilter(Ldap2JavaObjectPipe pipe)
Creates a new Ldap2JavaObjectFilter in its pipe.

Parameters:
pipe -
Method Detail

addLeaf

public void addLeaf(Name role,
                    Name nature,
                    java.lang.Object value)
             throws java.lang.Exception
Description copied from interface: Sink
Pour a new LeafProperty into the sink.

Specified by:
addLeaf in interface Sink
Overrides:
addLeaf in class DefaultFilterImplementation
Throws:
java.lang.Exception

convertNature

public Name convertNature(Name role,
                          Name nature)
Description copied from class: DefaultFilterImplementation
Converts a nature. This method is used internaly to convert natures. Its implementation in this class returns the same nature. A filter that would only do name convertion could just overide this method together with the DefaultFilterImplementation.convertRole(Name, Name) method.

Overrides:
convertNature in class DefaultFilterImplementation
Parameters:
role - the role of the property being added
nature - the nature of the property being added
Returns:
the converted nature of the property being added
See Also:
DefaultFilterImplementation.convertRole(Name, Name)

convertRole

public Name convertRole(Name role,
                        Name nature)
Description copied from class: DefaultFilterImplementation
Converts a role. This method is used internaly to convert roles. Its implementation in this class returns the same role. A filter that would only do name convertion could just overide this method together with the DefaultFilterImplementation.convertNature(Name, Name) method.

Overrides:
convertRole in class DefaultFilterImplementation
Parameters:
role - the role of the property being added
nature - the nature of the property being added
Returns:
the converted role of the property being added
See Also:
DefaultFilterImplementation.convertNature(Name, Name)

endProperty

public void endProperty()
                 throws java.lang.Exception
Description copied from interface: Sink
Declares to the sink the end of the current ComplexProperty.

Specified by:
endProperty in interface Sink
Overrides:
endProperty in class DefaultFilterImplementation
Throws:
java.lang.Exception

startProperty

public void startProperty(Name role,
                          Name nature)
                   throws java.lang.Exception
Description copied from interface: Sink
Start pouring a new ComplexProperty into the sink.

Specified by:
startProperty in interface Sink
Overrides:
startProperty in class DefaultFilterImplementation
Throws:
java.lang.Exception