org.apache.jetspeed.portlet
Class IFramePortlet

java.lang.Object
  extended byjavax.portlet.GenericPortlet
      extended byorg.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 239689 2005-08-24 15:17:17Z ate $
Author:
Randy Watler

Field Summary
static String ALIGN_ATTR_DEFAULT
          Configuration default constants.
static String ALIGN_ATTR_PARAM
           
private  String alignAttr
          IFRAME attribute members.
static String CLASS_ATTR_PARAM
           
private  String classAttr
           
static String CUSTOM_SOURCE_PARAM
           
private  String defaultCustomSource
          Default IFRAME source attribute members.
private  String defaultEditSource
           
private  String defaultHelpSource
           
private  String defaultMaximizedCustomSource
           
private  String defaultMaximizedEditSource
           
private  String defaultMaximizedHelpSource
           
private  String defaultMaximizedViewSource
           
private  String defaultViewSource
           
static String EDIT_SOURCE_PARAM
           
static String ENABLE_SOURCE_PREFERENCES_PARAM
          Configuration constants.
private  boolean enableSourcePreferences
          Enable source parameter preferences overrides member.
static String FRAME_BORDER_ATTR_DEFAULT
           
static String FRAME_BORDER_ATTR_PARAM
           
private  String frameBorderAttr
           
static String HEIGHT_ATTR_DEFAULT
           
static String HEIGHT_ATTR_PARAM
           
private  String heightAttr
           
static String HELP_SOURCE_PARAM
           
static String ID_ATTR_PARAM
           
private  String idAttr
           
static String MARGIN_HEIGHT_ATTR_DEFAULT
           
static String MARGIN_HEIGHT_ATTR_PARAM
           
static String MARGIN_WIDTH_ATTR_DEFAULT
           
static String MARGIN_WIDTH_ATTR_PARAM
           
private  String marginHeightAttr
           
private  String marginWidthAttr
           
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
           
private  String maximizedHeightAttr
           
private  String maximizedScrollingAttr
           
private  String maximizedStyleAttr
           
private  String maximizedWidthAttr
           
static String NAME_ATTR_PARAM
           
private  String nameAttr
           
static String SCROLLING_ATTR_DEFAULT
           
static String SCROLLING_ATTR_PARAM
           
private  String scrollingAttr
           
static String STYLE_ATTR_PARAM
           
private  String styleAttr
           
static String VIEW_SOURCE_PARAM
           
static String WIDTH_ATTR_DEFAULT
           
static String WIDTH_ATTR_PARAM
           
private  String widthAttr
           
 
Fields inherited from class javax.portlet.GenericPortlet
 
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 getSourcePreference(javax.portlet.RenderRequest request, String name, String defaultValue)
          Get IFRAME source 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

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

enableSourcePreferences

private boolean enableSourcePreferences
Enable source 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

alignAttr

private String alignAttr
IFRAME attribute members.


classAttr

private String classAttr

frameBorderAttr

private String frameBorderAttr

heightAttr

private String heightAttr

idAttr

private String idAttr

marginHeightAttr

private String marginHeightAttr

marginWidthAttr

private String marginWidthAttr

maximizedHeightAttr

private String maximizedHeightAttr

maximizedScrollingAttr

private String maximizedScrollingAttr

maximizedStyleAttr

private String maximizedStyleAttr

maximizedWidthAttr

private String maximizedWidthAttr

nameAttr

private String nameAttr

scrollingAttr

private String scrollingAttr

styleAttr

private String styleAttr

widthAttr

private String widthAttr
Constructor Detail

IFramePortlet

public IFramePortlet()
Portlet constructor.

Method Detail

init

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

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.

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.

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.

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.


getSourcePreference

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



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