| org.sakaiproject.vm.VmServlet org.sakaiproject.cheftool.VmServlet org.sakaiproject.cheftool.ToolServlet
All known Subclasses: org.sakaiproject.cheftool.VelocityPortletPaneledAction,
ToolServlet | abstract public class ToolServlet extends VmServlet (Code) | |
ToolServlet is a Servlet that support CHEF tools.
Extending VmServlet provides support for component location and use of the Velocity Template Engine.
|
Field Summary | |
final protected static String | ALERT_ATTR The state attribute name used to store the Alert. | final protected static String | ALERT_STATE_INITED The state attribute name used to store the marker of have been initialized. | final protected static String | HELPER_ID ToolSession attribute name holding the helper id, if we are in helper mode. | final protected String | MAIN_PANEL The special panel name for the main. | final protected static String | MENU_ATTR The state attribute name used to store the Menu. | final protected static String | PARAM_ACTION The request parameter name whose value is the action. | final protected static String | PARAM_ACTION_COMBO The request parameter name root that has the action name following. | final protected String | TITLE_PANEL The special panel name for the title. | final protected String | TOOL_MODE_ATTR The mode attribute name base - postfix with the portlet mode. | final protected String | TOOL_MODE_DEFAULT The mode value when no mode has been set. |
Method Summary | |
protected void | actionDispatch(String methodBase, String methodExt, HttpServletRequest req, HttpServletResponse res) Dispatch to a "processAction" method based on reflection. | protected void | doGet(HttpServletRequest req, HttpServletResponse res) | protected void | doPost(HttpServletRequest req, HttpServletResponse res) | protected Alert | getAlert(HttpServletRequest req) Access the Alert for the current request.
Parameters: req - The current portlet request. | protected Alert | getAlert(SessionState state) Access the Alert in this state - will create one if needed.
Parameters: state - The state in which to find the alert. | protected Menu | getMenu(HttpServletRequest req) Access the Menu for the current request.
Parameters: req - The current portlet request. | protected String | getPid(HttpServletRequest req) Access the "pid" - portlet window id, tool id, from the request
Parameters: req - The current request. | protected SessionState | getState(HttpServletRequest req) Access the SessionState for the current request. | protected String | getToolMode(HttpServletRequest req) Access the tool mode for the current Portlet mode. | protected void | initState(SessionState state, HttpServletRequest req, HttpServletResponse res) Initialize for the first time the session state for this session. | protected void | prepState(HttpServletRequest req, HttpServletResponse res) | protected void | processAction(HttpServletRequest req, HttpServletResponse res) Process a Portlet action. | protected boolean | sendToHelper(HttpServletRequest req, HttpServletResponse res, String target) | protected void | setToolMode(String toolMode, HttpServletRequest req) Set the tool mode. | protected void | setVmStdRef(HttpServletRequest request, HttpServletResponse response) Add some standard references to the vm context. | protected void | startHelper(HttpServletRequest req, String helperId, String panel) Setup for a helper tool - all subsequent requests will be directed there, till the tool is done. | protected void | startHelper(HttpServletRequest req, String helperId) Setup for a helper tool - all subsequent requests will be directed there, till the tool is done. | protected void | toolModeDispatch(String methodBase, String methodExt, HttpServletRequest req, HttpServletResponse res) Dispatch to a "do" method based on reflection. | protected void | updateState(SessionState state, HttpServletRequest req, HttpServletResponse res) Update for this request processing the session state. |
ALERT_ATTR | final protected static String ALERT_ATTR(Code) | | The state attribute name used to store the Alert.
|
ALERT_STATE_INITED | final protected static String ALERT_STATE_INITED(Code) | | The state attribute name used to store the marker of have been initialized.
|
HELPER_ID | final protected static String HELPER_ID(Code) | | ToolSession attribute name holding the helper id, if we are in helper mode. NOTE: promote to Tool -ggolden
|
MAIN_PANEL | final protected String MAIN_PANEL(Code) | | The special panel name for the main.
|
MENU_ATTR | final protected static String MENU_ATTR(Code) | | The state attribute name used to store the Menu.
|
PARAM_ACTION | final protected static String PARAM_ACTION(Code) | | The request parameter name whose value is the action.
|
PARAM_ACTION_COMBO | final protected static String PARAM_ACTION_COMBO(Code) | | The request parameter name root that has the action name following.
|
TITLE_PANEL | final protected String TITLE_PANEL(Code) | | The special panel name for the title.
|
TOOL_MODE_ATTR | final protected String TOOL_MODE_ATTR(Code) | | The mode attribute name base - postfix with the portlet mode.
|
TOOL_MODE_DEFAULT | final protected String TOOL_MODE_DEFAULT(Code) | | The mode value when no mode has been set.
|
actionDispatch | protected void actionDispatch(String methodBase, String methodExt, HttpServletRequest req, HttpServletResponse res)(Code) | | Dispatch to a "processAction" method based on reflection.
Parameters: methodBase - The base name of the method to call. Parameters: methodExt - The end name of the method to call. Parameters: req - The ActionRequest. Parameters: res - The ActionResponse throws: PortletExcption - ,IOException, just like the "do" methods. |
getAlert | protected Alert getAlert(HttpServletRequest req)(Code) | | Access the Alert for the current request.
Parameters: req - The current portlet request. The Alert objet for the current request. |
getAlert | protected Alert getAlert(SessionState state)(Code) | | Access the Alert in this state - will create one if needed.
Parameters: state - The state in which to find the alert. The Alert objet. |
getMenu | protected Menu getMenu(HttpServletRequest req)(Code) | | Access the Menu for the current request.
Parameters: req - The current portlet request. The Menu objet for the current request. |
getPid | protected String getPid(HttpServletRequest req)(Code) | | Access the "pid" - portlet window id, tool id, from the request
Parameters: req - The current request. the "pid" - portlet window id, tool id, from the request |
getState | protected SessionState getState(HttpServletRequest req)(Code) | | Access the SessionState for the current request. Note: this is scoped only for the current request.
Parameters: req - The current portlet request. The SessionState objet for the current request. |
getToolMode | protected String getToolMode(HttpServletRequest req)(Code) | | Access the tool mode for the current Portlet mode.
the tool mode for the current Portlet mode. Parameters: req - The portlet request. |
initState | protected void initState(SessionState state, HttpServletRequest req, HttpServletResponse res)(Code) | | Initialize for the first time the session state for this session. If overridden in a sub-class, make sure to call super.
Parameters: state - The session state. Parameters: req - The current request. Parameters: res - The current response. |
prepState | protected void prepState(HttpServletRequest req, HttpServletResponse res)(Code) | | Prepare state, either for first time or update
Parameters: req - The current portlet request. Parameters: res - The current response. |
setToolMode | protected void setToolMode(String toolMode, HttpServletRequest req)(Code) | | Set the tool mode.
Parameters: toolMode - The new tool mode. Parameters: req - The portlet request. |
setVmStdRef | protected void setVmStdRef(HttpServletRequest request, HttpServletResponse response)(Code) | | Add some standard references to the vm context.
Parameters: request - The render request. Parameters: response - The render response. |
startHelper | protected void startHelper(HttpServletRequest req, String helperId, String panel)(Code) | | Setup for a helper tool - all subsequent requests will be directed there, till the tool is done.
Parameters: helperId - The helper tool id. |
startHelper | protected void startHelper(HttpServletRequest req, String helperId)(Code) | | Setup for a helper tool - all subsequent requests will be directed there, till the tool is done.
Parameters: helperId - The helper tool id. |
toolModeDispatch | protected void toolModeDispatch(String methodBase, String methodExt, HttpServletRequest req, HttpServletResponse res) throws ToolException(Code) | | Dispatch to a "do" method based on reflection.
Parameters: methodBase - The base name of the method to call. Parameters: methodExt - The end name of the method to call. Parameters: req - The HttpServletRequest. Parameters: res - The HttpServletResponse throws: PortletExcption - ,IOException, just like the "do" methods. |
updateState | protected void updateState(SessionState state, HttpServletRequest req, HttpServletResponse res)(Code) | | Update for this request processing the session state. If overridden in a sub-class, make sure to call super.
Parameters: state - The session state. Parameters: req - The current request. Parameters: res - The current response. |
|
|