public abstract class AbstractDsml extends Object implements Serializable
AbstractDsml contains functions for converting LDAP search
result sets into DSML.| Modifier and Type | Field and Description |
|---|---|
protected LdapBeanFactory |
beanFactory
Ldap bean factory.
|
protected org.apache.commons.logging.Log |
logger
Log for this class.
|
| Constructor and Description |
|---|
AbstractDsml() |
| Modifier and Type | Method and Description |
|---|---|
abstract org.dom4j.Document |
createDsml(Iterator<SearchResult> results)
This will take the results of a prior LDAP query and convert it to a DSML
Document. |
abstract org.dom4j.Document |
createDsml(LdapResult result)
This will take the results of a prior LDAP query and convert it to a DSML
Document. |
protected org.dom4j.Element |
createDsmlAttribute(String attrName,
Set<?> attrValues,
org.dom4j.Namespace ns,
String elementName,
String elementAttrName,
String elementValueName)
This will take an attribute name and it's values and return a DSML
attribute element.
|
protected List<org.dom4j.Element> |
createDsmlAttributes(LdapAttributes ldapAttributes,
org.dom4j.Namespace ns)
This will return a list of DSML attribute elements from the supplied
LdapAttributes. |
protected org.dom4j.Element |
createDsmlEntry(org.dom4j.QName entryName,
LdapEntry ldapEntry,
org.dom4j.Namespace ns)
This will take an LDAP search result and convert it to a DSML entry
element.
|
protected LdapEntry |
createLdapEntry(org.dom4j.Element entryElement)
This will take a DSML
Element containing an entry of type
|
protected abstract LdapResult |
createLdapResult(org.dom4j.Document doc)
This will take a DSML
Document and convert it to an Iterator
of LDAP search results. |
LdapBeanFactory |
getLdapBeanFactory()
Returns the factory for creating ldap beans.
|
Iterator<SearchResult> |
importDsml(Reader reader)
This will take a Reader containing a DSML
Document and convert
it to an Iterator of LDAP search results. |
LdapResult |
importDsmlToLdapResult(Reader reader)
This will take a Reader containing a DSML
Document and convert
it to an LdapResult. |
void |
outputDsml(Iterator<SearchResult> results,
Writer writer)
This will write the supplied LDAP search results to the supplied writer in
the form of DSML.
|
void |
outputDsml(LdapResult result,
Writer writer)
This will write the supplied LDAP result to the supplied writer in the form
of DSML.
|
void |
setLdapBeanFactory(LdapBeanFactory lbf)
Sets the factory for creating ldap beans.
|
protected final org.apache.commons.logging.Log logger
protected LdapBeanFactory beanFactory
public LdapBeanFactory getLdapBeanFactory()
LdapBeanFactorypublic void setLdapBeanFactory(LdapBeanFactory lbf)
lbf - LdapBeanFactorypublic abstract org.dom4j.Document createDsml(Iterator<SearchResult> results)
Document.results - Iterator of LDAP search resultsDocumentpublic abstract org.dom4j.Document createDsml(LdapResult result)
Document.result - LdapResultDocumentprotected org.dom4j.Element createDsmlEntry(org.dom4j.QName entryName,
LdapEntry ldapEntry,
org.dom4j.Namespace ns)
entryName - QName name of element to createldapEntry - LdapEntry to convertns - Namespace of DSMLDocumentprotected List<org.dom4j.Element> createDsmlAttributes(LdapAttributes ldapAttributes, org.dom4j.Namespace ns)
LdapAttributes.ldapAttributes - LdapAttributesns - Namespace of DSMLList of elementsprotected org.dom4j.Element createDsmlAttribute(String attrName, Set<?> attrValues, org.dom4j.Namespace ns, String elementName, String elementAttrName, String elementValueName)
attrName - StringattrValues - Setns - Namespace of DSMLelementName - String of the attribute elementelementAttrName - String of the attribute elementelementValueName - String of the value elementElementpublic void outputDsml(Iterator<SearchResult> results, Writer writer) throws IOException
results - Iterator of LDAP search resultswriter - Writer to write toIOException - if an error occurs while writingpublic void outputDsml(LdapResult result, Writer writer) throws IOException
result - LdapResultwriter - Writer to write toIOException - if an error occurs while writingpublic Iterator<SearchResult> importDsml(Reader reader) throws org.dom4j.DocumentException, IOException
Document and convert
it to an Iterator of LDAP search results.reader - Reader containing DSML contentIterator - of LDAP search resultsorg.dom4j.DocumentException - if an error occurs building a document from the
readerIOException - if an I/O error occurspublic LdapResult importDsmlToLdapResult(Reader reader) throws org.dom4j.DocumentException, IOException
Document and convert
it to an LdapResult.reader - Reader containing DSML contentLdapResultorg.dom4j.DocumentException - if an error occurs building a document from the
readerIOException - if an I/O error occursprotected abstract LdapResult createLdapResult(org.dom4j.Document doc)
Document and convert it to an Iterator
of LDAP search results.doc - Document of DSMLIterator - of LDAP search resultsprotected LdapEntry createLdapEntry(org.dom4j.Element entryElement)
Element containing an entry of type
entryElement - Element of DSML contentLdapEntryCopyright © 2014. All rights reserved.