org.apache.jetspeed.demo.simple
Class PickANumberPortlet

java.lang.Object
  extended byjavax.portlet.GenericPortlet
      extended byorg.apache.portals.bridges.common.GenericServletPortlet
          extended byorg.apache.jetspeed.demo.simple.PickANumberPortlet
All Implemented Interfaces:
javax.portlet.Portlet, javax.portlet.PortletConfig

public class PickANumberPortlet
extends org.apache.portals.bridges.common.GenericServletPortlet

This class only exists to maintain the Help and View page names. As soon as the container/engine will retain the preferences this class can be replaced by configuring portlet preferences.

Version:
$Id: PickANumberPortlet.java 187966 2004-11-19 21:53:35Z taylor $

Field Summary
private static String DEFAULT_ACTION_PAGE
          Default action page when preference does not exist
private static String DEFAULT_CUSTOM_PAGE
          Default custom page when preference does not exist
private static String DEFAULT_EDIT_PAGE
          Default edit page when preference does not exist
private static String DEFAULT_HELP_PAGE
          Default help page when preference does not exist
private static String DEFAULT_VIEW_PAGE
          Default help page when preference does not exist
private static String GUESS_COUNT_NAME
          Attribute name of Guess Count
private static String GUESS_PARAMETER_NAME
          Paramter name of current guess
private static String LAST_GUESS_NAME
          Attribute name of the last guess
private static String TARGET_VALUE_NAME
          Attribute name of Target Value
private static String TOP_RANGE_NAME
          Attribute name of Top Range Value (in Edit Mode)
 
Fields inherited from class org.apache.portals.bridges.common.GenericServletPortlet
PARAM_ACTION_PAGE, PARAM_ALLOW_PREFERENCES, PARAM_CUSTOM_PAGE, PARAM_EDIT_PAGE, PARAM_HELP_PAGE, PARAM_MAX_PAGE, PARAM_VIEW_PAGE
 
Fields inherited from class javax.portlet.GenericPortlet
 
Constructor Summary
PickANumberPortlet()
          Set default page values when class is created
 
Method Summary
 void doView(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response)
           
private  long getHighRange(javax.portlet.PortletRequest request)
           
private  boolean isEditAction(javax.portlet.ActionRequest request)
           
 void processAction(javax.portlet.ActionRequest request, javax.portlet.ActionResponse actionResponse)
          Increment attributes in different scopes
private  void savePreferences(javax.portlet.PortletRequest request)
           
 
Methods inherited from class org.apache.portals.bridges.common.GenericServletPortlet
doCustom, doEdit, doHelp, getDefaultActionPage, getDefaultCustomPage, getDefaultEditPage, getDefaultHelpPage, getDefaultViewPage, init, processPreferencesAction, setDefaultActionPage, setDefaultCustomPage, setDefaultEditPage, setDefaultHelpPage, setDefaultViewPage
 
Methods inherited from class javax.portlet.GenericPortlet
destroy, doDispatch, getInitParameter, getInitParameterNames, getPortletConfig, getPortletContext, getPortletName, getResourceBundle, getTitle, init, render
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_ACTION_PAGE

private static final String DEFAULT_ACTION_PAGE
Default action page when preference does not exist

See Also:
GenericServletPortlet.processAction(javax.portlet.ActionRequest, javax.portlet.ActionResponse)

DEFAULT_CUSTOM_PAGE

private static final String DEFAULT_CUSTOM_PAGE
Default custom page when preference does not exist

See Also:
GenericServletPortlet.doCustom(javax.portlet.RenderRequest, javax.portlet.RenderResponse)

DEFAULT_EDIT_PAGE

private static final String DEFAULT_EDIT_PAGE
Default edit page when preference does not exist

See Also:
GenericServletPortlet.doEdit(javax.portlet.RenderRequest, javax.portlet.RenderResponse), Constant Field Values

DEFAULT_HELP_PAGE

private static final String DEFAULT_HELP_PAGE
Default help page when preference does not exist

See Also:
GenericServletPortlet.doHelp(javax.portlet.RenderRequest, javax.portlet.RenderResponse), Constant Field Values

DEFAULT_VIEW_PAGE

private static final String DEFAULT_VIEW_PAGE
Default help page when preference does not exist

See Also:
GenericServletPortlet.doView(javax.portlet.RenderRequest, javax.portlet.RenderResponse), Constant Field Values

GUESS_COUNT_NAME

private static final String GUESS_COUNT_NAME
Attribute name of Guess Count

See Also:
Constant Field Values

GUESS_PARAMETER_NAME

private static final String GUESS_PARAMETER_NAME
Paramter name of current guess

See Also:
Constant Field Values

LAST_GUESS_NAME

private static final String LAST_GUESS_NAME
Attribute name of the last guess

See Also:
Constant Field Values

TARGET_VALUE_NAME

private static final String TARGET_VALUE_NAME
Attribute name of Target Value

See Also:
Constant Field Values

TOP_RANGE_NAME

private static final String TOP_RANGE_NAME
Attribute name of Top Range Value (in Edit Mode)

See Also:
Constant Field Values
Constructor Detail

PickANumberPortlet

public PickANumberPortlet()
Set default page values when class is created

Method Detail

doView

public void doView(javax.portlet.RenderRequest request,
                   javax.portlet.RenderResponse response)
            throws javax.portlet.PortletException,
                   IOException
Throws:
javax.portlet.PortletException
IOException

processAction

public void processAction(javax.portlet.ActionRequest request,
                          javax.portlet.ActionResponse actionResponse)
                   throws javax.portlet.PortletException,
                          IOException
Increment attributes in different scopes

Throws:
javax.portlet.PortletException
IOException
See Also:
javax.portlet.GenericPortlet#processActions

getHighRange

private long getHighRange(javax.portlet.PortletRequest request)

isEditAction

private boolean isEditAction(javax.portlet.ActionRequest request)

savePreferences

private void savePreferences(javax.portlet.PortletRequest request)


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