public abstract class VelocityPortletPaneledAction extends ToolServlet
VelocityPortletPaneledAction ...
| Modifier and Type | Field and Description |
|---|---|
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.
|
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 |
static String |
STATE_NOTIF |
protected static String |
STATE_OBSERVER |
static String |
STATE_OBSERVER2 |
static String |
STATE_PRESENCE_OBSERVER |
static String |
STATE_TOOL |
ALERT_ATTR, ALERT_STATE_INITED, HELPER_ID, MAIN_PANEL, MENU_ATTR, PARAM_ACTION, PARAM_ACTION_COMBO, TITLE_PANEL, TOOL_MODE_ATTR, TOOL_MODE_DEFAULTm_validatorATTR_PARAMS| Constructor and Description |
|---|
VelocityPortletPaneledAction() |
| Modifier and Type | Method and Description |
|---|---|
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(SessionState state,
String message)
Add another string to the alert message.
|
static void |
addAlert(SessionState state,
String message,
boolean removeDuplicates)
Add another string to the alert message.
|
static void |
addFlashNotif(SessionState state,
String message)
Add another string to the flash notification 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.
|
boolean |
checkCSRFToken(javax.servlet.http.HttpServletRequest request,
RunData rundata,
String action) |
protected void |
checkRunData(javax.servlet.http.HttpServletRequest req) |
protected String |
clientWindowId(SessionState state,
String toolId)
Compute the deliver address for the current request.
|
static void |
disableObservers(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(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(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(SessionState state,
VelocityPortlet portlet,
JetspeedRunData rundata) |
static void |
justDelivered(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(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(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(SessionState state,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Update for this request processing the session state.
|
doPost, getAlert, getAlert, getMenu, getPid, getState, getToolMode, prepState, sendToHelper, setToolMode, startHelper, startHelpergetActionURL, getVmReference, includeVm, setVmReferencesendParentRedirect, service, setNoCacheHeadersdoDelete, doHead, doOptions, doPut, doTrace, getLastModified, serviceprotected 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
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 STATE_NOTIF
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
protected void initState(SessionState state, VelocityPortlet portlet, JetspeedRunData rundata)
protected String clientWindowId(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(SessionState state, String message)
state - The session state.message - The string to add.public static void addAlert(SessionState state, String message, boolean removeDuplicates)
state - The session state.message - The string to add.removeDuplicates - Remove duplicates from the alertpublic static void addFlashNotif(SessionState state, String message)
state - The session state.message - The string to add.public static void switchPanel(SessionState state, String newPanel)
state - The session state.newPanel - The new panel nameprotected void initState(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(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 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 HttpServletResponseToolExceptionprotected String panelMethodName(String panel)
panel - public void processAction(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
processAction in class ToolServletpublic boolean checkCSRFToken(javax.servlet.http.HttpServletRequest request,
RunData rundata,
String action)
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 HttpServletResponsePortletExcption, - 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 HttpServletResponsePortletExcption, - IOException, just like the "do" methods.protected Map<String,String> getContext(RunData data)
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(SessionState state)
state - The session state.public static void enableObservers(SessionState state)
state - The session state.public static void justDelivered(SessionState state)
state - The session state.public void doReset(RunData runData, Context context)
protected void resetTool(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 checkRunData(javax.servlet.http.HttpServletRequest req)
protected 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()
Copyright © 2003–2022 Sakai Project. All rights reserved.