summaryrefslogtreecommitdiff
path: root/src/com/memberwebs/ldapxml/helpers/LXDefaultHook.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/memberwebs/ldapxml/helpers/LXDefaultHook.java')
-rw-r--r--src/com/memberwebs/ldapxml/helpers/LXDefaultHook.java66
1 files changed, 66 insertions, 0 deletions
diff --git a/src/com/memberwebs/ldapxml/helpers/LXDefaultHook.java b/src/com/memberwebs/ldapxml/helpers/LXDefaultHook.java
new file mode 100644
index 0000000..552c4bc
--- /dev/null
+++ b/src/com/memberwebs/ldapxml/helpers/LXDefaultHook.java
@@ -0,0 +1,66 @@
+package com.memberwebs.ldapxml.helpers;
+
+import com.novell.ldap.*;
+import org.w3c.dom.*;
+
+import com.memberwebs.ldapxml.*;
+
+/**
+ * Default implementation of LX processing hook.
+ *
+ * @author nielsen@memberwebs.com
+ * @version 0.5
+ */
+public class LXDefaultHook
+ implements LXHook
+{
+ /**
+ * No initialization necessary.
+ *
+ * @param obj Initialization parameter.
+ */
+ 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
+ {
+ return true;
+ }
+
+
+ /**
+ * Does no post processing on element.
+ *
+ * @param entry The LDAP entry read.
+ * @param el The DOM element constructed.
+ * @return Always returns true.
+ */
+ public boolean postfix(LDAPEntry entry, Element el)
+ throws LXException
+ {
+ return true;
+ }
+
+ /**
+ * No conversion done for attributes.
+ *
+ * @param attrName The attribute name.
+ * @param value The attribute value.
+ * @return The converted value.
+ */
+ public String convert(String attrName, String syntax, String value)
+ throws LXException
+ {
+ return value;
+ }
+} \ No newline at end of file