| Method from org.apache.struts.tiles.TilesUtil Detail: |
public static DefinitionsFactory createDefinitionsFactory(ServletContext servletContext,
DefinitionsFactoryConfig factoryConfig) throws DefinitionsFactoryException {
return tilesUtilImpl.createDefinitionsFactory(servletContext, factoryConfig);
}
|
public static void doForward(String uri,
HttpServletRequest request,
HttpServletResponse response,
ServletContext servletContext) throws IOException, ServletException {
tilesUtilImpl.doForward(uri, request, response, servletContext);
}
Do a forward using request dispatcher.
This method is used by the Tiles package anytime a forward is required. |
public static void doInclude(String uri,
PageContext pageContext) throws IOException, ServletException {
tilesUtilImpl.doInclude(uri, pageContext);
}
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. |
public static void doInclude(String uri,
HttpServletRequest request,
HttpServletResponse response,
ServletContext servletContext) throws IOException, ServletException {
tilesUtilImpl.doInclude(uri, request, response, servletContext);
}
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. |
public static ComponentDefinition getDefinition(String definitionName,
ServletRequest request,
ServletContext servletContext) throws FactoryNotFoundException, DefinitionsFactoryException {
try {
return getDefinitionsFactory(request, servletContext).getDefinition(
definitionName,
(HttpServletRequest) request,
servletContext);
} catch (NullPointerException ex) { // Factory not found in context
throw new FactoryNotFoundException("Can't get definitions factory from context.");
}
}
Get a definition by its name.
First, retrieve definition factory and then get requested definition.
Throw appropriate exception if definition or definition factory is not found. |
public static DefinitionsFactory getDefinitionsFactory(ServletRequest request,
ServletContext servletContext) {
return tilesUtilImpl.getDefinitionsFactory(request, servletContext);
}
Get definition factory from appropriate servlet context. |
public static TilesUtilImpl getTilesUtil() {
return tilesUtilImpl;
}
Get the real implementation. |
static boolean isTilesUtilImplSet() {
return implAlreadySet;
}
Getter to know if the underlying implementation is already set to another
value than the default value. |
public static void setTilesUtil(TilesUtilImpl tilesUtil) {
if (implAlreadySet) {
return;
}
tilesUtilImpl = tilesUtil;
implAlreadySet = true;
}
Set the real implementation.
This method should be called only once.
Successive calls have no effect. |
protected static void testReset() {
implAlreadySet = false;
tilesUtilImpl = new TilesUtilImpl();
}
Reset internal state.
This method is used by test suites to reset the class to its original state. |