| java.lang.Object org.apache.struts.tiles.TilesUtil
All known Subclasses: org.apache.struts.tiles.DefinitionsUtil,
TilesUtil | public class TilesUtil (Code) | | Class containing utility methods for Tiles.
Methods of this class are static and thereby accessible from anywhere.
The underlying implementation can be changed with
TilesUtil.setTilesUtil(TilesUtilImpl) .
Real implementation classes should derive from the
TilesUtilImpl class.
Some methods are specified to throw the UnsupportedOperationException
if the underlying implementation doesn't support the operation.
|
Method Summary | |
public static DefinitionsFactory | createDefinitionsFactory(ServletContext servletContext, DefinitionsFactoryConfig factoryConfig) Create Definition factory from specified configuration object.
Create a ConfigurableDefinitionsFactory and initialize it with the configuration
object. | public static void | doForward(String uri, HttpServletRequest request, HttpServletResponse response, ServletContext servletContext) Do a forward using request dispatcher. | public static void | doInclude(String uri, HttpServletRequest request, HttpServletResponse response, ServletContext servletContext) Do an include using request dispatcher. | public static void | doInclude(String uri, PageContext pageContext) Do an include using PageContext.include(). | public static void | doInclude(String uri, PageContext pageContext, boolean flush) Do an include using PageContext.include(). | public static ComponentDefinition | getDefinition(String definitionName, ServletRequest request, ServletContext servletContext) Get a definition by its name. | public static DefinitionsFactory | getDefinitionsFactory(ServletRequest request, ServletContext servletContext) Get definition factory from appropriate servlet context. | public static TilesUtilImpl | getTilesUtil() Get the real implementation. | static boolean | isTilesUtilImplSet() Getter to know if the underlying implementation is already set to another
value than the default value. | public static void | setTilesUtil(TilesUtilImpl tilesUtil) Set the real implementation. | protected static void | testReset() Reset internal state. |
log | protected static Log log(Code) | | Commons Logging instance.
|
tilesUtilImpl | protected static TilesUtilImpl tilesUtilImpl(Code) | | The implementation of tilesUtilImpl
|
createDefinitionsFactory | public static DefinitionsFactory createDefinitionsFactory(ServletContext servletContext, DefinitionsFactoryConfig factoryConfig) throws DefinitionsFactoryException(Code) | | Create Definition factory from specified configuration object.
Create a ConfigurableDefinitionsFactory and initialize it with the configuration
object. This later can contain the factory classname to use.
Factory is made accessible from tags.
Fallback of several factory creation methods.
Parameters: servletContext - Servlet Context passed to newly created factory. Parameters: factoryConfig - Configuration object passed to factory. newly created factory of type ConfigurableDefinitionsFactory. throws: DefinitionsFactoryException - If an error occur while initializing factory |
doForward | public static void doForward(String uri, HttpServletRequest request, HttpServletResponse response, ServletContext servletContext) throws IOException, ServletException(Code) | | Do a forward using request dispatcher.
This method is used by the Tiles package anytime a forward is required.
Parameters: uri - Uri or Definition name to forward. Parameters: request - Current page request. Parameters: response - Current page response. Parameters: servletContext - Current servlet context. |
doInclude | public static void doInclude(String uri, HttpServletRequest request, HttpServletResponse response, ServletContext servletContext) throws IOException, ServletException(Code) | | Do an include using request dispatcher.
This method is used by the Tiles package when an include is required.
The Tiles package can use indifferently any form of this method.
Parameters: uri - Uri or Definition name to forward. Parameters: request - Current page request. Parameters: response - Current page response. Parameters: servletContext - Current servlet context. |
doInclude | public static void doInclude(String uri, PageContext pageContext) throws IOException, ServletException(Code) | | Do an include using PageContext.include().
This method is used by the Tiles package when an include is required.
The Tiles package can use indifferently any form of this method.
Parameters: uri - Uri or Definition name to forward. Parameters: pageContext - Current page context. |
doInclude | public static void doInclude(String uri, PageContext pageContext, boolean flush) throws IOException, ServletException(Code) | | Do an include using PageContext.include().
This method is used by the Tiles package when an include is required.
The Tiles package can use indifferently any form of this method.
Parameters: uri - Uri or Definition name to forward. Parameters: flush - If the writer should be flushed before the include Parameters: pageContext - Current page context. |
getTilesUtil | public static TilesUtilImpl getTilesUtil()(Code) | | Get the real implementation.
The underlying implementation object. |
isTilesUtilImplSet | static boolean isTilesUtilImplSet()(Code) | | Getter to know if the underlying implementation is already set to another
value than the default value.
true if TilesUtil.setTilesUtil has already been called. |
setTilesUtil | public static void setTilesUtil(TilesUtilImpl tilesUtil)(Code) | | Set the real implementation.
This method should be called only once.
Successive calls have no effect.
Parameters: tilesUtil - The implementaion. |
testReset | protected static void testReset()(Code) | | Reset internal state.
This method is used by test suites to reset the class to its original state.
|
|
|