|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.struts.tiles.TilesUtil org.apache.struts.tiles.DefinitionsUtil
TilesUtil.createDefinitionsFactory(ServletContext, DefinitionsFactoryConfig)
public class DefinitionsUtil
Utilities class for definitions factory. Also define userDebugLevel property (TODO to be moved from this class ?).
Field Summary | |
---|---|
static String |
ACTION_DEFINITION
Deprecated. Constant name used to store definition in jsp context. |
static String |
DEFINITIONS_CONFIG_USER_DEBUG_LEVEL
Deprecated. Name of init property carrying debug level. |
static String |
DEFINITIONS_FACTORY
Deprecated. Constant name used to store factory in context. |
static String |
DEFINITIONS_FACTORY_CLASSNAME
Deprecated. Name of init property carrying factory class name. |
protected static Log |
log
Deprecated. Commons Logging instance. |
static int |
NO_DEBUG
Deprecated. This will be removed in a release after Struts 1.2. |
static int |
userDebugLevel
Deprecated. This will be removed in a release after Struts 1.2. |
Fields inherited from class org.apache.struts.tiles.TilesUtil |
---|
tilesUtilImpl |
Fields inherited from interface org.apache.struts.tiles.taglib.ComponentConstants |
---|
COMPONENT_CONTEXT, COMPONENT_SCOPE, EXCEPTION_KEY, LOCALE_KEY |
Constructor Summary | |
---|---|
DefinitionsUtil()
Deprecated. |
Method Summary | |
---|---|
static DefinitionsFactory |
createDefinitionsFactory(ServletContext servletContext,
Map properties)
Deprecated. Create default Definition factory. |
static DefinitionsFactory |
createDefinitionsFactory(ServletContext servletContext,
Map properties,
String classname)
Deprecated. Use createDefinitionsFactory(ServletContext servletContext, ServletConfig servletConfig) |
static DefinitionsFactory |
createDefinitionsFactory(ServletContext servletContext,
ServletConfig servletConfig)
Deprecated. Create Definition factory. |
static DefinitionsFactory |
createDefinitionsFactory(ServletContext servletContext,
ServletConfig servletConfig,
boolean checkIfExist)
Deprecated. Create Definition factory. |
static ComponentDefinition |
getActionDefinition(ServletRequest request)
Deprecated. Get Definition stored in jsp context by an action. |
static DefinitionsFactory |
getDefinitionsFactory(ServletContext servletContext)
Deprecated. Use TilesUtil.getDefinitionsFactory(ServletRequest, ServletContext) |
static void |
populateDefinitionsFactoryConfig(DefinitionsFactoryConfig factoryConfig,
ServletConfig servletConfig)
Deprecated. Populate Definition Factory Config from web.xml properties. |
protected static DefinitionsFactoryConfig |
readFactoryConfig(ServletConfig servletConfig)
Deprecated. Create FactoryConfig and initialize it from web.xml. |
static void |
removeActionDefinition(ServletRequest request,
ComponentDefinition definition)
Deprecated. Remove Definition stored in jsp context. |
static void |
setActionDefinition(ServletRequest request,
ComponentDefinition definition)
Deprecated. Store definition in jsp context. |
Methods inherited from class org.apache.struts.tiles.TilesUtil |
---|
createDefinitionsFactory, doForward, doInclude, doInclude, doInclude, getDefinition, getDefinitionsFactory, getTilesUtil, setTilesUtil, testReset |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static Log log
public static int userDebugLevel
public static final int NO_DEBUG
public static final String DEFINITIONS_CONFIG_USER_DEBUG_LEVEL
public static final String DEFINITIONS_FACTORY_CLASSNAME
public static final String DEFINITIONS_FACTORY
public static final String ACTION_DEFINITION
Constructor Detail |
---|
public DefinitionsUtil()
Method Detail |
---|
public static DefinitionsFactory createDefinitionsFactory(ServletContext servletContext, Map properties, String classname) throws DefinitionsFactoryException
classname
- Class name of the factory to create.servletContext
- Servlet Context passed to newly created factory.properties
- Map of name/property used to initialize factory configuration object.
DefinitionsFactoryException
- If an error occur while initializing factorypublic static DefinitionsFactory createDefinitionsFactory(ServletContext servletContext, Map properties) throws DefinitionsFactoryException
servletContext
- Servlet Context passed to newly created factory.properties
- Map of name/property used to initialize factory configuration object.
DefinitionsFactoryException
- If an error occur while initializing factorypublic static DefinitionsFactory createDefinitionsFactory(ServletContext servletContext, ServletConfig servletConfig) throws DefinitionsFactoryException
Convenience method. Calls createDefinitionsFactory(ServletContext servletContext, DefinitionsFactoryConfig factoryConfig)
servletContext
- Servlet Context passed to newly created factory.servletConfig
- Servlet config containing parameters to be passed to factory configuration object.
DefinitionsFactoryException
- If an error occur while initializing factorypublic static DefinitionsFactory createDefinitionsFactory(ServletContext servletContext, ServletConfig servletConfig, boolean checkIfExist) throws DefinitionsFactoryException
If checkIfExist is true, start by checking if factory already exist. If yes, return it. If no, create a new one.
If checkIfExist is false, factory is always created.
Convenience method. Calls createDefinitionsFactory(ServletContext servletContext, DefinitionsFactoryConfig factoryConfig)
servletContext
- Servlet Context passed to newly created factory.servletConfig
- Servlet config containing parameters to be passed to factory configuration object.checkIfExist
- Check if factory already exist. If true and factory exist, return it.
If true and factory doesn't exist, create it. If false, create it in all cases.
DefinitionsFactoryException
- If an error occur while initializing factorypublic static DefinitionsFactory getDefinitionsFactory(ServletContext servletContext)
TilesUtil.getDefinitionsFactory(ServletRequest, ServletContext)
public static ComponentDefinition getActionDefinition(ServletRequest request)
public static void setActionDefinition(ServletRequest request, ComponentDefinition definition)
public static void removeActionDefinition(ServletRequest request, ComponentDefinition definition)
public static void populateDefinitionsFactoryConfig(DefinitionsFactoryConfig factoryConfig, ServletConfig servletConfig) throws IllegalAccessException, InvocationTargetException
factoryConfig
- Definition Factory Config to populate.servletConfig
- Current servlet config containing web.xml properties.
IllegalAccessException
- if the caller does not have
access to the property accessor method
InvocationTargetException
- if the property accessor method
throws an exceptionBeanUtils
protected static DefinitionsFactoryConfig readFactoryConfig(ServletConfig servletConfig) throws DefinitionsFactoryException
servletConfig
- ServletConfig for the module with which
this plug in is associated
DefinitionsFactoryException
- if this PlugIn
cannot
be successfully initialized
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |