Package org.jboss.as.connector.util
Class AbstractParser
- java.lang.Object
-
- org.jboss.as.connector.util.AbstractParser
-
- Direct Known Subclasses:
CommonIronJacamarParser,DsParser
public abstract class AbstractParser extends Object
An AbstractParser.- Author:
- Stefano Maestri
-
-
Constructor Summary
Constructors Constructor Description AbstractParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidparseExtension(org.jboss.staxmapper.XMLExtendedStreamReader reader, String enclosingTag, org.jboss.dmr.ModelNode operation, org.jboss.as.controller.SimpleAttributeDefinition extensionClassName, org.jboss.as.controller.PropertiesAttributeDefinition extensionProperties)protected voidparseModuleExtension(org.jboss.staxmapper.XMLExtendedStreamReader reader, String enclosingTag, org.jboss.dmr.ModelNode operation, org.jboss.as.controller.SimpleAttributeDefinition extensionClassName, org.jboss.as.controller.SimpleAttributeDefinition extensionModuleName, org.jboss.as.controller.PropertiesAttributeDefinition extensionProperties)StringrawAttributeText(XMLStreamReader reader, String attributeName)Reads and trims the text for the given attribute and returns it ornullStringrawAttributeText(XMLStreamReader reader, String attributeName, String defaultValue)Reads and trims the text for the given attribute and returns it ordefaultValueif there is no value for the attributeStringrawElementText(XMLStreamReader reader)Reads and trims the element text and returns it ornull
-
-
-
Method Detail
-
rawElementText
public String rawElementText(XMLStreamReader reader) throws XMLStreamException
Reads and trims the element text and returns it ornull- Parameters:
reader- source for the element text- Returns:
- the string representing the trimmed element text or
nullif there is none or it is an empty string - Throws:
XMLStreamException
-
rawAttributeText
public String rawAttributeText(XMLStreamReader reader, String attributeName)
Reads and trims the text for the given attribute and returns it ornull- Parameters:
reader- source for the attribute textattributeName- the name of the attribute- Returns:
- the string representing trimmed attribute text or
nullif there is none
-
rawAttributeText
public String rawAttributeText(XMLStreamReader reader, String attributeName, String defaultValue)
Reads and trims the text for the given attribute and returns it ordefaultValueif there is no value for the attribute- Parameters:
reader- source for the attribute textattributeName- the name of the attributedefaultValue- value to return if there is no value for the attribute- Returns:
- the string representing raw attribute text or
defaultValueif there is none
-
parseModuleExtension
protected void parseModuleExtension(org.jboss.staxmapper.XMLExtendedStreamReader reader, String enclosingTag, org.jboss.dmr.ModelNode operation, org.jboss.as.controller.SimpleAttributeDefinition extensionClassName, org.jboss.as.controller.SimpleAttributeDefinition extensionModuleName, org.jboss.as.controller.PropertiesAttributeDefinition extensionProperties) throws XMLStreamException, ParserException, org.jboss.jca.common.api.validator.ValidateException- Throws:
XMLStreamExceptionParserExceptionorg.jboss.jca.common.api.validator.ValidateException
-
parseExtension
protected void parseExtension(org.jboss.staxmapper.XMLExtendedStreamReader reader, String enclosingTag, org.jboss.dmr.ModelNode operation, org.jboss.as.controller.SimpleAttributeDefinition extensionClassName, org.jboss.as.controller.PropertiesAttributeDefinition extensionProperties) throws XMLStreamException, ParserException, org.jboss.jca.common.api.validator.ValidateException- Throws:
XMLStreamExceptionParserExceptionorg.jboss.jca.common.api.validator.ValidateException
-
-