org.apache.jetspeed.portlet
Class IFramePortlet

java.lang.Object
  extended by javax.portlet.GenericPortlet
      extended by org.apache.jetspeed.portlet.IFramePortlet
All Implemented Interfaces:
javax.portlet.Portlet, javax.portlet.PortletConfig

public class IFramePortlet
extends javax.portlet.GenericPortlet

IFramePortlet TODO: - add capabilities test for IFRAME - add locale specific "no iframes" message

Version:
$Id: IFramePortlet.java 578925 2007-09-24 19:22:58Z smilek $
Author:
Randy Watler

Field Summary
static String ALIGN_ATTR_DEFAULT
          Configuration default constants.
static String ALIGN_ATTR_PARAM
           
static String CLASS_ATTR_PARAM
           
static String CUSTOM_SOURCE_PARAM
           
private  String defaultAlignAttr
          Default IFRAME attribute members.
private  String defaultClassAttr
           
private  String defaultCustomSource
          Default IFRAME source attribute members.
private  String defaultEditSource
           
private  String defaultFrameBorderAttr
           
private  String defaultHeightAttr
           
private  String defaultHelpSource
           
private  String defaultIdAttr
           
private  String defaultMarginHeightAttr
           
private  String defaultMarginWidthAttr
           
private  String defaultMaximizedCustomSource
           
private  String defaultMaximizedEditSource
           
private  String defaultMaximizedHeightAttr
           
private  String defaultMaximizedHelpSource
           
private  String defaultMaximizedScrollingAttr
           
private  String defaultMaximizedStyleAttr
           
private  String defaultMaximizedViewSource
           
private  String defaultMaximizedWidthAttr
           
private  String defaultNameAttr
           
private  String defaultScrollingAttr
           
private  String defaultStyleAttr
           
private  String defaultViewSource
           
private  String defaultWidthAttr
           
static String EDIT_SOURCE_PARAM
           
static String ENABLE_PREFERENCES_PARAM
           
static String ENABLE_SOURCE_PREFERENCES_PARAM
          Configuration constants.
private  boolean enablePreferences
          Enable parameter preferences overrides member.
static String FRAME_BORDER_ATTR_DEFAULT
           
static String FRAME_BORDER_ATTR_PARAM
           
static String HEIGHT_ATTR_DEFAULT
           
static String HEIGHT_ATTR_PARAM
           
static String HELP_SOURCE_PARAM
           
static String ID_ATTR_PARAM
           
static String MARGIN_HEIGHT_ATTR_DEFAULT
           
static String MARGIN_HEIGHT_ATTR_PARAM
           
static String MARGIN_WIDTH_ATTR_DEFAULT
           
static String MARGIN_WIDTH_ATTR_PARAM
           
static String MAXIMIZED_CUSTOM_SOURCE_PARAM
           
static String MAXIMIZED_EDIT_SOURCE_PARAM
           
static String MAXIMIZED_HEIGHT_ATTR_DEFAULT
           
static String MAXIMIZED_HEIGHT_ATTR_PARAM
           
static String MAXIMIZED_HELP_SOURCE_PARAM
           
static String MAXIMIZED_SCROLLING_ATTR_DEFAULT
           
static String MAXIMIZED_SCROLLING_ATTR_PARAM
           
static String MAXIMIZED_STYLE_ATTR_PARAM
           
static String MAXIMIZED_VIEW_SOURCE_PARAM
           
static String MAXIMIZED_WIDTH_ATTR_DEFAULT
           
static String MAXIMIZED_WIDTH_ATTR_PARAM
           
static String NAME_ATTR_PARAM
           
static String SCROLLING_ATTR_DEFAULT
           
static String SCROLLING_ATTR_PARAM
           
static String STYLE_ATTR_PARAM
           
static String VIEW_SOURCE_PARAM
           
static String WIDTH_ATTR_DEFAULT
           
static String WIDTH_ATTR_PARAM
           
 
Constructor Summary
IFramePortlet()
          Portlet constructor.
 
Method Summary
 void doCustom(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response)
          Generate IFRAME with custom source.
 void doEdit(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response)
          Generate IFRAME with edit source.
 void doHelp(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response)
          Generate IFRAME with help source.
protected  void doIFrame(javax.portlet.RenderRequest request, String sourceAttr, javax.portlet.RenderResponse response)
          Render IFRAME content
 void doView(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response)
          Generate IFRAME with view source.
private  String getAttributeParam(javax.portlet.PortletConfig config, String name, String defaultValue)
          Get IFRAME attribute parameter.
private  String getPreferenceOrDefault(javax.portlet.RenderRequest request, String name, String defaultValue)
          Get IFRAME preference value if enabled.
 void init(javax.portlet.PortletConfig config)
          Initialize portlet configuration.
 
Methods inherited from class javax.portlet.GenericPortlet
destroy, doDispatch, getInitParameter, getInitParameterNames, getPortletConfig, getPortletContext, getPortletName, getResourceBundle, getTitle, init, processAction, render
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENABLE_SOURCE_PREFERENCES_PARAM

public static final String ENABLE_SOURCE_PREFERENCES_PARAM
Configuration constants.

See Also:
Constant Field Values

ENABLE_PREFERENCES_PARAM

public static final String ENABLE_PREFERENCES_PARAM
See Also:
Constant Field Values

CUSTOM_SOURCE_PARAM

public static final String CUSTOM_SOURCE_PARAM
See Also:
Constant Field Values

MAXIMIZED_CUSTOM_SOURCE_PARAM

public static final String MAXIMIZED_CUSTOM_SOURCE_PARAM
See Also:
Constant Field Values

EDIT_SOURCE_PARAM

public static final String EDIT_SOURCE_PARAM
See Also:
Constant Field Values

MAXIMIZED_EDIT_SOURCE_PARAM

public static final String MAXIMIZED_EDIT_SOURCE_PARAM
See Also:
Constant Field Values

HELP_SOURCE_PARAM

public static final String HELP_SOURCE_PARAM
See Also:
Constant Field Values

MAXIMIZED_HELP_SOURCE_PARAM

public static final String MAXIMIZED_HELP_SOURCE_PARAM
See Also:
Constant Field Values

VIEW_SOURCE_PARAM

public static final String VIEW_SOURCE_PARAM
See Also:
Constant Field Values

MAXIMIZED_VIEW_SOURCE_PARAM

public static final String MAXIMIZED_VIEW_SOURCE_PARAM
See Also:
Constant Field Values

ALIGN_ATTR_PARAM

public static final String ALIGN_ATTR_PARAM
See Also:
Constant Field Values

CLASS_ATTR_PARAM

public static final String CLASS_ATTR_PARAM
See Also:
Constant Field Values

FRAME_BORDER_ATTR_PARAM

public static final String FRAME_BORDER_ATTR_PARAM
See Also:
Constant Field Values

HEIGHT_ATTR_PARAM

public static final String HEIGHT_ATTR_PARAM
See Also:
Constant Field Values

ID_ATTR_PARAM

public static final String ID_ATTR_PARAM
See Also:
Constant Field Values

MARGIN_HEIGHT_ATTR_PARAM

public static final String MARGIN_HEIGHT_ATTR_PARAM
See Also:
Constant Field Values

MARGIN_WIDTH_ATTR_PARAM

public static final String MARGIN_WIDTH_ATTR_PARAM
See Also:
Constant Field Values

MAXIMIZED_HEIGHT_ATTR_PARAM

public static final String MAXIMIZED_HEIGHT_ATTR_PARAM
See Also:
Constant Field Values

MAXIMIZED_SCROLLING_ATTR_PARAM

public static final String MAXIMIZED_SCROLLING_ATTR_PARAM
See Also:
Constant Field Values

MAXIMIZED_STYLE_ATTR_PARAM

public static final String MAXIMIZED_STYLE_ATTR_PARAM
See Also:
Constant Field Values

MAXIMIZED_WIDTH_ATTR_PARAM

public static final String MAXIMIZED_WIDTH_ATTR_PARAM
See Also:
Constant Field Values

NAME_ATTR_PARAM

public static final String NAME_ATTR_PARAM
See Also:
Constant Field Values

SCROLLING_ATTR_PARAM

public static final String SCROLLING_ATTR_PARAM
See Also:
Constant Field Values

STYLE_ATTR_PARAM

public static final String STYLE_ATTR_PARAM
See Also:
Constant Field Values

WIDTH_ATTR_PARAM

public static final String WIDTH_ATTR_PARAM
See Also:
Constant Field Values

ALIGN_ATTR_DEFAULT

public static final String ALIGN_ATTR_DEFAULT
Configuration default constants.

See Also:
Constant Field Values

FRAME_BORDER_ATTR_DEFAULT

public static final String FRAME_BORDER_ATTR_DEFAULT
See Also:
Constant Field Values

HEIGHT_ATTR_DEFAULT

public static final String HEIGHT_ATTR_DEFAULT
See Also:
Constant Field Values

MARGIN_HEIGHT_ATTR_DEFAULT

public static final String MARGIN_HEIGHT_ATTR_DEFAULT
See Also:
Constant Field Values

MARGIN_WIDTH_ATTR_DEFAULT

public static final String MARGIN_WIDTH_ATTR_DEFAULT
See Also:
Constant Field Values

MAXIMIZED_HEIGHT_ATTR_DEFAULT

public static final String MAXIMIZED_HEIGHT_ATTR_DEFAULT
See Also:
Constant Field Values

MAXIMIZED_SCROLLING_ATTR_DEFAULT

public static final String MAXIMIZED_SCROLLING_ATTR_DEFAULT
See Also:
Constant Field Values

MAXIMIZED_WIDTH_ATTR_DEFAULT

public static final String MAXIMIZED_WIDTH_ATTR_DEFAULT
See Also:
Constant Field Values

SCROLLING_ATTR_DEFAULT

public static final String SCROLLING_ATTR_DEFAULT
See Also:
Constant Field Values

WIDTH_ATTR_DEFAULT

public static final String WIDTH_ATTR_DEFAULT
See Also:
Constant Field Values

enablePreferences

private boolean enablePreferences
Enable parameter preferences overrides member.


defaultCustomSource

private String defaultCustomSource
Default IFRAME source attribute members.


defaultMaximizedCustomSource

private String defaultMaximizedCustomSource

defaultEditSource

private String defaultEditSource

defaultMaximizedEditSource

private String defaultMaximizedEditSource

defaultHelpSource

private String defaultHelpSource

defaultMaximizedHelpSource

private String defaultMaximizedHelpSource

defaultViewSource

private String defaultViewSource

defaultMaximizedViewSource

private String defaultMaximizedViewSource

defaultAlignAttr

private String defaultAlignAttr
Default IFRAME attribute members.


defaultClassAttr

private String defaultClassAttr

defaultFrameBorderAttr

private String defaultFrameBorderAttr

defaultHeightAttr

private String defaultHeightAttr

defaultIdAttr

private String defaultIdAttr

defaultMarginHeightAttr

private String defaultMarginHeightAttr

defaultMarginWidthAttr

private String defaultMarginWidthAttr

defaultMaximizedHeightAttr

private String defaultMaximizedHeightAttr

defaultMaximizedScrollingAttr

private String defaultMaximizedScrollingAttr

defaultMaximizedStyleAttr

private String defaultMaximizedStyleAttr

defaultMaximizedWidthAttr

private String defaultMaximizedWidthAttr

defaultNameAttr

private String defaultNameAttr

defaultScrollingAttr

private String defaultScrollingAttr

defaultStyleAttr

private String defaultStyleAttr

defaultWidthAttr

private String defaultWidthAttr
Constructor Detail

IFramePortlet

public IFramePortlet()
Portlet constructor.

Method Detail

init

public void init(javax.portlet.PortletConfig config)
          throws javax.portlet.PortletException
Initialize portlet configuration.

Specified by:
init in interface javax.portlet.Portlet
Overrides:
init in class javax.portlet.GenericPortlet
Throws:
javax.portlet.PortletException

doCustom

public void doCustom(javax.portlet.RenderRequest request,
                     javax.portlet.RenderResponse response)
              throws javax.portlet.PortletException,
                     IOException
Generate IFRAME with custom source.

Throws:
javax.portlet.PortletException
IOException

doEdit

public void doEdit(javax.portlet.RenderRequest request,
                   javax.portlet.RenderResponse response)
            throws javax.portlet.PortletException,
                   IOException
Generate IFRAME with edit source.

Overrides:
doEdit in class javax.portlet.GenericPortlet
Throws:
javax.portlet.PortletException
IOException

doHelp

public void doHelp(javax.portlet.RenderRequest request,
                   javax.portlet.RenderResponse response)
            throws javax.portlet.PortletException,
                   IOException
Generate IFRAME with help source.

Overrides:
doHelp in class javax.portlet.GenericPortlet
Throws:
javax.portlet.PortletException
IOException

doView

public void doView(javax.portlet.RenderRequest request,
                   javax.portlet.RenderResponse response)
            throws javax.portlet.PortletException,
                   IOException
Generate IFRAME with view source.

Overrides:
doView in class javax.portlet.GenericPortlet
Throws:
javax.portlet.PortletException
IOException

doIFrame

protected void doIFrame(javax.portlet.RenderRequest request,
                        String sourceAttr,
                        javax.portlet.RenderResponse response)
                 throws IOException
Render IFRAME content

Throws:
IOException

getAttributeParam

private String getAttributeParam(javax.portlet.PortletConfig config,
                                 String name,
                                 String defaultValue)
Get IFRAME attribute parameter.


getPreferenceOrDefault

private String getPreferenceOrDefault(javax.portlet.RenderRequest request,
                                      String name,
                                      String defaultValue)
Get IFRAME preference value if enabled.



Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.