org.apache.struts.tiles
Class DefinitionsFactoryConfig
java.lang.Object
org.apache.struts.tiles.DefinitionsFactoryConfig
- Serializable
public class DefinitionsFactoryConfig
extends java.lang.Object
implements Serializable
A TilesFactoryConfig object hold configuration attributes for a tile
definition factory.
$Rev: 54929 $ $Date: 2004-10-16 17:38:42 +0100 (Sat, 16 Oct 2004) $
DEFINITIONS_CONFIG_PARAMETER_NAME
public static final String DEFINITIONS_CONFIG_PARAMETER_NAME
Alternate name for definition files properties in configuration file.
FACTORY_CLASSNAME_PARAMETER_NAME
public static final String FACTORY_CLASSNAME_PARAMETER_NAME
Alternate name for factory classname properties in configuration file.
PARSER_DETAILS_PARAMETER_NAME
public static final String PARSER_DETAILS_PARAMETER_NAME
This will be removed in a release after Struts 1.2.
Alternate name for parser debug details properties in configuration file.
PARSER_VALIDATE_PARAMETER_NAME
public static final String PARSER_VALIDATE_PARAMETER_NAME
Alternate name for parser validate properties in configuration file.
TILES_DETAILS_PARAMETER_NAME
public static final String TILES_DETAILS_PARAMETER_NAME
This will be removed in a release after Struts 1.2.
Alternate name for definition debug details properties in configuration file.
definitionConfigFiles
protected String definitionConfigFiles
Definition configuration file specified by user.
extraAttributes
private Map extraAttributes
Map of extra attribute available.
factoryClassname
protected String factoryClassname
Fully qualified classname of the factory to create.
If no classname is set, a default factory is created
(of class "org.apache.struts.tiles.xmlDefinition.I18nFactorySet").
factoryName
protected String factoryName
The name associated to this factory.
With Struts 1.1, this name is the module name to which this factory
belong. It is set by the system.
In prior versions, this property is not used.
moduleAware
protected boolean moduleAware
Specifies whether the factory is "module-aware".
parserValidate
protected boolean parserValidate
Specifies whether the parser will validate configuration files.
Default value is true.
DefinitionsFactoryConfig
public DefinitionsFactoryConfig()
Default constructor.
DefinitionsFactoryConfig
public DefinitionsFactoryConfig(Map initParameters)
Constructor.
Create configuration object, and initialize it with parameters from Map.
Parameters corresponding to an attribute are filtered and stored in appropriate
attribute.
getAttribute
public Object getAttribute(String name)
Get value of an additional attribute.
name
- Name of the attribute.
- Value of the attribute, or null if not found.
getAttributes
public Map getAttributes()
Get additional attributes as a Map.
- Map A Map containing attribute name - value pairs.
getDefinitionConfigFiles
public String getDefinitionConfigFiles()
Get the definition config files.
getFactoryClassname
public String getFactoryClassname()
Get the classname of the factory.
getFactoryName
public String getFactoryName()
Get the factory name.
getParserValidate
public boolean getParserValidate()
Determines if the parser is validating.
true
when in validating mode.
isModuleAware
public boolean isModuleAware()
Get the module aware flag.
true
: user wants a single factory instance,
false
: user wants multiple factory instances (one per module with Struts)
linkOldPropertyNames
public static void linkOldPropertyNames(Map properties)
Link old property names to new property names.
This modifies the map.
properties
- Map keyed by property name, with the
corresponding (String or String[]) value(s) to be set.
populate
public void populate(Map properties)
throws IllegalAccessException,
InvocationTargetException
Populate this config object from properties map, based on
the specified name/value pairs. This method uses the populate() method from
org.apache.commons.beanutils.BeanUtil.
Properties keys are scanned for old property names, and linked to the new name
if necessary. This modifies the properties map.
The particular setter method to be called for each property is
determined using the usual JavaBeans introspection mechanisms. Thus,
you may identify custom setter methods using a BeanInfo class that is
associated with the class of the bean itself. If no such BeanInfo
class is available, the standard method name conversion ("set" plus
the capitalized name of the property in question) is used.
NOTE: It is contrary to the JavaBeans Specification
to have more than one setter method (with different argument
signatures) for the same property.
properties
- Map keyed by property name, with the
corresponding (String or String[]) value(s) to be set.
org.apache.commons.beanutils.BeanUtils
setAttribute
public void setAttribute(String name,
Object value)
Set value of an additional attribute.
name
- Name of the attribute.value
- Value of the attribute.
setDefinitionConfigFiles
public void setDefinitionConfigFiles(String aDefinitionConfigFiles)
Set the definition config files.
aDefinitionConfigFiles
- Definition config files.
setFactoryClassname
public void setFactoryClassname(String aFactoryClassname)
Set the classname of the factory..
aFactoryClassname
- Classname of the factory.
setFactoryName
public void setFactoryName(String factoryName)
Set the factory name.
factoryName
- Name of the factory.
setModuleAware
public void setModuleAware(boolean moduleAware)
Set the module aware flag.
moduleAware
- true
: user wants a single factory instance,
false
: user wants multiple factory instances (one per module with Struts)
setParserValidate
public void setParserValidate(boolean aParserValidate)
Set the validating mode for the parser.
aParserValidate
- true
for validation, false
otherwise
Copyright B) 2000-2007 - The Apache Software Foundation