All LDAP Classes
Internal LDAP Classes

com.novell.ldap.util
Class DSMLHandler

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by com.novell.ldap.util.DSMLHandler
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

 class DSMLHandler
extends org.xml.sax.helpers.DefaultHandler
implements org.xml.sax.ContentHandler, org.xml.sax.ErrorHandler


Field Summary
private static int ADD_ATTRIBUTE
           
private static int ADD_REQUEST
           
private static int ADD_RESPONSE
           
private static int AND
           
private static int ANY
           
private static int APPROXIMATE_MATCH
           
private static int ASSERTION
           
private static int ATTRIBUTE
           
private  java.util.ArrayList attributeNames
           
private static int ATTRIBUTES
           
private  java.util.ArrayList attributeValues
           
private  java.lang.String attrName
           
private  LDAPAttributeSet attrSet
           
private static int AUTH_REQUEST
           
private static int AUTH_RESPONSE
           
private static int BATCH_REQUEST
           
private static int BATCH_RESPONSE
           
private  java.lang.String batchRequestID
           
private static int COMPARE_REQUEST
           
private static int COMPARE_RESPONSE
           
private static int CONTROL
           
private  java.util.ArrayList controls
           
private  boolean critical
           
private static int DEL_RESPONSE
           
private static int DELETE_REQUEST
           
private  boolean deleteOldRDN
           
private  java.lang.String dn
           
private  LDAPEntry entry
           
private static int EQUALITY_MATCH
           
private static int ERROR_MESSAGE
           
private static int ERROR_RESPONSE
           
private  java.lang.String errorMessage
           
private  java.util.ArrayList errors
           
private  java.lang.String errorType
           
private static int EXTENDED_REQUEST
           
private static int EXTENDED_RESPONSE
           
private static int EXTENDED_RESPONSE_NAME
           
private static int EXTENDED_RESPONSE_RESPONSE
           
private static int EXTENSIBLE_MATCH
           
private  RfcFilter filter
           
private static int FILTER
           
private static int FINAL
           
private static int GREATER_OR_EQUAL
           
private static int INITIAL
           
private  boolean isAddRequest
           
private  boolean isBase64
           
private  boolean isDNMatching
           
private  boolean isextendedstate
           
private  boolean isParallel
           
private  boolean isResumeOnError
           
private  boolean isUnordered
           
private static int LDAP_RESPONSE
           
private static int LESS_OR_EQUAL
           
private  java.lang.String matchingRule
           
private  LDAPMessage message
           
private static int MESSAGE
           
private static int MODIFICATION
           
private static int MODIFY_DN_REQUEST
           
private static int MODIFY_REQUEST
           
private static int MODIFY_RESPONSE
           
private static int MODIFYDN_RESPONSE
           
private  java.util.ArrayList modlist
           
private  java.lang.String newRDN
           
private  java.lang.String newSuperior
           
private static int NOT
           
private  java.lang.String oid
           
private  int operation
           
private static int OR
           
private static int PRESENT
           
private  int prevstate
           
private  java.util.ArrayList queue
          Holds parsed LDAPMessages ready for use
private static int REFERRAL_LIST
           
private  java.util.ArrayList referrallist
           
private  java.lang.String requestID
           
private  java.lang.String requestName
           
private static java.util.HashMap requestTags
           
private  byte[] requestValue
           
private  int responsecode
           
private  java.lang.String responseDesc
           
private  int responsetype
           
private static int RESULT_CODE
           
private  int scope
           
private static int SEARCH_REQUEST
           
private static int SEARCH_RESPONSE
           
private static int SEARCH_RESULT_DONE
           
private static int SEARCH_RESULT_ENTRY
           
private static int SEARCH_RESULT_REFERENCE
           
private static int SEARCH_RESULT_REFERENCE_REF
           
private  LDAPSearchConstraints searchCons
           
private  java.lang.String searchResponseid
           
private static int START
           
private  int state
          state contains the internal parsing state
private static int SUBSTRINGS
           
private  boolean typesOnly
           
private  java.lang.StringBuffer value
           
private static int VALUE
           
private  int valueState
           
private static int X_NAME
           
private static int X_VALUE
           
 
Constructor Summary
DSMLHandler()
           
 
Method Summary
 void characters(char[] a, int s, int l)
           
 void endDocument()
          Receive notification of the end of the document.
 void endElement(java.lang.String strNamespaceURI, java.lang.String strSName, java.lang.String strQName)
           
 void endPrefixMapping(java.lang.String prefix)
          Receive notification of the end of a Namespace mapping.
 void error(org.xml.sax.SAXParseException e)
           
 void fatalError(org.xml.sax.SAXParseException e)
           
(package private)  java.lang.String getBatchRequestID()
           
(package private)  java.util.ArrayList getErrors()
           
(package private)  java.util.ArrayList getQueue()
           
private  void handleControl(org.xml.sax.Attributes attrs)
           
private  void handleFilter(int tag, org.xml.sax.Attributes attrs, java.lang.String strSName)
           
 void ignorableWhitespace(char[] ch, int start, int length)
          Receive notification of ignorable whitespace in element content.
(package private)  boolean isParallelProcessing()
           
(package private)  boolean isResponseUnordered()
           
(package private)  boolean isResumeOnError()
           
private  void parseTagAttributes(int tag, org.xml.sax.Attributes attrs)
           
 void processingInstruction(java.lang.String target, java.lang.String data)
          Receive notification of a processing instruction.
 void setDocumentLocator(org.xml.sax.Locator locator)
          Receive a Locator object for document events.
 void skippedEntity(java.lang.String name)
          Receive notification of a skipped entity.
 void startDocument()
          Receive notification of the beginning of the document.
 void startElement(java.lang.String strNamespaceURI, java.lang.String strSName, java.lang.String strQName, org.xml.sax.Attributes attrs)
           
 void startPrefixMapping(java.lang.String prefix, java.lang.String uri)
          Receive notification of the start of a Namespace mapping.
 void warning(org.xml.sax.SAXParseException e)
           
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
notationDecl, resolveEntity, unparsedEntityDecl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isAddRequest

private boolean isAddRequest

queue

private java.util.ArrayList queue
Holds parsed LDAPMessages ready for use


message

private LDAPMessage message

entry

private LDAPEntry entry

attrSet

private LDAPAttributeSet attrSet

attributeValues

private java.util.ArrayList attributeValues

attributeNames

private java.util.ArrayList attributeNames

modlist

private java.util.ArrayList modlist

searchCons

private LDAPSearchConstraints searchCons

attrName

private java.lang.String attrName

dn

private java.lang.String dn

newRDN

private java.lang.String newRDN

newSuperior

private java.lang.String newSuperior

requestName

private java.lang.String requestName

requestValue

private byte[] requestValue

value

private java.lang.StringBuffer value

typesOnly

private boolean typesOnly

deleteOldRDN

private boolean deleteOldRDN

isBase64

private boolean isBase64

scope

private int scope

operation

private int operation

filter

private RfcFilter filter

isDNMatching

private boolean isDNMatching

matchingRule

private java.lang.String matchingRule

controls

private java.util.ArrayList controls

referrallist

private java.util.ArrayList referrallist

responsetype

private int responsetype

responsecode

private int responsecode

responseDesc

private java.lang.String responseDesc

errorMessage

private java.lang.String errorMessage

START

private static final int START
See Also:
Constant Field Values

BATCH_REQUEST

private static final int BATCH_REQUEST
See Also:
Constant Field Values

AUTH_REQUEST

private static final int AUTH_REQUEST
See Also:
Constant Field Values

MODIFY_REQUEST

private static final int MODIFY_REQUEST
See Also:
Constant Field Values

SEARCH_REQUEST

private static final int SEARCH_REQUEST
See Also:
Constant Field Values

ADD_REQUEST

private static final int ADD_REQUEST
See Also:
Constant Field Values

DELETE_REQUEST

private static final int DELETE_REQUEST
See Also:
Constant Field Values

MODIFY_DN_REQUEST

private static final int MODIFY_DN_REQUEST
See Also:
Constant Field Values

COMPARE_REQUEST

private static final int COMPARE_REQUEST
See Also:
Constant Field Values

EXTENDED_REQUEST

private static final int EXTENDED_REQUEST
See Also:
Constant Field Values

ASSERTION

private static final int ASSERTION
See Also:
Constant Field Values

VALUE

private static final int VALUE
See Also:
Constant Field Values

ATTRIBUTES

private static final int ATTRIBUTES
See Also:
Constant Field Values

ATTRIBUTE

private static final int ATTRIBUTE
See Also:
Constant Field Values

FILTER

private static final int FILTER
See Also:
Constant Field Values

AND

private static final int AND
See Also:
Constant Field Values

OR

private static final int OR
See Also:
Constant Field Values

NOT

private static final int NOT
See Also:
Constant Field Values

EQUALITY_MATCH

private static final int EQUALITY_MATCH
See Also:
Constant Field Values

SUBSTRINGS

private static final int SUBSTRINGS
See Also:
Constant Field Values

GREATER_OR_EQUAL

private static final int GREATER_OR_EQUAL
See Also:
Constant Field Values

LESS_OR_EQUAL

private static final int LESS_OR_EQUAL
See Also:
Constant Field Values

PRESENT

private static final int PRESENT
See Also:
Constant Field Values

APPROXIMATE_MATCH

private static final int APPROXIMATE_MATCH
See Also:
Constant Field Values

EXTENSIBLE_MATCH

private static final int EXTENSIBLE_MATCH
See Also:
Constant Field Values

INITIAL

private static final int INITIAL
See Also:
Constant Field Values

ANY

private static final int ANY
See Also:
Constant Field Values

FINAL

private static final int FINAL
See Also:
Constant Field Values

ADD_ATTRIBUTE

private static final int ADD_ATTRIBUTE
See Also:
Constant Field Values

MODIFICATION

private static final int MODIFICATION
See Also:
Constant Field Values

X_NAME

private static final int X_NAME
See Also:
Constant Field Values

X_VALUE

private static final int X_VALUE
See Also:
Constant Field Values

CONTROL

private static final int CONTROL
See Also:
Constant Field Values

BATCH_RESPONSE

private static final int BATCH_RESPONSE
See Also:
Constant Field Values

ADD_RESPONSE

private static final int ADD_RESPONSE
See Also:
Constant Field Values

LDAP_RESPONSE

private static final int LDAP_RESPONSE
See Also:
Constant Field Values

RESULT_CODE

private static final int RESULT_CODE
See Also:
Constant Field Values

ERROR_MESSAGE

private static final int ERROR_MESSAGE
See Also:
Constant Field Values

ERROR_RESPONSE

private static final int ERROR_RESPONSE
See Also:
Constant Field Values

MESSAGE

private static final int MESSAGE
See Also:
Constant Field Values

REFERRAL_LIST

private static final int REFERRAL_LIST
See Also:
Constant Field Values

SEARCH_RESPONSE

private static final int SEARCH_RESPONSE
See Also:
Constant Field Values

SEARCH_RESULT_ENTRY

private static final int SEARCH_RESULT_ENTRY
See Also:
Constant Field Values

SEARCH_RESULT_REFERENCE

private static final int SEARCH_RESULT_REFERENCE
See Also:
Constant Field Values

SEARCH_RESULT_REFERENCE_REF

private static final int SEARCH_RESULT_REFERENCE_REF
See Also:
Constant Field Values

SEARCH_RESULT_DONE

private static final int SEARCH_RESULT_DONE
See Also:
Constant Field Values

EXTENDED_RESPONSE

private static final int EXTENDED_RESPONSE
See Also:
Constant Field Values

EXTENDED_RESPONSE_NAME

private static final int EXTENDED_RESPONSE_NAME
See Also:
Constant Field Values

EXTENDED_RESPONSE_RESPONSE

private static final int EXTENDED_RESPONSE_RESPONSE
See Also:
Constant Field Values

AUTH_RESPONSE

private static final int AUTH_RESPONSE
See Also:
Constant Field Values

MODIFY_RESPONSE

private static final int MODIFY_RESPONSE
See Also:
Constant Field Values

DEL_RESPONSE

private static final int DEL_RESPONSE
See Also:
Constant Field Values

MODIFYDN_RESPONSE

private static final int MODIFYDN_RESPONSE
See Also:
Constant Field Values

COMPARE_RESPONSE

private static final int COMPARE_RESPONSE
See Also:
Constant Field Values

state

private int state
state contains the internal parsing state


requestTags

private static final java.util.HashMap requestTags

valueState

private int valueState

critical

private boolean critical

oid

private java.lang.String oid

requestID

private java.lang.String requestID

batchRequestID

private java.lang.String batchRequestID

isParallel

private boolean isParallel

isUnordered

private boolean isUnordered

isResumeOnError

private boolean isResumeOnError

prevstate

private int prevstate

isextendedstate

private boolean isextendedstate

searchResponseid

private java.lang.String searchResponseid

errorType

private java.lang.String errorType

errors

private java.util.ArrayList errors
Constructor Detail

DSMLHandler

DSMLHandler()
Method Detail

startElement

public void startElement(java.lang.String strNamespaceURI,
                         java.lang.String strSName,
                         java.lang.String strQName,
                         org.xml.sax.Attributes attrs)
                  throws org.xml.sax.SAXException
Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

handleControl

private void handleControl(org.xml.sax.Attributes attrs)
                    throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

handleFilter

private void handleFilter(int tag,
                          org.xml.sax.Attributes attrs,
                          java.lang.String strSName)
                   throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

parseTagAttributes

private void parseTagAttributes(int tag,
                                org.xml.sax.Attributes attrs)
                         throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

characters

public void characters(char[] a,
                       int s,
                       int l)
Specified by:
characters in interface org.xml.sax.ContentHandler
Overrides:
characters in class org.xml.sax.helpers.DefaultHandler

endElement

public void endElement(java.lang.String strNamespaceURI,
                       java.lang.String strSName,
                       java.lang.String strQName)
                throws org.xml.sax.SAXException
Specified by:
endElement in interface org.xml.sax.ContentHandler
Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

warning

public void warning(org.xml.sax.SAXParseException e)
             throws org.xml.sax.SAXException
Specified by:
warning in interface org.xml.sax.ErrorHandler
Overrides:
warning in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

error

public void error(org.xml.sax.SAXParseException e)
           throws org.xml.sax.SAXException
Specified by:
error in interface org.xml.sax.ErrorHandler
Overrides:
error in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

fatalError

public void fatalError(org.xml.sax.SAXParseException e)
                throws org.xml.sax.SAXException
Specified by:
fatalError in interface org.xml.sax.ErrorHandler
Overrides:
fatalError in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

setDocumentLocator

public void setDocumentLocator(org.xml.sax.Locator locator)
Receive a Locator object for document events.

By default, do nothing. Application writers may override this method in a subclass if they wish to store the locator for use with other document events.

Specified by:
setDocumentLocator in interface org.xml.sax.ContentHandler
Overrides:
setDocumentLocator in class org.xml.sax.helpers.DefaultHandler
Parameters:
locator - A locator for all SAX document events.
See Also:
ContentHandler.setDocumentLocator(org.xml.sax.Locator), Locator

startDocument

public void startDocument()
                   throws org.xml.sax.SAXException
Receive notification of the beginning of the document.

By default, do nothing. Application writers may override this method in a subclass to take specific actions at the beginning of a document (such as allocating the root node of a tree or creating an output file).

Specified by:
startDocument in interface org.xml.sax.ContentHandler
Overrides:
startDocument in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.
See Also:
ContentHandler.startDocument()

endDocument

public void endDocument()
                 throws org.xml.sax.SAXException
Receive notification of the end of the document.

By default, do nothing. Application writers may override this method in a subclass to take specific actions at the end of a document (such as finalising a tree or closing an output file).

Specified by:
endDocument in interface org.xml.sax.ContentHandler
Overrides:
endDocument in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.
See Also:
ContentHandler.endDocument()

startPrefixMapping

public void startPrefixMapping(java.lang.String prefix,
                               java.lang.String uri)
                        throws org.xml.sax.SAXException
Receive notification of the start of a Namespace mapping.

By default, do nothing. Application writers may override this method in a subclass to take specific actions at the start of each Namespace prefix scope (such as storing the prefix mapping).

Specified by:
startPrefixMapping in interface org.xml.sax.ContentHandler
Overrides:
startPrefixMapping in class org.xml.sax.helpers.DefaultHandler
Parameters:
prefix - The Namespace prefix being declared.
uri - The Namespace URI mapped to the prefix.
Throws:
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.
See Also:
ContentHandler.startPrefixMapping(java.lang.String, java.lang.String)

endPrefixMapping

public void endPrefixMapping(java.lang.String prefix)
                      throws org.xml.sax.SAXException
Receive notification of the end of a Namespace mapping.

By default, do nothing. Application writers may override this method in a subclass to take specific actions at the end of each prefix mapping.

Specified by:
endPrefixMapping in interface org.xml.sax.ContentHandler
Overrides:
endPrefixMapping in class org.xml.sax.helpers.DefaultHandler
Parameters:
prefix - The Namespace prefix being declared.
Throws:
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.
See Also:
ContentHandler.endPrefixMapping(java.lang.String)

ignorableWhitespace

public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
                         throws org.xml.sax.SAXException
Receive notification of ignorable whitespace in element content.

By default, do nothing. Application writers may override this method to take specific actions for each chunk of ignorable whitespace (such as adding data to a node or buffer, or printing it to a file).

Specified by:
ignorableWhitespace in interface org.xml.sax.ContentHandler
Overrides:
ignorableWhitespace in class org.xml.sax.helpers.DefaultHandler
Parameters:
ch - The whitespace characters.
start - The start position in the character array.
length - The number of characters to use from the character array.
Throws:
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.
See Also:
ContentHandler.ignorableWhitespace(char[], int, int)

processingInstruction

public void processingInstruction(java.lang.String target,
                                  java.lang.String data)
                           throws org.xml.sax.SAXException
Receive notification of a processing instruction.

By default, do nothing. Application writers may override this method in a subclass to take specific actions for each processing instruction, such as setting status variables or invoking other methods.

Specified by:
processingInstruction in interface org.xml.sax.ContentHandler
Overrides:
processingInstruction in class org.xml.sax.helpers.DefaultHandler
Parameters:
target - The processing instruction target.
data - The processing instruction data, or null if none is supplied.
Throws:
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.
See Also:
ContentHandler.processingInstruction(java.lang.String, java.lang.String)

skippedEntity

public void skippedEntity(java.lang.String name)
                   throws org.xml.sax.SAXException
Receive notification of a skipped entity.

By default, do nothing. Application writers may override this method in a subclass to take specific actions for each processing instruction, such as setting status variables or invoking other methods.

Specified by:
skippedEntity in interface org.xml.sax.ContentHandler
Overrides:
skippedEntity in class org.xml.sax.helpers.DefaultHandler
Parameters:
name - The name of the skipped entity.
Throws:
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.
See Also:
ContentHandler.processingInstruction(java.lang.String, java.lang.String)

getBatchRequestID

java.lang.String getBatchRequestID()

isParallelProcessing

boolean isParallelProcessing()

isResponseUnordered

boolean isResponseUnordered()

isResumeOnError

boolean isResumeOnError()

getQueue

java.util.ArrayList getQueue()

getErrors

java.util.ArrayList getErrors()

All LDAP Classes
Internal LDAP Classes

Copyright ? 2002 Novell, Inc. All Rights Reserved.
Novell, Inc.
1800 South Novell Place
Provo, Ut 84606
Phone: (801) 861-5000