com.novell.emframe.dev
Class DataHandler

java.lang.Object
  extended bycom.novell.emframe.dev.Plugin
      extended bycom.novell.emframe.dev.DataHandler
Direct Known Subclasses:
DataHandlerHelper

public abstract class DataHandler
extends Plugin

Abstract class that handles the data from a particular attribute. All Strings are XML data containing the data.


Constructor Summary
DataHandler()
           
 
Method Summary
static java.lang.String getOperationAsString(int mode)
          Converts the int value based upon the com.novell.admin.ns.ObjectOperation values (ADD, REMOVE, SET, IGNORE) to the String mode from eDirAccessService (MODE_ADD, MODE_REM, MODE_SET, and MODE_IGN).
static int getOperationType(java.lang.String mode)
          Converts the String mode from eDirAccessService (MODE_ADD, MODE_REM, MODE_SET, and MODE_IGN) to an int value based upon the com.novell.admin.ns.ObjectOperation values (ADD, REMOVE, SET, IGNORE).
abstract  java.lang.String getString(java.lang.Object theObj, java.lang.String name, TaskContext context)
          Returns the String value of a particular attribute in XML format.
abstract  void setString(java.lang.Object theObj, java.lang.String name, java.lang.String value, TaskContext context)
          Sets the String value of a particular attribute in XML format.
 
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

DataHandler

public DataHandler()
Method Detail

getOperationAsString

public static java.lang.String getOperationAsString(int mode)
Converts the int value based upon the com.novell.admin.ns.ObjectOperation values (ADD, REMOVE, SET, IGNORE) to the String mode from eDirAccessService (MODE_ADD, MODE_REM, MODE_SET, and MODE_IGN).

Parameters:
mode - int representation of the mode based upon the com.novell.admin.ns.ObjectOperation public static int values (ADD, REMOVE, SET, IGNORE)
Returns:
String containing one of the eDirAccessService public static Strings (MODE_ADD, MODE_REM, MODE_SET, and MODE_IGN)

getOperationType

public static int getOperationType(java.lang.String mode)
Converts the String mode from eDirAccessService (MODE_ADD, MODE_REM, MODE_SET, and MODE_IGN) to an int value based upon the com.novell.admin.ns.ObjectOperation values (ADD, REMOVE, SET, IGNORE).

Parameters:
mode - One of the eDirAccessService public static Strings (MODE_ADD, MODE_REM, MODE_SET, and MODE_IGN)
Returns:
int containing the int representation of the mode based upon the com.novell.admin.ns.ObjectOperation public static int values (ADD, REMOVE, SET, IGNORE)

getString

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

Parameters:
theObj - ObjectEntry representing the object in the directory
name - 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 abstract void setString(java.lang.Object theObj,
                               java.lang.String name,
                               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.

Parameters:
theObj - ObjectEntry representing the object in the directory
name - 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)


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.