diff options
Diffstat (limited to 'src/com/memberwebs/ldapxml/LXHook.java')
-rw-r--r-- | src/com/memberwebs/ldapxml/LXHook.java | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/src/com/memberwebs/ldapxml/LXHook.java b/src/com/memberwebs/ldapxml/LXHook.java index 6b12e08..7efc6ec 100644 --- a/src/com/memberwebs/ldapxml/LXHook.java +++ b/src/com/memberwebs/ldapxml/LXHook.java @@ -51,18 +51,28 @@ import com.novell.ldap.LDAPEntry; public interface LXHook { /** - * Initialize this hook. + * Initialize this hook. The parameter is passed through to + * this object by creating an LXSpecs object, using + * LXSpecs.setData to set custom data and then one of the + * LXReader methods that allow passing in of a LXSpecs object. * - * @param obj An initialization parameter passed into LXSpecs.setData + * The custom data will then be passed to this method the + * first time that this hook is used. + * + * @param obj An initialization parameter */ public void initialize(Object obj) throws LXException; /** - * Allows pre processing of an entry retrieved from LDAP + * Allows pre processing of an entry retrieved from LDAP. + * + * By modifying the passed LDAPEntry object, you can affect the + * way the map handles your data. Returning false, will cause + * this entry to be ignored as if it didn't exist. * * @param entry The LDAP entry retrieved - * @return If false then this element will not be included in tree. + * @return If false then this element will not be included. */ public boolean prefix(LDAPEntry entry) throws LXException; @@ -70,9 +80,12 @@ public interface LXHook /** * Allows post processing of an element retrieved from LDAP. * + * You can modify the final constructed XML element at this + * point. By returning false you cause this element to be discarded. + * * @param entry The LDAP entry retrieved. * @param el The DOM element constructed. - * @return If false then this element will not be included in tree. + * @return If false then this element. */ public boolean postfix(LDAPEntry entry, Element el) throws LXException; |