org.apache.jetspeed.modules.actions.portlets
Class CustomizeSetAction

java.lang.Object
  extended byorg.apache.turbine.modules.Assembler
      extended byorg.apache.turbine.modules.Action
          extended byorg.apache.turbine.modules.ActionEvent
              extended byorg.apache.jetspeed.modules.actions.portlets.PortletActionEvent
                  extended byorg.apache.jetspeed.modules.actions.portlets.PortletAction
                      extended byorg.apache.jetspeed.modules.actions.portlets.GenericMVCAction
                          extended byorg.apache.jetspeed.modules.actions.portlets.VelocityPortletAction
                              extended byorg.apache.jetspeed.modules.actions.portlets.CustomizeSetAction

public class CustomizeSetAction
extends VelocityPortletAction

This action implements the default portletset behavior customizer

Don't call it from the URL, the Portlet and the Action are automatically associated through the registry PortletName

Version:
$Id: CustomizeSetAction.java,v 1.53 2005/05/10 19:28:17 morciuch Exp $
Author:
Raphaël Luta

Field Summary
static java.lang.String FILTER_FIELDS
           
static java.lang.String FILTER_TYPE
           
static java.lang.String FILTER_VALUE
           
static java.lang.String FILTER_VALUES
           
 
Fields inherited from class org.apache.turbine.modules.ActionEvent
BUTTON, BUTTON_LENGTH, LENGTH, METHOD_NAME_LENGTH, METHOD_NAME_PREFIX
 
Constructor Summary
CustomizeSetAction()
           
 
Method Summary
static java.util.List buildCategoryList(org.apache.turbine.util.RunData data, java.lang.String mediaType, java.util.List portlets)
          Builds a list of all portlet categories
static java.util.List buildInfoList(org.apache.turbine.util.RunData data, java.lang.String regName, java.lang.String mediaType)
           
static java.util.List buildList(org.apache.turbine.util.RunData data, java.lang.String regName)
           
protected  void buildNormalContext(VelocityPortlet portlet, org.apache.velocity.context.Context context, org.apache.turbine.util.RunData rundata)
          Subclasses must override this method to provide default behavior for the portlet action
static java.util.List buildPortletList(org.apache.turbine.util.RunData data, PortletSet set, java.lang.String mediaType, java.util.List allPortlets)
           
 void doAdd(org.apache.turbine.util.RunData rundata, org.apache.velocity.context.Context context)
          Add new portlets in the customized set
 void doAddref(org.apache.turbine.util.RunData rundata, org.apache.velocity.context.Context context)
          Add new Reference in the customized set
 void doAddset(org.apache.turbine.util.RunData rundata, org.apache.velocity.context.Context context)
          Add a new portlets element in the customized set
 void doApply(org.apache.turbine.util.RunData rundata, org.apache.velocity.context.Context context)
          Save customizations and get out of customization state
 void doCancel(org.apache.turbine.util.RunData rundata, org.apache.velocity.context.Context context)
          Clean up the customization state
 void doFilter(org.apache.turbine.util.RunData rundata, org.apache.velocity.context.Context context)
          Adds a filter over the available portlets list based on category
 void doFiltercategory(org.apache.turbine.util.RunData rundata, org.apache.velocity.context.Context context)
          Adds a filter over the available portlets list based on category
 void doLayout(org.apache.turbine.util.RunData rundata, org.apache.velocity.context.Context context)
          Updates the customized portlet entry
 void doMetainfo(org.apache.turbine.util.RunData rundata, org.apache.velocity.context.Context context)
          Sets the metainfo for this entry
 void doNext(org.apache.turbine.util.RunData rundata, org.apache.velocity.context.Context context)
           
 void doPrevious(org.apache.turbine.util.RunData rundata, org.apache.velocity.context.Context context)
           
 void doSave(org.apache.turbine.util.RunData rundata, org.apache.velocity.context.Context context)
          Save the general informations for this set
 void doSecurity(org.apache.turbine.util.RunData rundata, org.apache.velocity.context.Context context)
          Set the SecuirtyRef in the PSML and the current PortletConfig using the HTML parameter "securityRef".
 void doSkin(org.apache.turbine.util.RunData rundata, org.apache.velocity.context.Context context)
          Set the skin in the PSML and the current PortletConfig using the HTML parameter "skin".
protected  SecurityReference getSecurityReference(org.apache.turbine.util.RunData rundata, java.lang.String path)
          Get the security reference from the outer portlet set
 int getSize(VelocityPortlet portlet)
           
static java.util.Map getUserSelections(org.apache.turbine.util.RunData data)
           
protected  void maintainUserSelections(org.apache.turbine.util.RunData rundata)
           
 
Methods inherited from class org.apache.jetspeed.modules.actions.portlets.VelocityPortletAction
buildConfigureContext, buildConfigureContext, buildMaximizedContext, buildMaximizedContext, buildNormalContext
 
Methods inherited from class org.apache.jetspeed.modules.actions.portlets.GenericMVCAction
checkAdministrativeAction, doPerform, getAttribute, getAttribute, getPortletInstance, perform, setAttribute
 
Methods inherited from class org.apache.jetspeed.modules.actions.portlets.PortletAction
doPerform, getContext, getPortlet, getTemplate, resetTemplate, setTemplate, setTemplate
 
Methods inherited from class org.apache.jetspeed.modules.actions.portlets.PortletActionEvent
executeEvents, fireEvent
 
Methods inherited from class org.apache.turbine.modules.ActionEvent
executeEvents, formatString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILTER_FIELDS

public static final java.lang.String FILTER_FIELDS
See Also:
Constant Field Values

FILTER_VALUES

public static final java.lang.String FILTER_VALUES
See Also:
Constant Field Values

FILTER_TYPE

public static final java.lang.String FILTER_TYPE
See Also:
Constant Field Values

FILTER_VALUE

public static final java.lang.String FILTER_VALUE
See Also:
Constant Field Values
Constructor Detail

CustomizeSetAction

public CustomizeSetAction()
Method Detail

buildNormalContext

protected void buildNormalContext(VelocityPortlet portlet,
                                  org.apache.velocity.context.Context context,
                                  org.apache.turbine.util.RunData rundata)
                           throws java.lang.Exception
Subclasses must override this method to provide default behavior for the portlet action

Specified by:
buildNormalContext in class VelocityPortletAction
Throws:
java.lang.Exception

getSize

public int getSize(VelocityPortlet portlet)

doCancel

public void doCancel(org.apache.turbine.util.RunData rundata,
                     org.apache.velocity.context.Context context)
Clean up the customization state


doSave

public void doSave(org.apache.turbine.util.RunData rundata,
                   org.apache.velocity.context.Context context)
Save the general informations for this set


doApply

public void doApply(org.apache.turbine.util.RunData rundata,
                    org.apache.velocity.context.Context context)
Save customizations and get out of customization state


doAddset

public void doAddset(org.apache.turbine.util.RunData rundata,
                     org.apache.velocity.context.Context context)
Add a new portlets element in the customized set


doPrevious

public void doPrevious(org.apache.turbine.util.RunData rundata,
                       org.apache.velocity.context.Context context)
                throws java.lang.Exception
Throws:
java.lang.Exception

doNext

public void doNext(org.apache.turbine.util.RunData rundata,
                   org.apache.velocity.context.Context context)
            throws java.lang.Exception
Throws:
java.lang.Exception

maintainUserSelections

protected void maintainUserSelections(org.apache.turbine.util.RunData rundata)
                               throws java.lang.Exception
Throws:
java.lang.Exception

doAdd

public void doAdd(org.apache.turbine.util.RunData rundata,
                  org.apache.velocity.context.Context context)
           throws java.lang.Exception
Add new portlets in the customized set

Throws:
java.lang.Exception

doAddref

public void doAddref(org.apache.turbine.util.RunData rundata,
                     org.apache.velocity.context.Context context)
              throws java.lang.Exception
Add new Reference in the customized set

Throws:
java.lang.Exception

getSecurityReference

protected SecurityReference getSecurityReference(org.apache.turbine.util.RunData rundata,
                                                 java.lang.String path)
Get the security reference from the outer portlet set

Parameters:
path - the psml locator path
Returns:
the security reference of the referenced resource

doMetainfo

public void doMetainfo(org.apache.turbine.util.RunData rundata,
                       org.apache.velocity.context.Context context)
Sets the metainfo for this entry


doLayout

public void doLayout(org.apache.turbine.util.RunData rundata,
                     org.apache.velocity.context.Context context)
Updates the customized portlet entry


doSkin

public void doSkin(org.apache.turbine.util.RunData rundata,
                   org.apache.velocity.context.Context context)
Set the skin in the PSML and the current PortletConfig using the HTML parameter "skin". If the parmeter is missing or 'blank', then the skin is set to null.


doSecurity

public void doSecurity(org.apache.turbine.util.RunData rundata,
                       org.apache.velocity.context.Context context)
Set the SecuirtyRef in the PSML and the current PortletConfig using the HTML parameter "securityRef". If the parmeter is missing or 'blank', then the SecuriyReference is set to null.


buildPortletList

public static java.util.List buildPortletList(org.apache.turbine.util.RunData data,
                                              PortletSet set,
                                              java.lang.String mediaType,
                                              java.util.List allPortlets)

getUserSelections

public static java.util.Map getUserSelections(org.apache.turbine.util.RunData data)

buildInfoList

public static java.util.List buildInfoList(org.apache.turbine.util.RunData data,
                                           java.lang.String regName,
                                           java.lang.String mediaType)

buildList

public static java.util.List buildList(org.apache.turbine.util.RunData data,
                                       java.lang.String regName)

buildCategoryList

public static java.util.List buildCategoryList(org.apache.turbine.util.RunData data,
                                               java.lang.String mediaType,
                                               java.util.List portlets)
Builds a list of all portlet categories


doFiltercategory

public void doFiltercategory(org.apache.turbine.util.RunData rundata,
                             org.apache.velocity.context.Context context)
                      throws java.lang.Exception
Adds a filter over the available portlets list based on category

Throws:
java.lang.Exception

doFilter

public void doFilter(org.apache.turbine.util.RunData rundata,
                     org.apache.velocity.context.Context context)
              throws java.lang.Exception
Adds a filter over the available portlets list based on category

Throws:
java.lang.Exception


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