|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.macvu.tiles.xmlDefinition.CacheFactorySet
com.macvu.tiles.xmlDefinition.CacheI18nFactorySet
public class CacheI18nFactorySet
Field Summary | |
---|---|
static java.lang.String[] |
DEFAULT_DEFINITION_FILENAMES
Possible definition filenames. |
protected CacheDefinitionFactory |
defaultFactory
Default factory. |
static java.lang.String |
DEFINITIONS_CONFIG_PARAMETER_NAME
Config file parameter name. |
static java.lang.String |
FILENAME_EXTENSION
Default filenames extension. |
static java.lang.String |
INSTANCES_CONFIG_PARAMETER_NAME
Config file parameter name. |
protected boolean |
isValidatingParser
Do we want validating parser. |
protected static org.apache.commons.logging.Log |
log
Commons Logging instance. |
static java.lang.String |
PARSER_DETAILS_PARAMETER_NAME
Config file parameter name. |
static java.lang.String |
PARSER_VALIDATE_PARAMETER_NAME
Config file parameter name. |
protected int |
parserDetailLevel
Parser detail level. |
protected XmlCacheParser |
xmlParser
Xml parser used. |
Fields inherited from class com.macvu.tiles.xmlDefinition.CacheFactorySet |
---|
factories |
Constructor Summary | |
---|---|
CacheI18nFactorySet()
Parameterless Constructor. |
|
CacheI18nFactorySet(javax.servlet.ServletContext servletContext,
java.util.Map properties)
Constructor. |
Method Summary | |
---|---|
protected CacheDefinitionFactory |
createDefaultFactory(javax.servlet.ServletContext servletContext)
Create default factory . |
protected CacheDefinitionFactory |
createFactory(java.lang.Object key,
javax.servlet.ServletRequest request,
javax.servlet.ServletContext servletContext)
Create a factory for specified key. |
protected CacheDefinitionFactory |
getDefaultFactory()
Get default factory. |
protected java.lang.Object |
getDefinitionsFactoryKey(java.lang.String name,
javax.servlet.ServletRequest request,
javax.servlet.ServletContext servletContext)
Extract key that will be used to get the sub factory. |
void |
initFactory(javax.servlet.ServletContext servletContext,
java.util.Map properties)
Initialization method. |
protected void |
initFactory(javax.servlet.ServletContext servletContext,
java.lang.String proposedFilename)
Initialization method. |
java.lang.String |
toString()
Return String representation. |
Methods inherited from class com.macvu.tiles.xmlDefinition.CacheFactorySet |
---|
getDefinition, getFactory |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static org.apache.commons.logging.Log log
public static final java.lang.String INSTANCES_CONFIG_PARAMETER_NAME
public static final java.lang.String DEFINITIONS_CONFIG_PARAMETER_NAME
public static final java.lang.String PARSER_DETAILS_PARAMETER_NAME
public static final java.lang.String PARSER_VALIDATE_PARAMETER_NAME
public static final java.lang.String[] DEFAULT_DEFINITION_FILENAMES
protected CacheDefinitionFactory defaultFactory
protected transient XmlCacheParser xmlParser
protected boolean isValidatingParser
false
.
Can be set from servlet config file.
protected int parserDetailLevel
public static final java.lang.String FILENAME_EXTENSION
Constructor Detail |
---|
public CacheI18nFactorySet()
initFactory(javax.servlet.ServletContext, java.util.Map)
must be called prior to any use of created factory.
public CacheI18nFactorySet(javax.servlet.ServletContext servletContext, java.util.Map properties) throws org.apache.struts.tiles.DefinitionsFactoryException
servletContext
- Servlet context.properties
- Map containing all properties.
org.apache.struts.tiles.FactoryNotFoundException
- Can't find factory configuration file.
org.apache.struts.tiles.DefinitionsFactoryException
Method Detail |
---|
public void initFactory(javax.servlet.ServletContext servletContext, java.util.Map properties) throws org.apache.struts.tiles.DefinitionsFactoryException
initFactory
in interface org.apache.struts.tiles.ComponentDefinitionsFactory
initFactory
in class CacheFactorySet
servletContext
- Servlet Context passed to newly created factory.properties
- Map of name/property passed to newly created factory. Map can contains
more properties than requested.
org.apache.struts.tiles.DefinitionsFactoryException
- An error occur during initialization.protected void initFactory(javax.servlet.ServletContext servletContext, java.lang.String proposedFilename) throws org.apache.struts.tiles.DefinitionsFactoryException, java.io.FileNotFoundException
servletContext
- Servlet Context passed to newly created factory.proposedFilename
- File names, comma separated, to use as base file names.
org.apache.struts.tiles.DefinitionsFactoryException
- An error occur during initialization.
java.io.FileNotFoundException
protected CacheDefinitionFactory getDefaultFactory()
getDefaultFactory
in class CacheFactorySet
protected CacheDefinitionFactory createDefaultFactory(javax.servlet.ServletContext servletContext) throws org.apache.struts.tiles.DefinitionsFactoryException, java.io.FileNotFoundException
servletContext
- Current servlet context. Used to open file.
org.apache.struts.tiles.DefinitionsFactoryException
- If an error occur while creating factory.
java.io.FileNotFoundException
- if factory can't be loaded from filenames.protected java.lang.Object getDefinitionsFactoryKey(java.lang.String name, javax.servlet.ServletRequest request, javax.servlet.ServletContext servletContext)
getDefinitionsFactoryKey
in class CacheFactorySet
name
- Name of requested definitionrequest
- Current servlet request.servletContext
- Current servlet context.
null
if not found.protected CacheDefinitionFactory createFactory(java.lang.Object key, javax.servlet.ServletRequest request, javax.servlet.ServletContext servletContext) throws org.apache.struts.tiles.DefinitionsFactoryException
createFactory
in class CacheFactorySet
key
- The key.request
- Servlet request.servletContext
- Servlet context.
org.apache.struts.tiles.DefinitionsFactoryException
- If an error occur while creating factory.public java.lang.String toString()
toString
in class CacheFactorySet
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |