com.ibm.di.parser
Class Dsmlv2Parser

java.lang.Object
  extended by com.ibm.di.parser.ParserImpl
      extended by com.ibm.di.parser.Dsmlv2Parser
All Implemented Interfaces:
ParserInterface, VersionInfoInterface

public class Dsmlv2Parser
extends ParserImpl

A ITDI Parser class for reading and writing Entries in DSMLv2 format


Field Summary
static String ATTR_DSML_NS
           
static String ATTR_NAME_ACUMULATOR
           
static String ATTR_NAME_DN
           
static String ATTR_NAME_DSML_ABANDON_ID
           
static String ATTR_NAME_DSML_ATTRIBUTES
           
static String ATTR_NAME_DSML_BASE
           
static String ATTR_NAME_DSML_COMPARE_NAME
           
static String ATTR_NAME_DSML_COMPARE_RESULT
           
static String ATTR_NAME_DSML_COMPARE_VALUE
           
static String ATTR_NAME_DSML_CONTROLS
           
static String ATTR_NAME_DSML_DELETEOLDRDN
           
static String ATTR_NAME_DSML_DEREFALIASES
           
static String ATTR_NAME_DSML_DETAILS
           
static String ATTR_NAME_DSML_ERROR_MESSAGE
           
static String ATTR_NAME_DSML_ERRORTYPE
           
static String ATTR_NAME_DSML_EXCEPTION
           
static String ATTR_NAME_DSML_FILTER
           
static String ATTR_NAME_DSML_MESSAGE
           
static String ATTR_NAME_DSML_NEWSUPERIOR
           
static String ATTR_NAME_DSML_OPERATION
           
static String ATTR_NAME_DSML_PRINCIPAL
           
static String ATTR_NAME_DSML_REFFERAL
           
static String ATTR_NAME_DSML_REQUEST_ID
           
static String ATTR_NAME_DSML_REQUEST_NAME
           
static String ATTR_NAME_DSML_REQUEST_VALUE
           
static String ATTR_NAME_DSML_RESPONSE
           
static String ATTR_NAME_DSML_RESPONSE_NAME
           
static String ATTR_NAME_DSML_RESULTCODE
           
static String ATTR_NAME_DSML_RESULTDESC
           
static String ATTR_NAME_DSML_SCOPE
           
static String ATTR_NAME_DSML_SIZELIMIT
           
static String ATTR_NAME_DSML_TIMELIMIT
           
static String ATTR_NAME_DSML_TYPESONLY
           
static String ATTR_NAME_NEWRDN
           
static String ATTR_SOAP_NS
           
static String DEREF_NEVER
           
static String NS_URI_SOAP_ENV
           
static String OPERATION_ABANDON_REQUEST
           
static String OPERATION_ADD_REQUEST
           
static String OPERATION_ADD_RESPONSE
           
static String OPERATION_AUTH_REQUEST
           
static String OPERATION_AUTH_RESPONSE
           
static String OPERATION_COMPARE_REQUEST
           
static String OPERATION_COMPARE_RESPONSE
           
static String OPERATION_DELETE_REQUEST
           
static String OPERATION_DELETE_RESPONSE
           
static String OPERATION_ERROR_RESPONSE
           
static String OPERATION_EXTENDED_REQUEST
           
static String OPERATION_EXTENDED_RESPONSE
           
static String OPERATION_MODIFY_REQUEST
           
static String OPERATION_MODIFY_RESPONSE
           
static String OPERATION_MODIFYDN_REQUEST
           
static String OPERATION_MODIFYDN_RESPONSE
           
static String OPERATION_SEARCH_REQUEST
           
static String OPERATION_SEARCH_RESPONSE
           
static String PARAMETER_BINARY_ATTRIBUTES
           
static String PARAMETER_MODE
           
static String SOAP_BODY_QN
           
static String SOAP_ENV_QN
           
static String WHOLE_SUBTREE
           
static String XMLNS_NS
           
 
Fields inherited from class com.ibm.di.parser.ParserImpl
_debug, myConfiguration
 
Constructor Summary
Dsmlv2Parser()
           
 
Method Summary
 void closeParser()
          Closes the parser
static Element dsmlMessageToElement(com.ibm.ldap.dsml.DsmlMessage aDsmlMessage)
           
 void flush()
          Flushes the parser's outputstream or writer
static String getResponseOperation(String aRequestOperation)
          This method maps request and response operations Used from DSMLv2 EventHandler
static com.ibm.ldap.dsml.LdapResult getSearchResultDoneFromEntry(Entry aEntry)
          Retrieves search result done
static com.ibm.ldap.dsml.SearchResultEntry getSearchResultEntry(Entry aEntry)
          Retrieves single search result only
 Node getSingleNode()
          Retrieves inner node from the output xml document
 String getVersion()
          Returns version information.
 void initParser()
          Initializes the parser.
 Entry readEntry()
          Reads a request or response from BatchMessage.
 void writeEntry(Entry aEntry)
          Writes a request or response to the batch message.
 String xmlNodeToString(Node aNode, boolean aIndentOutput)
           
 
Methods inherited from class com.ibm.di.parser.ParserImpl
debug, debugMode, getClassInstance, getContext, getDebug, getInputStream, getOutputStream, getParam, getParser, getReader, getWriter, isDeltaSupported, logmsg, registerScriptBeans, setConfiguration, setContext, setDebug, setInputStream, setInputStream, setInputStream, setOutputStream, setOutputStream, setParam, setParser
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAMETER_MODE

public static final String PARAMETER_MODE
See Also:
Constant Field Values

PARAMETER_BINARY_ATTRIBUTES

public static final String PARAMETER_BINARY_ATTRIBUTES
See Also:
Constant Field Values

ATTR_NAME_ACUMULATOR

public static final String ATTR_NAME_ACUMULATOR
See Also:
Constant Field Values

ATTR_NAME_DN

public static final String ATTR_NAME_DN
See Also:
Constant Field Values

ATTR_NAME_NEWRDN

public static final String ATTR_NAME_NEWRDN
See Also:
Constant Field Values

ATTR_NAME_DSML_BASE

public static final String ATTR_NAME_DSML_BASE
See Also:
Constant Field Values

ATTR_NAME_DSML_OPERATION

public static final String ATTR_NAME_DSML_OPERATION
See Also:
Constant Field Values

ATTR_NAME_DSML_COMPARE_NAME

public static final String ATTR_NAME_DSML_COMPARE_NAME
See Also:
Constant Field Values

ATTR_NAME_DSML_COMPARE_VALUE

public static final String ATTR_NAME_DSML_COMPARE_VALUE
See Also:
Constant Field Values

ATTR_NAME_DSML_COMPARE_RESULT

public static final String ATTR_NAME_DSML_COMPARE_RESULT
See Also:
Constant Field Values

ATTR_NAME_DSML_ERROR_MESSAGE

public static final String ATTR_NAME_DSML_ERROR_MESSAGE
See Also:
Constant Field Values

ATTR_NAME_DSML_RESULTCODE

public static final String ATTR_NAME_DSML_RESULTCODE
See Also:
Constant Field Values

ATTR_NAME_DSML_RESULTDESC

public static final String ATTR_NAME_DSML_RESULTDESC
See Also:
Constant Field Values

ATTR_NAME_DSML_FILTER

public static final String ATTR_NAME_DSML_FILTER
See Also:
Constant Field Values

ATTR_NAME_DSML_ATTRIBUTES

public static final String ATTR_NAME_DSML_ATTRIBUTES
See Also:
Constant Field Values

ATTR_NAME_DSML_SCOPE

public static final String ATTR_NAME_DSML_SCOPE
See Also:
Constant Field Values

ATTR_NAME_DSML_REQUEST_ID

public static final String ATTR_NAME_DSML_REQUEST_ID
See Also:
Constant Field Values

ATTR_NAME_DSML_CONTROLS

public static final String ATTR_NAME_DSML_CONTROLS
See Also:
Constant Field Values

ATTR_NAME_DSML_EXCEPTION

public static final String ATTR_NAME_DSML_EXCEPTION
See Also:
Constant Field Values

ATTR_NAME_DSML_NEWSUPERIOR

public static final String ATTR_NAME_DSML_NEWSUPERIOR
See Also:
Constant Field Values

ATTR_NAME_DSML_DELETEOLDRDN

public static final String ATTR_NAME_DSML_DELETEOLDRDN
See Also:
Constant Field Values

ATTR_NAME_DSML_DEREFALIASES

public static final String ATTR_NAME_DSML_DEREFALIASES
See Also:
Constant Field Values

ATTR_NAME_DSML_SIZELIMIT

public static final String ATTR_NAME_DSML_SIZELIMIT
See Also:
Constant Field Values

ATTR_NAME_DSML_TIMELIMIT

public static final String ATTR_NAME_DSML_TIMELIMIT
See Also:
Constant Field Values

ATTR_NAME_DSML_TYPESONLY

public static final String ATTR_NAME_DSML_TYPESONLY
See Also:
Constant Field Values

ATTR_NAME_DSML_REFFERAL

public static final String ATTR_NAME_DSML_REFFERAL
See Also:
Constant Field Values

ATTR_NAME_DSML_PRINCIPAL

public static final String ATTR_NAME_DSML_PRINCIPAL
See Also:
Constant Field Values

ATTR_NAME_DSML_RESPONSE_NAME

public static final String ATTR_NAME_DSML_RESPONSE_NAME
See Also:
Constant Field Values

ATTR_NAME_DSML_RESPONSE

public static final String ATTR_NAME_DSML_RESPONSE
See Also:
Constant Field Values

ATTR_NAME_DSML_ERRORTYPE

public static final String ATTR_NAME_DSML_ERRORTYPE
See Also:
Constant Field Values

ATTR_NAME_DSML_DETAILS

public static final String ATTR_NAME_DSML_DETAILS
See Also:
Constant Field Values

ATTR_NAME_DSML_MESSAGE

public static final String ATTR_NAME_DSML_MESSAGE
See Also:
Constant Field Values

ATTR_NAME_DSML_REQUEST_NAME

public static final String ATTR_NAME_DSML_REQUEST_NAME
See Also:
Constant Field Values

ATTR_NAME_DSML_REQUEST_VALUE

public static final String ATTR_NAME_DSML_REQUEST_VALUE
See Also:
Constant Field Values

ATTR_NAME_DSML_ABANDON_ID

public static final String ATTR_NAME_DSML_ABANDON_ID
See Also:
Constant Field Values

OPERATION_ADD_REQUEST

public static final String OPERATION_ADD_REQUEST
See Also:
Constant Field Values

OPERATION_DELETE_REQUEST

public static final String OPERATION_DELETE_REQUEST
See Also:
Constant Field Values

OPERATION_SEARCH_REQUEST

public static final String OPERATION_SEARCH_REQUEST
See Also:
Constant Field Values

OPERATION_COMPARE_REQUEST

public static final String OPERATION_COMPARE_REQUEST
See Also:
Constant Field Values

OPERATION_MODIFY_REQUEST

public static final String OPERATION_MODIFY_REQUEST
See Also:
Constant Field Values

OPERATION_MODIFYDN_REQUEST

public static final String OPERATION_MODIFYDN_REQUEST
See Also:
Constant Field Values

OPERATION_EXTENDED_REQUEST

public static final String OPERATION_EXTENDED_REQUEST
See Also:
Constant Field Values

OPERATION_ABANDON_REQUEST

public static final String OPERATION_ABANDON_REQUEST
See Also:
Constant Field Values

OPERATION_AUTH_REQUEST

public static final String OPERATION_AUTH_REQUEST
See Also:
Constant Field Values

OPERATION_ADD_RESPONSE

public static final String OPERATION_ADD_RESPONSE
See Also:
Constant Field Values

OPERATION_DELETE_RESPONSE

public static final String OPERATION_DELETE_RESPONSE
See Also:
Constant Field Values

OPERATION_SEARCH_RESPONSE

public static final String OPERATION_SEARCH_RESPONSE
See Also:
Constant Field Values

OPERATION_COMPARE_RESPONSE

public static final String OPERATION_COMPARE_RESPONSE
See Also:
Constant Field Values

OPERATION_MODIFY_RESPONSE

public static final String OPERATION_MODIFY_RESPONSE
See Also:
Constant Field Values

OPERATION_MODIFYDN_RESPONSE

public static final String OPERATION_MODIFYDN_RESPONSE
See Also:
Constant Field Values

OPERATION_EXTENDED_RESPONSE

public static final String OPERATION_EXTENDED_RESPONSE
See Also:
Constant Field Values

OPERATION_AUTH_RESPONSE

public static final String OPERATION_AUTH_RESPONSE
See Also:
Constant Field Values

OPERATION_ERROR_RESPONSE

public static final String OPERATION_ERROR_RESPONSE
See Also:
Constant Field Values

WHOLE_SUBTREE

public static final String WHOLE_SUBTREE
See Also:
Constant Field Values

DEREF_NEVER

public static final String DEREF_NEVER
See Also:
Constant Field Values

NS_URI_SOAP_ENV

public static final String NS_URI_SOAP_ENV
See Also:
Constant Field Values

SOAP_ENV_QN

public static final String SOAP_ENV_QN
See Also:
Constant Field Values

XMLNS_NS

public static final String XMLNS_NS
See Also:
Constant Field Values

ATTR_SOAP_NS

public static final String ATTR_SOAP_NS
See Also:
Constant Field Values

SOAP_BODY_QN

public static final String SOAP_BODY_QN
See Also:
Constant Field Values

ATTR_DSML_NS

public static final String ATTR_DSML_NS
See Also:
Constant Field Values
Constructor Detail

Dsmlv2Parser

public Dsmlv2Parser()
Method Detail

getResponseOperation

public static String getResponseOperation(String aRequestOperation)
This method maps request and response operations Used from DSMLv2 EventHandler

Parameters:
aRequestOperation - The request operation that will be mapped
Returns:
response of corresponding request operation

initParser

public void initParser()
                throws Exception
Initializes the parser.

Specified by:
initParser in interface ParserInterface
Overrides:
initParser in class ParserImpl
Throws:
Throws - exception if initialization fails
Exception

readEntry

public Entry readEntry()
                throws Exception
Reads a request or response from BatchMessage.

Returns:
next entry
Throws:
Exception - Throws exception if type of request or response not recognized

writeEntry

public void writeEntry(Entry aEntry)
                throws Exception
Writes a request or response to the batch message.

Parameters:
aEntry - The entry which will be written
Throws:
Exception - Throws exception if type of request or response not recognized

closeParser

public void closeParser()
                 throws Exception
Closes the parser

Specified by:
closeParser in interface ParserInterface
Overrides:
closeParser in class ParserImpl
Throws:
Exception - Throws exception if closing fails

flush

public void flush()
Flushes the parser's outputstream or writer

Specified by:
flush in interface ParserInterface
Overrides:
flush in class ParserImpl

getSingleNode

public Node getSingleNode()
Retrieves inner node from the output xml document


getSearchResultEntry

public static com.ibm.ldap.dsml.SearchResultEntry getSearchResultEntry(Entry aEntry)
Retrieves single search result only


getSearchResultDoneFromEntry

public static com.ibm.ldap.dsml.LdapResult getSearchResultDoneFromEntry(Entry aEntry)
Retrieves search result done


getVersion

public String getVersion()
Returns version information.


xmlNodeToString

public String xmlNodeToString(Node aNode,
                              boolean aIndentOutput)
                       throws Exception
Throws:
Exception

dsmlMessageToElement

public static Element dsmlMessageToElement(com.ibm.ldap.dsml.DsmlMessage aDsmlMessage)
                                    throws Exception
Throws:
Exception