|
LDAP Classes Implements Java LDAP |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.novell.ldap.util.DSMLReader
Reads, parses and converts DSML into LDAPMessages.
Reads DSML, Directory Service Markup Language, from files, streams and readers, and returns LDAPMessages. Note that some XML applications will have DSML pre-parsed into DOM objects, in which case DOMReader should be used.
DSMLWriter
,
DOMReader
,
LDAPMessage
,
LDAPConnection.sendRequest(com.novell.ldap.LDAPMessage, com.novell.ldap.LDAPMessageQueue)
Constructor Summary | |
DSMLReader(java.io.InputStream inputStream)
Creates a reader that reads from an inputStream containing xml with DSML tags. |
|
DSMLReader(java.io.Reader reader)
Creates a reader that reads from a reader containing xml with DSML tags. |
|
DSMLReader(java.lang.String dsmlFile)
Creates a reader that reads from a file containing XML with DSML tags. |
Method Summary | |
java.lang.String |
getBatchRequestID()
Retrieves the optional requestID attribute on a BatchRequests. |
java.util.ArrayList |
getErrors()
|
java.lang.String |
getVersion()
Gets the version of the LDIF data associated with the input stream |
boolean |
isParallelProcessing()
Indicates whether the requests in a batchRequest can be executed in parallel. |
boolean |
isRequest()
Returns true if request data ist associated with the input stream, or false if content data. |
boolean |
isResponseUnordered()
If requests in a batchRequest can be executed in parallel, this specifies whether the responses can be written in any order. |
boolean |
isResumeOnError()
Indicates whether the execution of requests in a batchRequest should resume or stop should an error occur. |
LDAPMessage |
readMessage()
Retrieves the current LDAPMessage and advances to the next. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DSMLReader(java.lang.String dsmlFile) throws LDAPLocalException, java.io.FileNotFoundException
All XML tags before and after batchRequests or batchResponses are ignored. All requests or response within batchRequests and batchResponses are converted into LDAPMessages
dsmlFile
- XML file with a DSML batchRequest or batchResponse
LDAPLocalException
- Occurs when no batchRequest or batchResponse
is found, or the document is invalid DSML.
java.io.FileNotFoundException
- Occurs when the specied file is not foundpublic DSMLReader(java.io.InputStream inputStream) throws LDAPLocalException, java.io.UnsupportedEncodingException
All XML tags before and after batchRequests or batchResponses are ignored. All requests or response within batchRequests and batchResponses are converted into LDAPMessages
inputStream
- Stream of XML with a DSML batchRequest or
batchResponse
LDAPLocalException
- Occurs when no batchRequest or batchResponse
is found, or the document is invalid DSML.
java.io.UnsupportedEncodingException
public DSMLReader(java.io.Reader reader) throws LDAPLocalException
All XML tags before and after batchRequests or batchResponses are ignored. All requests or response within batchRequests and batchResponses are converted into LDAPMessages
reader
- Reader of XML with a DSML batchRequest or batchResponse
LDAPLocalException
- Occurs when no batchRequest or batchResponse
is found, or the document is invalid DSML.Method Detail |
public LDAPMessage readMessage()
This method is used to iterate over all DSML tags parsed into LDAPMessages
readMessage
in interface LDAPReader
public java.lang.String getVersion()
getVersion
in interface LDAPReader
public boolean isRequest()
isRequest
in interface LDAPReader
public java.lang.String getBatchRequestID()
public boolean isParallelProcessing()
This is determined by reading the "processing" attribute on the tag batchRequest. This attribute can take on the values of "sequential" or "parallel" and defaults to "sequential" when the attribute is absent.
Other batchRequest properties:
getBatchRequestID()
,
isResponseUnordered()
,
isResumeOnError()
public boolean isResponseUnordered()
This is determined by reading the "responseOrder" attribute on the tag batchRequest. This attribute can take on the values of "sequential" or "unordered" and defaults to "sequential" when the attribute is absent.
public boolean isResumeOnError()
This is determined by reading the "onError" attribute on the tag batchRequest. This attribute can take on the values of "resume" or "exit" and defaults to "exit" when the attribute is absent.
Other batchRequest properties:
getBatchRequestID()
,
isParallelProcessing()
,
isResponseUnordered()
public java.util.ArrayList getErrors()
|
LDAP Classes Implements Java LDAP |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |