summaryrefslogtreecommitdiff
path: root/src/com/memberwebs/ldapxml/LXHook.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/memberwebs/ldapxml/LXHook.java')
-rw-r--r--src/com/memberwebs/ldapxml/LXHook.java40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/com/memberwebs/ldapxml/LXHook.java b/src/com/memberwebs/ldapxml/LXHook.java
new file mode 100644
index 0000000..eac7a6c
--- /dev/null
+++ b/src/com/memberwebs/ldapxml/LXHook.java
@@ -0,0 +1,40 @@
+package com.memberwebs.ldapxml;
+
+import com.novell.ldap.*;
+import org.w3c.dom.*;
+
+/**
+ * Interface for hooking into LX processing.
+ *
+ * @author nielsen@memberwebs.com
+ * @version 0.5
+ */
+public interface LXHook
+{
+ /**
+ * Initialize this hook.
+ *
+ * @param obj An initialization parameter passed into LXSpecs.setData
+ */
+ public void initialize(Object obj)
+ throws LXException;
+
+ /**
+ * Allows pre processing of an entry retrieved from LDAP
+ *
+ * @param entry The LDAP entry retrieved
+ * @return If false then this element will not be included in tree.
+ */
+ public boolean prefix(LDAPEntry entry)
+ throws LXException;
+
+ /**
+ * Allows post processing of an element retrieved from LDAP.
+ *
+ * @param entry The LDAP entry retrieved.
+ * @param el The DOM element constructed.
+ * @return If false then this element will not be included in tree.
+ */
+ public boolean postfix(LDAPEntry entry, Element el)
+ throws LXException;
+} \ No newline at end of file