public class Dsmlv2Engine extends Object
Constructor and Description |
---|
Dsmlv2Engine(LdapConnection connection,
String user,
String password)
Creates a new instance of Dsmlv2Engine.
|
Dsmlv2Engine(String host,
int port,
String user,
String password)
Creates a new instance of Dsmlv2Engine.
|
Modifier and Type | Method and Description |
---|---|
BatchResponseDsml |
getBatchResponse() |
LdapConnection |
getConnection() |
boolean |
isGenerateSoapResp() |
void |
processDSML(InputStream inputStream,
OutputStream out)
Uses the default UTF-8 encoding for processing the DSML
|
void |
processDSML(InputStream inputStream,
String inputEncoding,
OutputStream out)
Processes the DSML request(s) from the given input stream with the specified encoding
and writes the response to the output stream
|
String |
processDSML(String dsmlInput)
Processes the file given and return the result of the operations
|
void |
processDSMLFile(File file,
OutputStream respStream)
Process the given file and optionally writing the output to the
output stream(if not null)
|
String |
processDSMLFile(String fileName)
Processes the file given and return the result of the operations
|
void |
setGenerateSoapResp(boolean generateSoapResp) |
public Dsmlv2Engine(String host, int port, String user, String password)
host
- the server hostport
- the server portuser
- the server admin Dnpassword
- the server admin's passwordpublic Dsmlv2Engine(LdapConnection connection, String user, String password)
connection
- an unbound active connectionuser
- the user name to be used to bind this connection to the serverpassword
- user's credentialspublic String processDSML(String dsmlInput) throws org.xmlpull.v1.XmlPullParserException
dsmlInput
- the DSMLv2 formatted request inputorg.xmlpull.v1.XmlPullParserException
- if an error occurs in the parserpublic String processDSMLFile(String fileName) throws org.xmlpull.v1.XmlPullParserException, IOException
fileName
- the path to the fileorg.xmlpull.v1.XmlPullParserException
- if an error occurs in the parserIOException
- if the file does not existpublic void processDSMLFile(File file, OutputStream respStream) throws Exception
file
- the DSML filerespStream
- the output stream to which response will be written, skipped if nullException
- If the processing failspublic void processDSML(InputStream inputStream, OutputStream out) throws Exception
inputStream
- The Stream containing the DSML to processout
- The Stream where to put the resultException
- If we had an error while processing the DSMLprocessDSML(InputStream, String, OutputStream)
public void processDSML(InputStream inputStream, String inputEncoding, OutputStream out) throws Exception
inputStream
- the input stream for DSML batch requestinputEncoding
- encoding to be used while reading the DSML request dataout
- the output stream to which DSML response will be writtenException
- If the processing failspublic boolean isGenerateSoapResp()
public void setGenerateSoapResp(boolean generateSoapResp)
generateSoapResp
- the generateSoapResp to setpublic BatchResponseDsml getBatchResponse()
public LdapConnection getConnection()
Copyright © 2003–2020 The Apache Software Foundation. All rights reserved.