org.jboss.jca.common.metadata.common

## Class AbstractParser

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

- Direct Known Subclasses:
    CommonIronJacamarParser, DsParser, RaParser

      public abstract class AbstractParser
      extends java.lang.Object

  A AbstractParser.
  Author:
    Stefano Maestri

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static CommonBundle` | `bundle` The bundle
    `protected static CommonLogger` | `log` The logger

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractParser()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected java.lang.Boolean` | `attributeAsBoolean(javax.xml.stream.XMLStreamReader reader, java.lang.String attributeName, java.lang.Boolean defaultValue)` convert an xml attribute in boolean value.
    `protected java.lang.Integer` | `attributeAsInt(javax.xml.stream.XMLStreamReader reader, java.lang.String attributeName)` convert an xml element in String value
    `protected java.lang.String` | `attributeAsString(javax.xml.stream.XMLStreamReader reader, java.lang.String attributeName)` convert an xml element in String value
    `protected java.lang.Boolean` | `elementAsBoolean(javax.xml.stream.XMLStreamReader reader)` convert an xml element in boolean value.
    `protected org.jboss.jca.common.api.metadata.common.FlushStrategy` | `elementAsFlushStrategy(javax.xml.stream.XMLStreamReader reader)` convert an xml element in FlushStrategy value
    `protected java.lang.Integer` | `elementAsInteger(javax.xml.stream.XMLStreamReader reader)` convert an xml element in Integer value
    `protected java.lang.Long` | `elementAsLong(javax.xml.stream.XMLStreamReader reader)` convert an xml element in Long value
    `protected java.lang.String` | `elementAsString(javax.xml.stream.XMLStreamReader reader)` convert an xml element in String value
    `boolean` | `isSystemPropertiesResolved()`
    `protected org.jboss.jca.common.api.metadata.common.Capacity` | `parseCapacity(javax.xml.stream.XMLStreamReader reader)` Parse capacity tag
    `protected void` | `parseConfigProperty(java.util.Map<java.lang.String,java.lang.String> configProperties, javax.xml.stream.XMLStreamReader reader)` Adds config property to the map
    `protected org.jboss.jca.common.api.metadata.common.Credential` | `parseCredential(javax.xml.stream.XMLStreamReader reader)` parse credential tag
    `protected org.jboss.jca.common.api.metadata.common.Extension` | `parseExtension(javax.xml.stream.XMLStreamReader reader, java.lang.String enclosingTag)` parse the Extension tag
    `protected org.jboss.jca.common.api.metadata.common.Pool` | `parsePool(javax.xml.stream.XMLStreamReader reader)` parse a `Pool` object
    `protected org.jboss.jca.common.api.metadata.common.Recovery` | `parseRecovery(javax.xml.stream.XMLStreamReader reader)` Parse recovery tag
    `protected org.jboss.jca.common.api.metadata.common.Security` | `parseSecuritySettings(javax.xml.stream.XMLStreamReader reader)` parse a `Security` element
    `protected org.jboss.jca.common.api.metadata.common.TimeOut` | `parseTimeOut(javax.xml.stream.XMLStreamReader reader, java.lang.Boolean isXa)` Parse timeout
    `protected org.jboss.jca.common.api.metadata.common.Validation` | `parseValidation(javax.xml.stream.XMLStreamReader reader)` Parse validation
    `protected org.jboss.jca.common.api.metadata.common.XaPool` | `parseXaPool(javax.xml.stream.XMLStreamReader reader)` parse a `XaPool` object
    `void` | `setSystemPropertiesResolved(boolean v)`

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

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

- - ### Field Detail

    - #### log

          protected static CommonLogger log

      The logger

    - #### bundle

          protected static CommonBundle bundle

      The bundle

  - ### Constructor Detail

    - #### AbstractParser

          public AbstractParser()

  - ### Method Detail

    - #### isSystemPropertiesResolved

          public boolean isSystemPropertiesResolved()

    - #### setSystemPropertiesResolved

          public void setSystemPropertiesResolved(boolean v)

    - #### elementAsBoolean

          protected java.lang.Boolean elementAsBoolean(javax.xml.stream.XMLStreamReader reader)
                                                throws javax.xml.stream.XMLStreamException,
                                                       ParserException

      convert an xml element in boolean value. Empty elements results with true (tag presence is sufficient condition)
      Parameters:
        `reader` - the StAX reader
      Returns:
        the boolean representing element
      Throws:
        `javax.xml.stream.XMLStreamException` - StAX exception
        `ParserException` - in case of non valid boolean for given element value

    - #### attributeAsBoolean

          protected java.lang.Boolean attributeAsBoolean(javax.xml.stream.XMLStreamReader reader,
                                                         java.lang.String attributeName,
                                                         java.lang.Boolean defaultValue)
                                                  throws javax.xml.stream.XMLStreamException,
                                                         ParserException

      convert an xml attribute in boolean value. Empty elements results with false
      Parameters:
        `reader` - the StAX reader
        `attributeName` - the name of the attribute
        `defaultValue` - defaultValue
      Returns:
        the boolean representing element
      Throws:
        `javax.xml.stream.XMLStreamException` - StAX exception
        `ParserException` - in case of not valid boolena for given attribute

    - #### elementAsString

          protected java.lang.String elementAsString(javax.xml.stream.XMLStreamReader reader)
                                              throws javax.xml.stream.XMLStreamException

      convert an xml element in String value
      Parameters:
        `reader` - the StAX reader
      Returns:
        the string representing element
      Throws:
        `javax.xml.stream.XMLStreamException` - StAX exception

    - #### attributeAsString

          protected java.lang.String attributeAsString(javax.xml.stream.XMLStreamReader reader,
                                                       java.lang.String attributeName)
                                                throws javax.xml.stream.XMLStreamException

      convert an xml element in String value
      Parameters:
        `reader` - the StAX reader
        `attributeName` - the name of the attribute
      Returns:
        the string representing element
      Throws:
        `javax.xml.stream.XMLStreamException` - StAX exception

    - #### attributeAsInt

          protected java.lang.Integer attributeAsInt(javax.xml.stream.XMLStreamReader reader,
                                                     java.lang.String attributeName)
                                              throws javax.xml.stream.XMLStreamException

      convert an xml element in String value
      Parameters:
        `reader` - the StAX reader
        `attributeName` - the name of the attribute
      Returns:
        the string representing element
      Throws:
        `javax.xml.stream.XMLStreamException` - StAX exception

    - #### elementAsInteger

          protected java.lang.Integer elementAsInteger(javax.xml.stream.XMLStreamReader reader)
                                                throws javax.xml.stream.XMLStreamException,
                                                       ParserException

      convert an xml element in Integer value
      Parameters:
        `reader` - the StAX reader
      Returns:
        the integer representing element
      Throws:
        `javax.xml.stream.XMLStreamException` - StAX exception
        `ParserException` - in case it isn't a number

    - #### elementAsLong

          protected java.lang.Long elementAsLong(javax.xml.stream.XMLStreamReader reader)
                                          throws javax.xml.stream.XMLStreamException,
                                                 ParserException

      convert an xml element in Long value
      Parameters:
        `reader` - the StAX reader
      Returns:
        the long representing element
      Throws:
        `javax.xml.stream.XMLStreamException` - StAX exception
        `ParserException` - in case it isn't a number

    - #### elementAsFlushStrategy

          protected org.jboss.jca.common.api.metadata.common.FlushStrategy elementAsFlushStrategy(javax.xml.stream.XMLStreamReader reader)
                                                                                           throws javax.xml.stream.XMLStreamException,
                                                                                                  ParserException

      convert an xml element in FlushStrategy value
      Parameters:
        `reader` - the StAX reader
      Returns:
        the flush strategy represention
      Throws:
        `javax.xml.stream.XMLStreamException` - StAX exception
        `ParserException` - in case it isn't a number

    - #### parsePool

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

      parse a `Pool` object
      Parameters:
        `reader` - reader
      Returns:
        the parsed `Pool` 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.common.XaPool parseXaPool(javax.xml.stream.XMLStreamReader reader)
                                                                         throws javax.xml.stream.XMLStreamException,
                                                                                ParserException,
                                                                                org.jboss.jca.common.api.validator.ValidateException

      parse a `XaPool` object
      Parameters:
        `reader` - reader
      Returns:
        the parsed `XaPool` object
      Throws:
        `javax.xml.stream.XMLStreamException` - XMLStreamException
        `ParserException` - ParserException
        `org.jboss.jca.common.api.validator.ValidateException` - ValidateException

    - #### parseSecuritySettings

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

      parse a `Security` element
      Parameters:
        `reader` - reader
      Returns:
        a `Security` object
      Throws:
        `javax.xml.stream.XMLStreamException` - XMLStreamException
        `ParserException` - ParserException
        `org.jboss.jca.common.api.validator.ValidateException` - ValidateException

    - #### parseCredential

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

      parse credential tag
      Parameters:
        `reader` - reader
      Returns:
        the parse Object
      Throws:
        `javax.xml.stream.XMLStreamException` - in case of error
        `ParserException` - in case of error
        `org.jboss.jca.common.api.validator.ValidateException` - in case of error

    - #### parseRecovery

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

      Parse recovery tag
      Parameters:
        `reader` - reader
      Returns:
        the parsed recovery object
      Throws:
        `javax.xml.stream.XMLStreamException` - in case of error
        `ParserException` - in case of error
        `org.jboss.jca.common.api.validator.ValidateException` - in case of error

    - #### parseExtension

          protected org.jboss.jca.common.api.metadata.common.Extension parseExtension(javax.xml.stream.XMLStreamReader reader,
                                                                                      java.lang.String enclosingTag)
                                                                               throws javax.xml.stream.XMLStreamException,
                                                                                      ParserException,
                                                                                      org.jboss.jca.common.api.validator.ValidateException

      parse the Extension tag
      Parameters:
        `reader` - reader
        `enclosingTag` - enclosingTag
      Returns:
        the parsed extension object
      Throws:
        `javax.xml.stream.XMLStreamException` - in case of error
        `ParserException` - in case of error
        `org.jboss.jca.common.api.validator.ValidateException` - in case of error

    - #### parseCapacity

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

      Parse capacity tag
      Parameters:
        `reader` - reader
      Returns:
        the parsed recovery object
      Throws:
        `javax.xml.stream.XMLStreamException` - in case of error
        `ParserException` - in case of error
        `org.jboss.jca.common.api.validator.ValidateException` - in case of error

    - #### parseValidation

          protected org.jboss.jca.common.api.metadata.common.Validation parseValidation(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

    - #### parseTimeOut

          protected org.jboss.jca.common.api.metadata.common.TimeOut parseTimeOut(javax.xml.stream.XMLStreamReader reader,
                                                                                  java.lang.Boolean isXa)
                                                                           throws javax.xml.stream.XMLStreamException,
                                                                                  ParserException,
                                                                                  org.jboss.jca.common.api.validator.ValidateException

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

    - #### parseConfigProperty

          protected void parseConfigProperty(java.util.Map<java.lang.String,java.lang.String> configProperties,
                                             javax.xml.stream.XMLStreamReader reader)
                                      throws javax.xml.stream.XMLStreamException,
                                             ParserException

      Adds config property to the map
      Parameters:
        `configProperties` - map
        `reader` - XMLStream reader
      Throws:
        `javax.xml.stream.XMLStreamException` - in case of error
        `ParserException` - in case of error

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