org.jboss.cache.config.parsing
Class XmlParserBase

java.lang.Object
  extended by org.jboss.cache.config.parsing.XmlParserBase
Direct Known Subclasses:
BuddyElementParser, CustomInterceptorsElementParser, EvictionElementParser, LoadersElementParser, XmlConfigurationParser

public abstract class XmlParserBase
extends Object

Contains utility methods that might be useful to most of the parsers.

Since:
3.0
Author:
Mircea.Markus@jboss.com

Field Summary
protected  String coreNamespace
           
 
Constructor Summary
XmlParserBase()
           
 
Method Summary
protected  void assertNotLegacyElement(Element e)
           
protected  boolean existsAttribute(String attrValue)
           
protected  String getAttributeValue(Element element, String attrName)
          Beside querying the element for its attribute value, it will look into the value, if any, and replace the jboss properties(e.g.
protected  boolean getBoolean(String str)
           
protected  int getInt(String intStr)
           
protected  long getLong(String longStr)
           
protected  Element getSingleElement(String namespace, String elementName, Element parent)
          Convenient method for retrieving a single element with the give name.
protected  Element getSingleElementInCoreNS(String elementName, Element parent)
          Convenient method for retrieving a single element with the give name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

coreNamespace

protected String coreNamespace
Constructor Detail

XmlParserBase

public XmlParserBase()
Method Detail

getInt

protected int getInt(String intStr)
See Also:
Integer.parseInt(String)

getLong

protected long getLong(String longStr)
See Also:
Long.parseLong(String)

getBoolean

protected boolean getBoolean(String str)
See Also:
Boolean.valueOf(String)

existsAttribute

protected boolean existsAttribute(String attrValue)
Returns:
true if the given value is not empty.

getSingleElement

protected Element getSingleElement(String namespace,
                                   String elementName,
                                   Element parent)
Convenient method for retrieving a single element with the give name.


getSingleElementInCoreNS

protected Element getSingleElementInCoreNS(String elementName,
                                           Element parent)
Convenient method for retrieving a single element with the give name.


getAttributeValue

protected String getAttributeValue(Element element,
                                   String attrName)
Beside querying the element for its attribute value, it will look into the value, if any, and replace the jboss properties(e.g. ${someValue:defaultValue}.

StringPropertyReplacer.replaceProperties(String)


assertNotLegacyElement

protected void assertNotLegacyElement(Element e)


Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.