com.novell.emframe.dev
Class DataHandlerHelper

java.lang.Object
  extended bycom.novell.emframe.dev.Plugin
      extended bycom.novell.emframe.dev.DataHandler
          extended bycom.novell.emframe.dev.DataHandlerHelper

public abstract class DataHandlerHelper
extends DataHandler

Abstract class extended from DataHandler that handles the data from a particular attribute and contains some XML helper methods. All Strings are XML data containing the data.


Constructor Summary
DataHandlerHelper()
           
 
Method Summary
 java.lang.String getString(java.lang.Object theObj, java.lang.String attrName, TaskContext context)
          Returns the String value of a particular attribute in XML format.
 void setString(java.lang.Object theObj, java.lang.String attributeName, java.lang.String value, TaskContext context)
          Sets the String value of a particular attribute in XML format.
protected abstract  void valueComponentToXml(ValueComponent vc, java.lang.StringBuffer resultValue, java.lang.String attrName, Syntax syntax)
          Abstract class that outputs the data in valueComponent to the StringBuffer in XML form.
protected abstract  ValueComponent xmlToValueComponent(AttributeDefinition attributeDefinition, org.jdom.Element element, TaskContext context)
          Abstract class that given the xml element, creates a ValueComponent.
 
Methods inherited from class com.novell.emframe.dev.DataHandler
getOperationAsString, getOperationType
 
Methods inherited from class com.novell.emframe.dev.Plugin
init, isPluginAvailable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataHandlerHelper

public DataHandlerHelper()
Method Detail

getString

public java.lang.String getString(java.lang.Object theObj,
                                  java.lang.String attrName,
                                  TaskContext context)
                           throws eDirAccessServiceException
Returns the String value of a particular attribute in XML format. Multiple values on an attribute require multiple DataHandler objects.

Specified by:
getString in class DataHandler
Parameters:
theObj - ObjectEntry representing the object in the directory
attrName - String containing the name of the attribute
context - Plug-in context
Returns:
String containing an XML representation of the value of the attribute
Throws:
eDirAccessServiceException - on error reading from the attribute
See Also:
setString(java.lang.Object, java.lang.String, java.lang.String, com.novell.emframe.dev.TaskContext)

setString

public void setString(java.lang.Object theObj,
                      java.lang.String attributeName,
                      java.lang.String value,
                      TaskContext context)
               throws eDirAccessServiceException
Sets the String value of a particular attribute in XML format. Multiple values on an attribute require multiple DataHandler objects.

Specified by:
setString in class DataHandler
Parameters:
theObj - ObjectEntry representing the object in the directory
attributeName - String containing the name of the attribute
value - String containing an XML representation of the value of the attribute
context - Plug-in context
Throws:
eDirAccessServiceException - on error setting the attribute
See Also:
getString(java.lang.Object, java.lang.String, com.novell.emframe.dev.TaskContext)

valueComponentToXml

protected abstract void valueComponentToXml(ValueComponent vc,
                                            java.lang.StringBuffer resultValue,
                                            java.lang.String attrName,
                                            Syntax syntax)
                                     throws eDirAccessServiceException
Abstract class that outputs the data in valueComponent to the StringBuffer in XML form. Example <value>abc</value>

Parameters:
vc - ValueComponent that represents the value of an attribute
resultValue - StringBuffer to write the data to
attrName - String containing the attribute name
syntax - String containg the attribute syntax
Throws:
eDirAccessServiceException

xmlToValueComponent

protected abstract ValueComponent xmlToValueComponent(AttributeDefinition attributeDefinition,
                                                      org.jdom.Element element,
                                                      TaskContext context)
                                               throws java.lang.Exception
Abstract class that given the xml element, creates a ValueComponent.

Parameters:
attributeDefinition - AttributeDefinition containg information about attribute name and syntax
element - XML Element to read the value
context - TaskContext of the plug-in
Returns:
ValueComponent containing the value
Throws:
java.lang.Exception
ComponentCreationException
IncompatibleComponentException


API Documentation Copyright © 1998-2004 Novell, Inc. All rights reserved.
NDS is a registered trademark of Novell, Inc. in the United States and other countries.
Generated September 2 2004 0111.