org.jboss.jca.common.metadata.ds

## Class DsParser

- java.lang.Object
- - org.jboss.jca.common.metadata.common.AbstractParser
  - - org.jboss.jca.common.metadata.ds.DsParser

- All Implemented Interfaces:
    MetadataParser<org.jboss.jca.common.api.metadata.ds.DataSources>

      public class DsParser
      extends AbstractParser
      implements MetadataParser<org.jboss.jca.common.api.metadata.ds.DataSources>

  A datasource parser
  Author:
    Jesper Pedersen

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `DsParser.Tag` A Tag.

  - ### Field Summary

    - ### Fields inherited from class org.jboss.jca.common.metadata.common.AbstractParser

      `bundle, log`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DsParser()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.jboss.jca.common.api.metadata.ds.DataSources` | `parse(java.io.InputStream xmlInputStream)` Parse a -ds.xml file
    `org.jboss.jca.common.api.metadata.ds.DataSources` | `parse(javax.xml.stream.XMLStreamReader reader)` Parse a -ds.xml file
    `protected org.jboss.jca.common.api.metadata.ds.DataSource` | `parseDataSource(javax.xml.stream.XMLStreamReader reader)` Parse a datasource
    `protected org.jboss.jca.common.api.metadata.ds.DataSources` | `parseDataSources(javax.xml.stream.XMLStreamReader reader)` Parse datasource
    `protected org.jboss.jca.common.api.metadata.ds.Driver` | `parseDriver(javax.xml.stream.XMLStreamReader reader)` Parse driver
    `protected org.jboss.jca.common.api.metadata.ds.DsSecurity` | `parseDsSecurity(javax.xml.stream.XMLStreamReader reader)` Parse security
    `protected org.jboss.jca.common.api.metadata.ds.DsPool` | `parsePool(javax.xml.stream.XMLStreamReader reader)` parse a `CommonPool` object
    `protected org.jboss.jca.common.api.metadata.ds.Statement` | `parseStatementSettings(javax.xml.stream.XMLStreamReader reader)` Parse statement
    `protected org.jboss.jca.common.api.metadata.ds.TimeOut` | `parseTimeOutSettings(javax.xml.stream.XMLStreamReader reader)` Parse timeout
    `protected org.jboss.jca.common.api.metadata.ds.Validation` | `parseValidationSetting(javax.xml.stream.XMLStreamReader reader)` Parse validation
    `protected org.jboss.jca.common.api.metadata.ds.XaDataSource` | `parseXADataSource(javax.xml.stream.XMLStreamReader reader)` Parse a XA datasource
    `protected org.jboss.jca.common.api.metadata.ds.DsXaPool` | `parseXaPool(javax.xml.stream.XMLStreamReader reader)` parse a `CommonXaPool` object

    - ### Methods inherited from class org.jboss.jca.common.metadata.common.AbstractParser

      `attributeAsBoolean, attributeAsInt, attributeAsString, elementAsBoolean, elementAsFlushStrategy, elementAsInteger, elementAsLong, elementAsString, isSystemPropertiesResolved, parseCapacity, parseConfigProperty, parseCredential, parseExtension, parseRecovery, parseSecuritySettings, parseTimeOut, parseValidation, setSystemPropertiesResolved`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.jboss.jca.common.metadata.MetadataParser

      `isSystemPropertiesResolved, setSystemPropertiesResolved`

- - ### Constructor Detail

    - #### DsParser

          public DsParser()

  - ### Method Detail

    - #### parse

          public org.jboss.jca.common.api.metadata.ds.DataSources parse(java.io.InputStream xmlInputStream)
                                                                 throws java.lang.Exception

      Parse a -ds.xml file
      Specified by:
        `parse` in interface `MetadataParser<org.jboss.jca.common.api.metadata.ds.DataSources>`
      Parameters:
        `xmlInputStream` - the input stream
      Returns:
        The datasource definitions
      Throws:
        `java.lang.Exception` - Thrown if an error occurs

    - #### parse

          public org.jboss.jca.common.api.metadata.ds.DataSources parse(javax.xml.stream.XMLStreamReader reader)
                                                                 throws java.lang.Exception

      Parse a -ds.xml file
      Specified by:
        `parse` in interface `MetadataParser<org.jboss.jca.common.api.metadata.ds.DataSources>`
      Parameters:
        `reader` - The reader
      Returns:
        The datasource definitions
      Throws:
        `java.lang.Exception` - Thrown if an error occurs

    - #### parseDataSources

          protected org.jboss.jca.common.api.metadata.ds.DataSources parseDataSources(javax.xml.stream.XMLStreamReader reader)
                                                                               throws javax.xml.stream.XMLStreamException,
                                                                                      ParserException,
                                                                                      org.jboss.jca.common.api.validator.ValidateException

      Parse datasource
      Parameters:
        `reader` - The reader
      Returns:
        The result
      Throws:
        `javax.xml.stream.XMLStreamException` - XMLStreamException
        `ParserException` - ParserException
        `org.jboss.jca.common.api.validator.ValidateException` - ValidateException

    - #### parseDriver

          protected org.jboss.jca.common.api.metadata.ds.Driver parseDriver(javax.xml.stream.XMLStreamReader reader)
                                                                     throws javax.xml.stream.XMLStreamException,
                                                                            ParserException,
                                                                            org.jboss.jca.common.api.validator.ValidateException

      Parse driver
      Parameters:
        `reader` - The reader
      Returns:
        The result
      Throws:
        `javax.xml.stream.XMLStreamException` - XMLStreamException
        `ParserException` - ParserException
        `org.jboss.jca.common.api.validator.ValidateException` - ValidateException

    - #### parseDsSecurity

          protected org.jboss.jca.common.api.metadata.ds.DsSecurity parseDsSecurity(javax.xml.stream.XMLStreamReader reader)
                                                                             throws javax.xml.stream.XMLStreamException,
                                                                                    ParserException,
                                                                                    org.jboss.jca.common.api.validator.ValidateException

      Parse security
      Parameters:
        `reader` - The reader
      Returns:
        The result
      Throws:
        `javax.xml.stream.XMLStreamException` - XMLStreamException
        `ParserException` - ParserException
        `org.jboss.jca.common.api.validator.ValidateException` - ValidateException

    - #### parseValidationSetting

          protected org.jboss.jca.common.api.metadata.ds.Validation parseValidationSetting(javax.xml.stream.XMLStreamReader reader)
                                                                                    throws javax.xml.stream.XMLStreamException,
                                                                                           ParserException,
                                                                                           org.jboss.jca.common.api.validator.ValidateException

      Parse validation
      Parameters:
        `reader` - The reader
      Returns:
        The result
      Throws:
        `javax.xml.stream.XMLStreamException` - XMLStreamException
        `ParserException` - ParserException
        `org.jboss.jca.common.api.validator.ValidateException` - ValidateException

    - #### parseTimeOutSettings

          protected org.jboss.jca.common.api.metadata.ds.TimeOut parseTimeOutSettings(javax.xml.stream.XMLStreamReader reader)
                                                                               throws javax.xml.stream.XMLStreamException,
                                                                                      ParserException,
                                                                                      org.jboss.jca.common.api.validator.ValidateException

      Parse timeout
      Parameters:
        `reader` - The reader
      Returns:
        The result
      Throws:
        `javax.xml.stream.XMLStreamException` - XMLStreamException
        `ParserException` - ParserException
        `org.jboss.jca.common.api.validator.ValidateException` - ValidateException

    - #### parseStatementSettings

          protected org.jboss.jca.common.api.metadata.ds.Statement parseStatementSettings(javax.xml.stream.XMLStreamReader reader)
                                                                                   throws javax.xml.stream.XMLStreamException,
                                                                                          ParserException,
                                                                                          org.jboss.jca.common.api.validator.ValidateException

      Parse statement
      Parameters:
        `reader` - The reader
      Returns:
        The result
      Throws:
        `javax.xml.stream.XMLStreamException` - XMLStreamException
        `ParserException` - ParserException
        `org.jboss.jca.common.api.validator.ValidateException` - ValidateException

    - #### parsePool

          protected org.jboss.jca.common.api.metadata.ds.DsPool parsePool(javax.xml.stream.XMLStreamReader reader)
                                                                   throws javax.xml.stream.XMLStreamException,
                                                                          ParserException,
                                                                          org.jboss.jca.common.api.validator.ValidateException

      parse a `CommonPool` object
      Overrides:
        `parsePool` in class `AbstractParser`
      Parameters:
        `reader` - reader
      Returns:
        the parsed `CommonPool` object
      Throws:
        `javax.xml.stream.XMLStreamException` - XMLStreamException
        `ParserException` - ParserException
        `org.jboss.jca.common.api.validator.ValidateException` - ValidateException

    - #### parseXaPool

          protected org.jboss.jca.common.api.metadata.ds.DsXaPool parseXaPool(javax.xml.stream.XMLStreamReader reader)
                                                                       throws javax.xml.stream.XMLStreamException,
                                                                              ParserException,
                                                                              org.jboss.jca.common.api.validator.ValidateException

      parse a `CommonXaPool` object
      Overrides:
        `parseXaPool` in class `AbstractParser`
      Parameters:
        `reader` - reader
      Returns:
        the parsed `CommonXaPool` object
      Throws:
        `javax.xml.stream.XMLStreamException` - XMLStreamException
        `ParserException` - ParserException
        `org.jboss.jca.common.api.validator.ValidateException` - ValidateException

    - #### parseXADataSource

          protected org.jboss.jca.common.api.metadata.ds.XaDataSource parseXADataSource(javax.xml.stream.XMLStreamReader reader)
                                                                                 throws javax.xml.stream.XMLStreamException,
                                                                                        ParserException,
                                                                                        org.jboss.jca.common.api.validator.ValidateException

      Parse a XA datasource
      Parameters:
        `reader` - The reader
      Returns:
        The XA datasource
      Throws:
        `javax.xml.stream.XMLStreamException` - Thrown if a stream error occurs
        `ParserException` - Thrown if a parser error occurs
        `org.jboss.jca.common.api.validator.ValidateException` - Thrown if a validation error occurs

    - #### parseDataSource

          protected org.jboss.jca.common.api.metadata.ds.DataSource parseDataSource(javax.xml.stream.XMLStreamReader reader)
                                                                             throws javax.xml.stream.XMLStreamException,
                                                                                    ParserException,
                                                                                    org.jboss.jca.common.api.validator.ValidateException

      Parse a datasource
      Parameters:
        `reader` - The reader
      Returns:
        The datasource
      Throws:
        `javax.xml.stream.XMLStreamException` - Thrown if a stream error occurs
        `ParserException` - Thrown if a parser error occurs
        `org.jboss.jca.common.api.validator.ValidateException` - Thrown if a validation error occurs

Copyright © 2014 IronJacamar (http://www.ironjacamar.org)