Class AbstractConfigurationReader
- java.lang.Object
-
- org.infinispan.commons.configuration.io.AbstractConfigurationReader
-
- All Implemented Interfaces:
AutoCloseable
,ConfigurationReader
- Direct Known Subclasses:
JsonConfigurationReader
,XmlConfigurationReader
,YamlConfigurationReader
public abstract class AbstractConfigurationReader extends Object implements ConfigurationReader
- Since:
- 12.1
- Author:
- Tristan Tarrant <[email protected]>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.infinispan.commons.configuration.io.ConfigurationReader
ConfigurationReader.Builder, ConfigurationReader.ElementType
-
-
Field Summary
Fields Modifier and Type Field Description protected NamingStrategy
namingStrategy
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractConfigurationReader(ConfigurationResourceResolver resolver, Properties properties, PropertyReplacer replacer, NamingStrategy namingStrategy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAttributeName(int index)
String
getAttributeValue(String name)
String
getLocalName()
Map.Entry<String,String>
getMapItem(Enum<?> nameAttribute)
NamingStrategy
getNamingStrategy()
Properties
getProperties()
String
getProperty(String name)
ConfigurationResourceResolver
getResourceResolver()
ConfigurationSchemaVersion
getSchema()
void
handleAny(ConfigurationReaderContext context)
void
handleAttribute(ConfigurationReaderContext context, int i)
String[]
readArray(Enum<?> outer, Enum<?> inner)
protected String
replaceProperties(String value)
void
setSchema(ConfigurationSchemaVersion schema)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.infinispan.commons.configuration.io.ConfigurationReader
close, endMapItem, getAttributeCount, getAttributeName, getAttributeNamespace, getAttributeValue, getAttributeValue, getAttributeValue, getAttributeValue, getElementText, getListAttributeValue, getLocalName, getLocation, getMapItem, getNamespace, hasFeature, hasNext, inTag, inTag, inTag, nextElement, readArray, require, require, require
-
-
-
-
Field Detail
-
namingStrategy
protected final NamingStrategy namingStrategy
-
-
Constructor Detail
-
AbstractConfigurationReader
protected AbstractConfigurationReader(ConfigurationResourceResolver resolver, Properties properties, PropertyReplacer replacer, NamingStrategy namingStrategy)
-
-
Method Detail
-
getResourceResolver
public ConfigurationResourceResolver getResourceResolver()
- Specified by:
getResourceResolver
in interfaceConfigurationReader
- Returns:
- the resource resolver used by this ConfigurationReader to find external references (e.g. includes)
-
getNamingStrategy
public NamingStrategy getNamingStrategy()
- Specified by:
getNamingStrategy
in interfaceConfigurationReader
- Returns:
- the naming strategy used by this ConfigurationReader
-
getProperty
public String getProperty(String name)
- Specified by:
getProperty
in interfaceConfigurationReader
-
getProperties
public Properties getProperties()
- Specified by:
getProperties
in interfaceConfigurationReader
-
getSchema
public ConfigurationSchemaVersion getSchema()
- Specified by:
getSchema
in interfaceConfigurationReader
- Returns:
- the schema
-
setSchema
public void setSchema(ConfigurationSchemaVersion schema)
- Specified by:
setSchema
in interfaceConfigurationReader
- Parameters:
schema
- the ConfigurationSchema in use
-
handleAny
public void handleAny(ConfigurationReaderContext context)
- Specified by:
handleAny
in interfaceConfigurationReader
-
handleAttribute
public void handleAttribute(ConfigurationReaderContext context, int i)
- Specified by:
handleAttribute
in interfaceConfigurationReader
-
getAttributeName
public String getAttributeName(int index)
- Specified by:
getAttributeName
in interfaceConfigurationReader
-
getLocalName
public String getLocalName()
- Specified by:
getLocalName
in interfaceConfigurationReader
-
getAttributeValue
public String getAttributeValue(String name)
- Specified by:
getAttributeValue
in interfaceConfigurationReader
-
getMapItem
public Map.Entry<String,String> getMapItem(Enum<?> nameAttribute)
- Specified by:
getMapItem
in interfaceConfigurationReader
-
readArray
public String[] readArray(Enum<?> outer, Enum<?> inner)
- Specified by:
readArray
in interfaceConfigurationReader
-
-