info.magnolia.cms.servlets
Class CommandBasedMVCServletHandler
java.lang.Object
info.magnolia.cms.servlets.MVCServletHandlerImpl
info.magnolia.cms.servlets.CommandBasedMVCServletHandler
- All Implemented Interfaces:
- MVCServletHandler
public abstract class CommandBasedMVCServletHandler
- extends MVCServletHandlerImpl
This implementation tries first to get a command form it's command catalogue. If none is found it will call the
execute method of the default MVCServletHandlerImpl, which tries to execute through reflection a related method.
- Version:
- $Revision$ ($Author$)
Methods inherited from class info.magnolia.cms.servlets.MVCServletHandlerImpl |
getCommand, getException, getExceptionStackTrace, getName, getRequest, getResponse, init, populateFromRequest, setCommand, setRequest, setResponse |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CommandBasedMVCServletHandler
protected CommandBasedMVCServletHandler(String name,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
- Parameters:
name
- request
- response
-
execute
public String execute(String commandName)
- Try to get the command from the catalog.
- Specified by:
execute
in interface MVCServletHandler
- Overrides:
execute
in class MVCServletHandlerImpl
- Returns:
- the name of the view to show (used in renderHtml)
getViewNameAfterExecution
protected String getViewNameAfterExecution(String commandName,
Context ctx)
- Default implementation returns the commandName itself.
- Returns:
- the view name returned by this execution
findCommand
protected Command findCommand(String commandName)
- Used to get the command object.
- Returns:
- the callable command object
getCommandContext
protected Context getCommandContext(String commandName)
- The default implementation returns the current context.
- Parameters:
commandName
- the name of the command to be called
- Returns:
- the context to pass to the command
getCatalogueName
public String getCatalogueName()
- Returns:
- Returns the catalogueName.
setCatalogueName
public void setCatalogueName(String catalogueName)
- Parameters:
catalogueName
- The catalogueName to set.
Copyright © 2003-2013 Magnolia International Ltd.. All Rights Reserved.