|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.struts.tiles.xmlDefinition.FactorySet
com.free2be.dimensions.tiles.ChannelFactorySet
public class ChannelFactorySet
Definitions factory. This implementation allows to have a set of definition factories. There is a main factory, and one factory for each file associated to a Locale. To retrieve a definition, we first search for the appropriate factory, using Locale found in jsp session context. If no factory is found, use the default one. Then, we ask the factory for the definition. A definition factory file is loaded using main filename extended with locale code (ex : templateDefinitions_fr.xml). If no file is found under this name, use default file.
Field Summary | |
---|---|
static boolean |
debug
Debug flag |
static java.lang.String[] |
DEFAULT_DEFINITION_FILENAMES
Possible definition filenames |
protected org.apache.struts.tiles.xmlDefinition.DefinitionsFactory |
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
Deprecated. use DEFINITIONS_CONFIG_PARAMETER_NAME |
protected boolean |
isValidatingParser
Does we want validating parser ? |
protected static org.apache.commons.logging.Log |
log
|
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 org.apache.struts.tiles.xmlDefinition.XmlParser |
xmlParser
Xml parser used |
Fields inherited from class org.apache.struts.tiles.xmlDefinition.FactorySet |
---|
factories |
Constructor Summary | |
---|---|
ChannelFactorySet()
Parameterless Constructor. |
|
ChannelFactorySet(javax.servlet.ServletContext servletContext,
java.util.Map properties)
Constructor. |
Method Summary | |
---|---|
protected static boolean |
appendSuffix(java.lang.StringBuffer filename,
java.lang.String suffix,
java.util.List filenames)
|
protected org.apache.struts.tiles.xmlDefinition.DefinitionsFactory |
createDefaultFactory(javax.servlet.ServletContext servletContext)
Create default factory . |
protected org.apache.struts.tiles.xmlDefinition.DefinitionsFactory |
createFactory(java.lang.Object key,
javax.servlet.ServletRequest request,
javax.servlet.ServletContext servletContext)
Create a factory for specified key. |
protected org.apache.struts.tiles.xmlDefinition.DefinitionsFactory |
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. |
protected org.apache.struts.tiles.xmlDefinition.DefinitionsFactory |
getLoadedFactory(java.lang.String postfix)
|
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. |
protected org.apache.struts.tiles.xmlDefinition.DefinitionsFactory |
loadNewFactory(java.util.List ancestralPostfixes,
org.apache.struts.tiles.xmlDefinition.XmlDefinitionsSet lastXmlFile,
javax.servlet.ServletContext servletContext)
The xml file represented by the last suffix was already read...just pass it instead of re-reading it. |
Methods inherited from class org.apache.struts.tiles.xmlDefinition.FactorySet |
---|
getDefinition, getFactory, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final boolean debug
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 org.apache.struts.tiles.xmlDefinition.DefinitionsFactory defaultFactory
protected org.apache.struts.tiles.xmlDefinition.XmlParser xmlParser
protected boolean isValidatingParser
protected int parserDetailLevel
protected static org.apache.commons.logging.Log log
public static final java.lang.String FILENAME_EXTENSION
Constructor Detail |
---|
public ChannelFactorySet()
public ChannelFactorySet(javax.servlet.ServletContext servletContext, java.util.Map properties) throws org.apache.struts.tiles.DefinitionsFactoryException
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 org.apache.struts.tiles.xmlDefinition.FactorySet
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 org.apache.struts.tiles.xmlDefinition.DefinitionsFactory getDefaultFactory()
getDefaultFactory
in class org.apache.struts.tiles.xmlDefinition.FactorySet
protected org.apache.struts.tiles.xmlDefinition.DefinitionsFactory 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 org.apache.struts.tiles.xmlDefinition.FactorySet
name
- Name of requested definitionrequest
- Current servlet request.servletContext
- Current servlet context
protected org.apache.struts.tiles.xmlDefinition.DefinitionsFactory createFactory(java.lang.Object key, javax.servlet.ServletRequest request, javax.servlet.ServletContext servletContext) throws org.apache.struts.tiles.DefinitionsFactoryException
createFactory
in class org.apache.struts.tiles.xmlDefinition.FactorySet
key
-
org.apache.struts.tiles.DefinitionsFactoryException
- If an error occur while creating factory.protected org.apache.struts.tiles.xmlDefinition.DefinitionsFactory loadNewFactory(java.util.List ancestralPostfixes, org.apache.struts.tiles.xmlDefinition.XmlDefinitionsSet lastXmlFile, javax.servlet.ServletContext servletContext) throws org.apache.struts.tiles.DefinitionsFactoryException
org.apache.struts.tiles.DefinitionsFactoryException
protected org.apache.struts.tiles.xmlDefinition.DefinitionsFactory getLoadedFactory(java.lang.String postfix)
protected static boolean appendSuffix(java.lang.StringBuffer filename, java.lang.String suffix, java.util.List filenames)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |