Class Dsmlv2Parser


  • public class Dsmlv2Parser
    extends Object
    This class represents the DSMLv2 Parser. It can be used to parse a plain DSMLv2 Request input document or the one inside a SOAP envelop.
    Author:
    Apache Directory Project
    • Constructor Detail

      • Dsmlv2Parser

        public Dsmlv2Parser​(boolean storeMsgInBatchReq)
                     throws XmlPullParserException
        Creates a new instance of Dsmlv2Parser.
        Parameters:
        storeMsgInBatchReq - flag to set if the parsed requests should b stored
        Throws:
        XmlPullParserException - if an error occurs during the initialization of the parser
    • Method Detail

      • setInput

        public void setInput​(InputStream inputStream,
                             String inputEncoding)
                      throws XmlPullParserException
        Sets the input stream the parser is going to process
        Parameters:
        inputStream - contains a raw byte input stream of possibly unknown encoding (when inputEncoding is null)
        inputEncoding - if not null it MUST be used as encoding for inputStream
        Throws:
        XmlPullParserException - if an error occurs in the parser
      • setInput

        public void setInput​(String str)
                      throws XmlPullParserException
        Sets the input string the parser is going to parse
        Parameters:
        str - the string the parser is going to parse
        Throws:
        XmlPullParserException - if an error occurs in the parser
      • getBatchRequest

        public BatchRequestDsml getBatchRequest()
        Gets the Batch Request or null if the it has not been parsed yet
        Returns:
        the Batch Request or null if the it has not been parsed yet