|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.sakaiproject.vm.ComponentServlet
org.sakaiproject.vm.VmServlet
org.sakaiproject.cheftool.VmServlet
org.sakaiproject.cheftool.ToolServlet
org.sakaiproject.cheftool.VelocityPortletPaneledAction
public abstract class VelocityPortletPaneledAction
VelocityPortletPaneledAction ...
| Nested Class Summary | |
|---|---|
protected class |
VelocityPortletPaneledAction.MyLogger
|
| Field Summary | |
|---|---|
protected static String |
ATTR_CONFIG
A PortletConfig bound into the request attributes. |
protected static String |
ATTR_CONTEXT
A Context bound into the request attributes. |
static String |
ATTR_FRAME_FOCUS
Tool session attribute name used to schedule a focus change. |
static String |
ATTR_FRAME_REFRESH
Tool session attribute name used to schedule a peer frame refresh. |
protected static String |
ATTR_PORTLET
A VelocityPortlet bound into the request attributes. |
protected static String |
ATTR_RUNDATA
A JetspeedRunData bound into the request attributes. |
static String |
ATTR_TOP_REFRESH
Tool session attribute name used to schedule a whole page refresh. |
protected static String |
BUTTON
|
protected static String |
CONTEXT_SITE_COLLECTION_ID
The name of the context variable containing the identifier for the site's root content collection |
protected static String |
CONTEXT_SITE_COLLECTION_URL
The name of the context variable containing the access URL for the site's root content collection |
protected static String |
HELPER_LINK_MODE
Constants to handle helper situations |
protected static String |
HELPER_MODE_DONE
|
protected static String |
LAYOUT_MAIN
The panel name of the main panel - append the tool's id. |
protected VelocityPortletPaneledAction.MyLogger |
Log
|
static String |
MODE_OPTIONS
Standard modes. |
protected static String |
SAKAI_CSRF_TOKEN
The name of the param used for CSRF protection |
protected static String |
STATE_ACTION
|
static String |
STATE_FLOAT
|
static String |
STATE_HELPER
The currently active helper mode static class. |
static String |
STATE_MESSAGE
|
protected static String |
STATE_MODE
|
protected static String |
STATE_NEW_PANEL
|
protected static String |
STATE_OBSERVER
|
static String |
STATE_OBSERVER2
|
static String |
STATE_PRESENCE_OBSERVER
|
static String |
STATE_TOOL
|
| Fields inherited from class org.sakaiproject.cheftool.ToolServlet |
|---|
ALERT_ATTR, ALERT_STATE_INITED, HELPER_ID, MAIN_PANEL, MENU_ATTR, PARAM_ACTION, PARAM_ACTION_COMBO, TITLE_PANEL, TOOL_MODE_ATTR, TOOL_MODE_DEFAULT |
| Fields inherited from class org.sakaiproject.cheftool.VmServlet |
|---|
m_validator |
| Fields inherited from class org.sakaiproject.vm.ComponentServlet |
|---|
ATTR_PARAMS |
| Constructor Summary | |
|---|---|
VelocityPortletPaneledAction()
|
|
| Method Summary | |
|---|---|
protected void |
actionDispatch(String methodBase,
String methodExt,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Dispatch to a "processAction" method based on reflection. |
static void |
addAlert(org.sakaiproject.event.api.SessionState state,
String message)
Add another string to the alert message. |
protected void |
addOptionsMenu(Menu bar,
JetspeedRunData data)
Add the options to the menu bar, if allowed. |
protected boolean |
allowedToOptions()
Check if the current user is allowed to do options for the current context (site based) |
protected void |
cancelOptions()
Cancel the options process. |
protected String |
clientWindowId(org.sakaiproject.event.api.SessionState state,
String toolId)
Compute the deliver address for the current request. |
static void |
disableObservers(org.sakaiproject.event.api.SessionState state)
Disable any observers registered in state in STATE_OBSERVER or STATE_OBSERVER2 |
protected void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Respond to a request by dispatching to a portlet like "do" method based on the portlet mode and tool mode |
void |
doOptions(RunData runData,
Context context)
Handle a request to set options. |
void |
doReset(RunData runData,
Context context)
Handle the "reset tool" option from the Title bar. |
static void |
enableObservers(org.sakaiproject.event.api.SessionState state)
Enable any observers registered in state in STATE_OBSERVER or STATE_OBSERVER2 |
protected Map<String,String> |
getContext(RunData data)
This is used to get "template" from the map, the default template registered for the tool in chef_tools.xreg. |
String[] |
getDateFormatString()
|
String[] |
getTimeFormatString()
Return a String array containing the "h", "m", "a", or "H" characters (corresponding to hour, minute, am/pm, or 24-hour) in the locale specific order |
protected void |
helperActionDispatch(String methodBase,
String methodExt,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
String className)
Dispatch to a "processAction" method based on reflection in a helper class. |
protected void |
initState(org.sakaiproject.event.api.SessionState state,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Initialize for the first time the session state for this session. |
protected void |
initState(org.sakaiproject.event.api.SessionState state,
VelocityPortlet portlet,
JetspeedRunData rundata)
|
static void |
justDelivered(org.sakaiproject.event.api.SessionState state)
Tell the main observer we have just delivered. |
static String |
mainPanelUpdateId(String toolId)
Compute the courier update html element id for the main panel - add "." and other names for inner panels. |
protected String |
panelMethodName(String panel)
Allow extension classes to control which build method gets called for this pannel |
void |
processAction(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Process a Portlet action. |
protected void |
resetTool(org.sakaiproject.event.api.SessionState state)
Reset the tool (state) to "home" conditions. |
protected void |
saveOptions()
Complete the options process with a save. |
protected void |
scheduleFocusRefresh(String[] path)
Schedule a focus change. |
protected void |
schedulePeerFrameRefresh(String id)
Schedule a refresh for a peer frame. |
protected void |
scheduleTopRefresh()
Schedule a refresh for whole page |
protected void |
setVmCourier(javax.servlet.http.HttpServletRequest request,
int refresh)
Setup the vm context for a courier |
protected void |
setVmStdRef(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Add some standard references to the vm context. |
static void |
switchPanel(org.sakaiproject.event.api.SessionState state,
String newPanel)
Switch to a new panel |
static String |
titlePanelUpdateId(String toolId)
Compute the courier update html element id for the title panel. |
protected void |
toolModeDispatch(String methodBase,
String methodExt,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Dispatch to a "do" method based on reflection. |
protected void |
updateState(org.sakaiproject.event.api.SessionState state,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Update for this request processing the session state. |
| Methods inherited from class org.sakaiproject.cheftool.ToolServlet |
|---|
doPost, getAlert, getAlert, getMenu, getPid, getState, getToolMode, prepState, sendToHelper, setToolMode, startHelper, startHelper |
| Methods inherited from class org.sakaiproject.vm.VmServlet |
|---|
getActionURL, getVmReference, includeVm, setVmReference |
| Methods inherited from class org.sakaiproject.vm.ComponentServlet |
|---|
sendParentRedirect, service, setNoCacheHeaders |
| Methods inherited from class javax.servlet.http.HttpServlet |
|---|
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service |
| Methods inherited from class javax.servlet.GenericServlet |
|---|
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String BUTTON
public static final String STATE_HELPER
protected static final String STATE_MODE
protected static final String STATE_OBSERVER
protected static final String STATE_ACTION
protected static final String STATE_NEW_PANEL
protected static final String CONTEXT_SITE_COLLECTION_ID
protected static final String CONTEXT_SITE_COLLECTION_URL
protected static final String LAYOUT_MAIN
protected static final String SAKAI_CSRF_TOKEN
protected static final String HELPER_LINK_MODE
protected static final String HELPER_MODE_DONE
protected VelocityPortletPaneledAction.MyLogger Log
public static final String STATE_OBSERVER2
public static final String STATE_PRESENCE_OBSERVER
public static final String STATE_FLOAT
public static final String STATE_TOOL
public static final String STATE_MESSAGE
public static final String MODE_OPTIONS
protected static final String ATTR_CONTEXT
protected static final String ATTR_CONFIG
protected static final String ATTR_PORTLET
protected static final String ATTR_RUNDATA
public static final String ATTR_FRAME_REFRESH
public static final String ATTR_TOP_REFRESH
public static final String ATTR_FRAME_FOCUS
| Constructor Detail |
|---|
public VelocityPortletPaneledAction()
| Method Detail |
|---|
protected void initState(org.sakaiproject.event.api.SessionState state,
VelocityPortlet portlet,
JetspeedRunData rundata)
protected String clientWindowId(org.sakaiproject.event.api.SessionState state,
String toolId)
state - The tool state.toolId - The tool instance id, which might be used as part of the client window id if floating.
public static String mainPanelUpdateId(String toolId)
toolId - The tool (portlet) id.
public static String titlePanelUpdateId(String toolId)
toolId - The tool (portlet) id.
public static void addAlert(org.sakaiproject.event.api.SessionState state,
String message)
state - The session state.message - The string to add.
public static void switchPanel(org.sakaiproject.event.api.SessionState state,
String newPanel)
state - The session state.newPanel - The new panel name
protected void initState(org.sakaiproject.event.api.SessionState state,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
initState in class ToolServletstate - The session state.req - The current portlet request.res - The current portlet response.
protected void updateState(org.sakaiproject.event.api.SessionState state,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
updateState in class ToolServletstate - The session state.req - The current portlet request.res - The current portlet response.
protected void toolModeDispatch(String methodBase,
String methodExt,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws org.sakaiproject.tool.api.ToolException
toolModeDispatch in class ToolServletmethodBase - The base name of the method to call.methodExt - The end name of the method to call.req - The HttpServletRequest.res - The HttpServletResponse
org.sakaiproject.tool.api.ToolExceptionprotected String panelMethodName(String panel)
panel -
public void processAction(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
processAction in class ToolServlet
protected void actionDispatch(String methodBase,
String methodExt,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
actionDispatch in class ToolServletmethodBase - The base name of the method to call.methodExt - The end name of the method to call.req - The HttpServletRequest.res - The HttpServletResponse
PortletExcption, - IOException, just like the "do" methods.
protected void helperActionDispatch(String methodBase,
String methodExt,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
String className)
methodBase - The base name of the method to call.methodExt - The end name of the method to call.req - The HttpServletRequest.res - The HttpServletResponse
PortletExcption, - IOException, just like the "do" methods.protected Map<String,String> getContext(RunData data)
public void doOptions(RunData runData,
Context context)
protected void saveOptions()
protected void cancelOptions()
protected void addOptionsMenu(Menu bar,
JetspeedRunData data)
bar - The menu bar to add to,ref - The resource reference to base the security decision upon.protected boolean allowedToOptions()
public static void disableObservers(org.sakaiproject.event.api.SessionState state)
state - The session state.public static void enableObservers(org.sakaiproject.event.api.SessionState state)
state - The session state.public static void justDelivered(org.sakaiproject.event.api.SessionState state)
state - The session state.
public void doReset(RunData runData,
Context context)
protected void resetTool(org.sakaiproject.event.api.SessionState state)
state - The tool's session state.
protected void setVmStdRef(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
setVmStdRef in class ToolServletrequest - The render request.response - The render response.
protected void setVmCourier(javax.servlet.http.HttpServletRequest request,
int refresh)
request -
protected void doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws javax.servlet.ServletException
doGet in class ToolServletjavax.servlet.ServletExceptionprotected void scheduleTopRefresh()
protected void schedulePeerFrameRefresh(String id)
id - The peer frame's id.protected void scheduleFocusRefresh(String[] path)
path - The desired focus path elementspublic String[] getDateFormatString()
public String[] getTimeFormatString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||