org.sakaiproject.tool.web
Class IFrameAction

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended byorg.sakaiproject.vm.ComponentServlet
              extended byorg.sakaiproject.vm.VmServlet
                  extended byorg.sakaiproject.cheftool.VmServlet
                      extended byorg.sakaiproject.cheftool.ToolServlet
                          extended byorg.sakaiproject.cheftool.VelocityPortletPaneledAction
                              extended byorg.sakaiproject.tool.web.IFrameAction
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class IFrameAction
extends VelocityPortletPaneledAction

IFrameAction is the Sakai tool to place any web content in an IFrame on the page.

Three special modes are supported - these pick the URL content from special places:

Author:
University of Michigan, Sakai Software Development Team
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.sakaiproject.cheftool.VelocityPortletPaneledAction
VelocityPortletPaneledAction.MyLogger
 
Field Summary
protected static String CUSTOM_HEIGHT
          The custom height from user input
protected static String HEIGHT
          The height, in state, config and context.
 String[] ourPixels
          Choices of pixels displayed in the customization page
protected static ResourceLoader rb
          Resource bundle using current language locale
protected static String SOURCE
          The source URL, in state, config and context.
protected static String SPECIAL
          The special attribute, in state, config and context.
protected static String SPECIAL_SITE
          Special value for site.
protected static String SPECIAL_WORKSITE
          Special value for worksite.
protected static String SPECIAL_WORKSPACE
          Special value for myworkspace.
protected static String TITLE
          The title, in state and context.
protected static String URL
          The value in state and context for the source URL to actually used, as computed from special and URL.
protected static String VALID_DIGITS
          Valid digits for custom height from user input
 
Fields inherited from class org.sakaiproject.cheftool.VelocityPortletPaneledAction
ATTR_CONFIG, ATTR_CONTEXT, ATTR_FRAME_FOCUS, ATTR_FRAME_REFRESH, ATTR_PORTLET, ATTR_RUNDATA, ATTR_TOP_REFRESH, BUTTON, CONTEXT_SITE_COLLECTION_ID, CONTEXT_SITE_COLLECTION_URL, LAYOUT_MAIN, Log, MODE_OPTIONS, STATE_ACTION, STATE_FLOAT, STATE_HELPER, STATE_MESSAGE, STATE_MODE, STATE_OBSERVER, STATE_OBSERVER2, STATE_PRESENCE_OBSERVER, STATE_TOOL
 
Fields inherited from class org.sakaiproject.cheftool.ToolServlet
ALERT_ATTR, ALERT_STATE_INITED, 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
IFrameAction()
           
 
Method Summary
 String buildMainPanelContext(VelocityPortlet portlet, Context context, RunData rundata, SessionState state)
          Setup the velocity context and choose the template for the response.
 String buildOptionsPanelContext(VelocityPortlet portlet, Context context, RunData data, SessionState state)
          Setup the velocity context and choose the template for options.
protected  String convertReferenceUrl(String url)
          If the url is a valid reference, convert it to a URL, else return it unchanged.
 void doCancel(RunData data, Context context)
          doCancel called for form input tags type="submit" named="eventSubmit_doCancel" cancel the options process
 void doConfigure_update(RunData data, Context context)
          Handle the configure context's update button
protected  void initState(SessionState state, VelocityPortlet portlet, JetspeedRunData rundata)
          Populate the state with configuration settings
protected  String sourceUrl(String special, String source, String context, boolean passPid, String pid)
          Compute the actual URL we will used, based on the configuration special and source URLs
 
Methods inherited from class org.sakaiproject.cheftool.VelocityPortletPaneledAction
actionDispatch, addAlert, addOptionsMenu, cancelOptions, clientWindowId, disableObservers, doGet, doOptions, doReset, enableObservers, getContext, helperActionDispatch, initState, justDelivered, mainPanelUpdateId, processAction, resetTool, saveOptions, scheduleFocusRefresh, schedulePeerFrameRefresh, scheduleTopRefresh, setVmCourier, setVmStdRef, titlePanelUpdateId, toolModeDispatch, updateState
 
Methods inherited from class org.sakaiproject.cheftool.ToolServlet
doPost, getAlert, getAlert, getMenu, getPid, getState, getToolMode, prepState, setToolMode
 
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

rb

protected static ResourceLoader rb
Resource bundle using current language locale


SOURCE

protected static final String SOURCE
The source URL, in state, config and context.

See Also:
Constant Field Values

URL

protected static final String URL
The value in state and context for the source URL to actually used, as computed from special and URL.

See Also:
Constant Field Values

HEIGHT

protected static final String HEIGHT
The height, in state, config and context.

See Also:
Constant Field Values

CUSTOM_HEIGHT

protected static final String CUSTOM_HEIGHT
The custom height from user input

See Also:
Constant Field Values

SPECIAL

protected static final String SPECIAL
The special attribute, in state, config and context.

See Also:
Constant Field Values

SPECIAL_SITE

protected static final String SPECIAL_SITE
Special value for site.

See Also:
Constant Field Values

SPECIAL_WORKSPACE

protected static final String SPECIAL_WORKSPACE
Special value for myworkspace.

See Also:
Constant Field Values

SPECIAL_WORKSITE

protected static final String SPECIAL_WORKSITE
Special value for worksite.

See Also:
Constant Field Values

TITLE

protected static final String TITLE
The title, in state and context.

See Also:
Constant Field Values

VALID_DIGITS

protected static final String VALID_DIGITS
Valid digits for custom height from user input

See Also:
Constant Field Values

ourPixels

public String[] ourPixels
Choices of pixels displayed in the customization page

Constructor Detail

IFrameAction

public IFrameAction()
Method Detail

initState

protected void initState(SessionState state,
                         VelocityPortlet portlet,
                         JetspeedRunData rundata)
Populate the state with configuration settings

Overrides:
initState in class VelocityPortletPaneledAction

sourceUrl

protected String sourceUrl(String special,
                           String source,
                           String context,
                           boolean passPid,
                           String pid)
Compute the actual URL we will used, based on the configuration special and source URLs


convertReferenceUrl

protected String convertReferenceUrl(String url)
If the url is a valid reference, convert it to a URL, else return it unchanged.


buildMainPanelContext

public String buildMainPanelContext(VelocityPortlet portlet,
                                    Context context,
                                    RunData rundata,
                                    SessionState state)
Setup the velocity context and choose the template for the response.


buildOptionsPanelContext

public String buildOptionsPanelContext(VelocityPortlet portlet,
                                       Context context,
                                       RunData data,
                                       SessionState state)
Setup the velocity context and choose the template for options.


doConfigure_update

public void doConfigure_update(RunData data,
                               Context context)
Handle the configure context's update button


doCancel

public void doCancel(RunData data,
                     Context context)
doCancel called for form input tags type="submit" named="eventSubmit_doCancel" cancel the options process