Class AbstractParser

java.lang.Object
org.jboss.jca.common.metadata.common.AbstractParser
Direct Known Subclasses:
CommonIronJacamarParser, DsParser, RaParser

public abstract class AbstractParser extends Object
A AbstractParser.
Author:
Stefano Maestri
  • Field Details

  • Constructor Details

    • AbstractParser

      public AbstractParser()
  • Method Details

    • isSystemPropertiesResolved

      public boolean isSystemPropertiesResolved()
    • setSystemPropertiesResolved

      public void setSystemPropertiesResolved(boolean v)
    • elementAsBoolean

      protected Boolean elementAsBoolean(XMLStreamReader reader) throws 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:
      XMLStreamException - StAX exception
      ParserException - in case of non valid boolean for given element value
    • attributeAsBoolean

      protected Boolean attributeAsBoolean(XMLStreamReader reader, String attributeName, Boolean defaultValue) throws 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:
      XMLStreamException - StAX exception
      ParserException - in case of not valid boolena for given attribute
    • elementAsString

      protected String elementAsString(XMLStreamReader reader) throws XMLStreamException
      convert an xml element in String value
      Parameters:
      reader - the StAX reader
      Returns:
      the string representing element
      Throws:
      XMLStreamException - StAX exception
    • attributeAsString

      protected String attributeAsString(XMLStreamReader reader, String attributeName) throws 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:
      XMLStreamException - StAX exception
    • attributeAsInt

      protected Integer attributeAsInt(XMLStreamReader reader, String attributeName) throws 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:
      XMLStreamException - StAX exception
    • elementAsInteger

      protected Integer elementAsInteger(XMLStreamReader reader) throws XMLStreamException, ParserException
      convert an xml element in Integer value
      Parameters:
      reader - the StAX reader
      Returns:
      the integer representing element
      Throws:
      XMLStreamException - StAX exception
      ParserException - in case it isn't a number
    • elementAsLong

      protected Long elementAsLong(XMLStreamReader reader) throws XMLStreamException, ParserException
      convert an xml element in Long value
      Parameters:
      reader - the StAX reader
      Returns:
      the long representing element
      Throws:
      XMLStreamException - StAX exception
      ParserException - in case it isn't a number
    • elementAsFlushStrategy

      protected org.jboss.jca.common.api.metadata.common.FlushStrategy elementAsFlushStrategy(XMLStreamReader reader) throws XMLStreamException, ParserException
      convert an xml element in FlushStrategy value
      Parameters:
      reader - the StAX reader
      Returns:
      the flush strategy represention
      Throws:
      XMLStreamException - StAX exception
      ParserException - in case it isn't a number
    • parsePool

      protected org.jboss.jca.common.api.metadata.common.Pool parsePool(XMLStreamReader reader) throws XMLStreamException, ParserException, org.jboss.jca.common.api.validator.ValidateException
      parse a Pool object
      Parameters:
      reader - reader
      Returns:
      the parsed Pool object
      Throws:
      XMLStreamException - XMLStreamException
      ParserException - ParserException
      org.jboss.jca.common.api.validator.ValidateException - ValidateException
    • parseXaPool

      protected org.jboss.jca.common.api.metadata.common.XaPool parseXaPool(XMLStreamReader reader) throws XMLStreamException, ParserException, org.jboss.jca.common.api.validator.ValidateException
      parse a XaPool object
      Parameters:
      reader - reader
      Returns:
      the parsed XaPool object
      Throws:
      XMLStreamException - XMLStreamException
      ParserException - ParserException
      org.jboss.jca.common.api.validator.ValidateException - ValidateException
    • parseSecuritySettings

      protected org.jboss.jca.common.api.metadata.common.Security parseSecuritySettings(XMLStreamReader reader) throws XMLStreamException, ParserException, org.jboss.jca.common.api.validator.ValidateException
      parse a Security element
      Parameters:
      reader - reader
      Returns:
      a Security object
      Throws:
      XMLStreamException - XMLStreamException
      ParserException - ParserException
      org.jboss.jca.common.api.validator.ValidateException - ValidateException
    • parseCredential

      protected org.jboss.jca.common.api.metadata.common.Credential parseCredential(XMLStreamReader reader) throws XMLStreamException, ParserException, org.jboss.jca.common.api.validator.ValidateException
      parse credential tag
      Parameters:
      reader - reader
      Returns:
      the parse Object
      Throws:
      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(XMLStreamReader reader) throws XMLStreamException, ParserException, org.jboss.jca.common.api.validator.ValidateException
      Parse recovery tag
      Parameters:
      reader - reader
      Returns:
      the parsed recovery object
      Throws:
      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(XMLStreamReader reader, String enclosingTag) throws XMLStreamException, ParserException, org.jboss.jca.common.api.validator.ValidateException
      parse the Extension tag
      Parameters:
      reader - reader
      enclosingTag - enclosingTag
      Returns:
      the parsed extension object
      Throws:
      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(XMLStreamReader reader) throws XMLStreamException, ParserException, org.jboss.jca.common.api.validator.ValidateException
      Parse capacity tag
      Parameters:
      reader - reader
      Returns:
      the parsed recovery object
      Throws:
      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(XMLStreamReader reader) throws XMLStreamException, ParserException, org.jboss.jca.common.api.validator.ValidateException
      Parse validation
      Parameters:
      reader - The reader
      Returns:
      The result
      Throws:
      XMLStreamException - XMLStreamException
      ParserException - ParserException
      org.jboss.jca.common.api.validator.ValidateException - ValidateException
    • parseTimeOut

      protected org.jboss.jca.common.api.metadata.common.TimeOut parseTimeOut(XMLStreamReader reader, Boolean isXa) throws XMLStreamException, ParserException, org.jboss.jca.common.api.validator.ValidateException
      Parse timeout
      Parameters:
      reader - The reader
      isXa - XA flag
      Returns:
      The result
      Throws:
      XMLStreamException - XMLStreamException
      ParserException - ParserException
      org.jboss.jca.common.api.validator.ValidateException - ValidateException
    • parseConfigProperty

      protected void parseConfigProperty(Map<String,String> configProperties, XMLStreamReader reader) throws XMLStreamException, ParserException
      Adds config property to the map
      Parameters:
      configProperties - map
      reader - XMLStream reader
      Throws:
      XMLStreamException - in case of error
      ParserException - in case of error