diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/com/memberwebs/ldapxml/LXHook.java | 23 | ||||
-rw-r--r-- | src/com/memberwebs/ldapxml/LXReader.java | 3 | ||||
-rw-r--r-- | src/com/memberwebs/ldapxml/helpers/LXSAXHandler.java | 2 |
3 files changed, 20 insertions, 8 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; diff --git a/src/com/memberwebs/ldapxml/LXReader.java b/src/com/memberwebs/ldapxml/LXReader.java index 0901d65..420925a 100644 --- a/src/com/memberwebs/ldapxml/LXReader.java +++ b/src/com/memberwebs/ldapxml/LXReader.java @@ -338,7 +338,7 @@ public class LXReader * Transform an already retrieved LDAP entry. * * @param doc The document from which to create elements. - * @param The LDAP entry. + * @param entry The LDAP entry. * @return The DOM element or null if not found in map. */ public Element retrieveEntry(Document doc, LDAPEntry entry) @@ -468,7 +468,6 @@ public class LXReader * @param clsEl The parent class element. * @param entry The LDAP entry to retrieve attributes from. * @param lxcls The class these attributes belong to. - * @param hook The hook for conversions. * @param specs Additional retrieval specifications. */ private void retrieveAttributes(String[] attributes, Element clsEl, diff --git a/src/com/memberwebs/ldapxml/helpers/LXSAXHandler.java b/src/com/memberwebs/ldapxml/helpers/LXSAXHandler.java index 55f6b73..9c36534 100644 --- a/src/com/memberwebs/ldapxml/helpers/LXSAXHandler.java +++ b/src/com/memberwebs/ldapxml/helpers/LXSAXHandler.java @@ -123,7 +123,7 @@ public class LXSAXHandler * Called when a new element is encountered in the XML file. * * @param uri The element namespace - * @param localname The plain element name. + * @param localName The plain element name. * @param qName The fully quallified element name. * @param attributes The element's attributes. */ |