edu.vt.middleware.ldap.dsml
Class DsmlResultConverter

java.lang.Object
  extended by edu.vt.middleware.ldap.dsml.DsmlResultConverter

public class DsmlResultConverter
extends Object

DsmlResultConverter provides utility methods for converting LdapResult to and from DSML in string format.

Version:
$Revision: 1330 $ $Date: 2010-05-23 18:10:53 -0400 (Sun, 23 May 2010) $
Author:
Middleware Services

Field Summary
protected  LdapBeanFactory beanFactory
          Ldap bean factory.
protected  org.apache.commons.logging.Log logger
          Log for this class.
 
Constructor Summary
DsmlResultConverter()
           
 
Method Summary
 LdapResult fromDsmlv1(String dsml)
          This reads any entries in the supplied DSML into this DsmlResult.
 LdapResult fromDsmlv2(String dsml)
          This reads any entries in the supplied DSML into this DsmlResult.
 LdapBeanFactory getLdapBeanFactory()
          Returns the factory for creating ldap beans.
 void setLdapBeanFactory(LdapBeanFactory lbf)
          Sets the factory for creating ldap beans.
 String toDsmlv1(LdapResult result)
          This returns this DsmlResult as version 1 DSML.
 String toDsmlv2(LdapResult result)
          This returns this DsmlResult as version 2 DSML.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final org.apache.commons.logging.Log logger
Log for this class.


beanFactory

protected LdapBeanFactory beanFactory
Ldap bean factory.

Constructor Detail

DsmlResultConverter

public DsmlResultConverter()
Method Detail

getLdapBeanFactory

public LdapBeanFactory getLdapBeanFactory()
Returns the factory for creating ldap beans.

Returns:
LdapBeanFactory

setLdapBeanFactory

public void setLdapBeanFactory(LdapBeanFactory lbf)
Sets the factory for creating ldap beans.

Parameters:
lbf - LdapBeanFactory

toDsmlv1

public String toDsmlv1(LdapResult result)
This returns this DsmlResult as version 1 DSML.

Parameters:
result - LdapResult to convert
Returns:
String

fromDsmlv1

public LdapResult fromDsmlv1(String dsml)
                      throws org.dom4j.DocumentException
This reads any entries in the supplied DSML into this DsmlResult.

Parameters:
dsml - String to read
Returns:
LdapResult
Throws:
org.dom4j.DocumentException - if an error occurs reading the supplied DSML

toDsmlv2

public String toDsmlv2(LdapResult result)
This returns this DsmlResult as version 2 DSML.

Parameters:
result - LdapResult to convert
Returns:
String

fromDsmlv2

public LdapResult fromDsmlv2(String dsml)
                      throws org.dom4j.DocumentException
This reads any entries in the supplied DSML into this DsmlResult.

Parameters:
dsml - String to read
Returns:
LdapResult
Throws:
org.dom4j.DocumentException - if an error occurs reading the supplied DSML


Copyright © 2003-2010 Virginia Tech. All Rights Reserved.