| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.wps.portlets.struts.plugins.ViewCommandFactory
public class ViewCommandFactory
The ViewCommandFactory
class is the default factory used in the
Struts Portlet Framework. The ViewComandFactory will process the URI and
determine the correct type of WpsStrutsViewCommand to create. The createCommand
method will determine the type of WpsStrutsViewCommand object to create based on the
extension. For example, a URI path of "/login.jsp" will result in the creation of a
WpsStrutsViewJspCommand. This class can be extended to allow the application to add
new extension types that should result in the creation of a new type of
WpsStrutsViewCommand. The ViewCommandFactories are registered per Struts module. A
Struts plugin can be used to determine which ViewCommandFactory is used for each
Struts module.
Field Summary | |
---|---|
protected static Log | log
The commons-logging instance for this class. |
Constructor Summary | |
---|---|
ViewCommandFactory()
Default constructor for the ViewCommandFactory class. |
Method Summary | |
---|---|
WpsStrutsViewCommand | createCommand(ErrorResponseInfo errorInfo,
HttpServletRequest request,
ViewCommandExecutionContext executionContext)
Creates a command based on the given ErrorResponseInfo. |
WpsStrutsViewCommand | createCommand(java.lang.String uri,
HttpServletRequest request,
ViewCommandExecutionContext executionContext)
Creates a command based on the given URI and request. |
protected java.lang.String | getExtensionLowerCase(java.lang.String uri)
Gets the extension from the given String URI. |
protected java.lang.String | getExtensionUpperCase(java.lang.String uri)
Gets the extension from the given String URI. |
static ViewCommandFactory | getFactory(ModuleContext moduleContext)
Gets the ViewCommandFactory object for this context. |
static ViewCommandFactory | getFactory(ViewCommandExecutionContext viewCommandContext)
Gets the ViewCommandFactory object for the module. |
protected WpsStrutsViewCommand | handleUnrecognizedExtension(java.lang.String uri,
HttpServletRequest request,
ViewCommandExecutionContext executionContext)
Handles an unrecognized extension. |
protected boolean | isDynamicallyIncludedContent(java.lang.String uri)
Determines whether the given path can be included dynamically (like a JSP). |
protected boolean | isDynamicallyIncludedContent(java.lang.String uri,
java.lang.String extLowerCase)
Determines whether the given path can be included dynamically (like a JSP). |
protected boolean | isStaticallyIncludedContent(java.lang.String uri)
Determines whether the given path can be included statically (like HTML). |
protected boolean | isStaticallyIncludedContent(java.lang.String uri,
java.lang.String extLowerCase)
Determines whether the given path can be included statically (like HTML). |
protected boolean | isTilesIncludedContent(java.lang.String uri,
java.lang.String extLowerCase,
HttpServletRequest request)
Determines whether the given path can be included as a Struts Tiles JSP. |
static void | setFactory(ModuleContext moduleContext,
ViewCommandFactory factory)
Sets a new ViewCommandFactory object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static Log log
Constructor Detail |
---|
public ViewCommandFactory()
Method Detail |
---|
public static void setFactory(ModuleContext moduleContext, ViewCommandFactory factory)
public static ViewCommandFactory getFactory(ModuleContext moduleContext)
public static ViewCommandFactory getFactory(ViewCommandExecutionContext viewCommandContext)
public WpsStrutsViewCommand createCommand(java.lang.String uri, HttpServletRequest request, ViewCommandExecutionContext executionContext)
null
public WpsStrutsViewCommand createCommand(ErrorResponseInfo errorInfo, HttpServletRequest request, ViewCommandExecutionContext executionContext)
protected boolean isStaticallyIncludedContent(java.lang.String uri)
protected boolean isStaticallyIncludedContent(java.lang.String uri, java.lang.String extLowerCase)
protected boolean isDynamicallyIncludedContent(java.lang.String uri)
protected boolean isDynamicallyIncludedContent(java.lang.String uri, java.lang.String extLowerCase)
protected boolean isTilesIncludedContent(java.lang.String uri, java.lang.String extLowerCase, HttpServletRequest request)
protected WpsStrutsViewCommand handleUnrecognizedExtension(java.lang.String uri, HttpServletRequest request, ViewCommandExecutionContext executionContext)
protected java.lang.String getExtensionLowerCase(java.lang.String uri)
null
if no extension found.
null
otherwiseprotected java.lang.String getExtensionUpperCase(java.lang.String uri)
null
if no extension found.
null
otherwise
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |