org.apache.jetspeed.layout.impl
Class MovePortletAction

java.lang.Object
  extended by org.apache.jetspeed.layout.impl.BasePortletAction
      extended by org.apache.jetspeed.layout.impl.MovePortletAction
All Implemented Interfaces:
org.apache.jetspeed.ajax.AjaxAction, org.apache.jetspeed.ajax.AjaxBuilder, Constants
Direct Known Subclasses:
AddPortletAction

public class MovePortletAction
extends BasePortletAction
implements org.apache.jetspeed.ajax.AjaxAction, org.apache.jetspeed.ajax.AjaxBuilder, Constants

Move Portlet portlet placement action AJAX Parameters: id = the fragment id of the portlet to move page = (implied in the URL) Additional Absolute Parameters: row = the new row to move to col = the new column to move to Additional Relative Parameters: (move left, right, up, down) none

Version:
$Id: $
Author:
David Gurney, David Sean Taylor

Field Summary
protected static String eol
           
private  int iMoveType
           
protected static org.apache.commons.logging.Log log
           
private  org.apache.jetspeed.components.portletregistry.PortletRegistry registry
           
private  String sMoveType
           
 
Fields inherited from class org.apache.jetspeed.layout.impl.BasePortletAction
errorTemplate, pageManager, securityBehavior, template
 
Fields inherited from interface org.apache.jetspeed.layout.impl.Constants
ABS, ACTION, CARTESIAN, COL, CUSTOM_MENUS, DEFAULT_LAYOUT, DESKTOP_EXTENDED, DESKTOP_PAGE_DECORATIONS, DESKTOP_PORTLET_DECORATIONS, DESTINATION, DOWN, FILTER, FOLDER, FOLDERS, FORMAT, FRAGMENTID, FRAGMENTS, GUESTUSERS, HEIGHT, INCLUDE_MENU_DEFS, IPADDRESS, LAYOUT, LAYOUTID, LAYOUTS, LEFT, LINK, LINKS, MENU, MENU_CONTEXT, MENU_DEFINITIONS, MENU_LOCALE, MENU_NAME, METADATA, NEWCOL, NEWROW, OFFLINE, OLD_DESKTOP_EXTENDED, OLD_HEIGHT, OLD_PORTLET_MODE, OLD_WIDTH, OLD_WINDOW_STATE, OLD_X, OLD_Y, OLD_Z, OLDCOL, OLDROW, ONLINE, PAGE, PAGE_DECORATIONS, PAGE_QUALIFIED_CREATE_ON_EDIT, PAGES, PORTLET_DECORATIONS, PORTLET_MODE, PORTLETENTITY, PORTLETID, PORTLETS, PROFILED_PATH, REASON, RESOURCE_NAME, RIGHT, ROLES, ROW, SECURITY_DEFS, SECURITY_OWNER, SECURITY_REFS, SESSIONS, SHORT_TITLE, SIZES, SOURCE, STANDARD_MENUS, STATUS, TITLE, TYPE, UP, USER_IS_ANONYMOUS, USERINFO, USERNAME, USERS, WIDTH, WINDOW_STATE, X, Y, Z
 
Constructor Summary
MovePortletAction(String template, String errorTemplate, org.apache.jetspeed.components.portletregistry.PortletRegistry registry, org.apache.jetspeed.page.PageManager pageManager, org.apache.jetspeed.layout.PortletActionSecurityBehavior securityBehavior)
           
MovePortletAction(String template, String errorTemplate, org.apache.jetspeed.components.portletregistry.PortletRegistry registry, String sMoveType)
           
MovePortletAction(String template, String errorTemplate, org.apache.jetspeed.components.portletregistry.PortletRegistry registry, String sMoveType, org.apache.jetspeed.page.PageManager pageManager, org.apache.jetspeed.layout.PortletActionSecurityBehavior securityBehavior)
           
 
Method Summary
protected  org.apache.jetspeed.layout.Coordinate getCoordinateFromParams(org.apache.jetspeed.request.RequestContext requestContext)
           
protected  org.apache.jetspeed.components.portletregistry.PortletRegistry getPortletRegistry()
           
protected  boolean moveInFragment(org.apache.jetspeed.request.RequestContext requestContext, org.apache.jetspeed.layout.PortletPlacementContext placement, org.apache.jetspeed.om.page.Fragment fragment, org.apache.jetspeed.om.page.Fragment placeInLayoutFragment, Map resultMap, boolean batch)
           
protected  boolean moveToOtherLayoutFragment(org.apache.jetspeed.request.RequestContext requestContext, boolean batch, Map resultMap, String moveFragmentId, org.apache.jetspeed.om.page.Fragment moveToLayoutFragment, org.apache.jetspeed.om.page.Fragment removeFromLayoutFragment)
           
protected  boolean placeFragment(org.apache.jetspeed.request.RequestContext requestContext, boolean batch, Map resultMap, org.apache.jetspeed.om.page.Fragment placeFragment, org.apache.jetspeed.om.page.Fragment placeInLayoutFragment)
           
protected  void putCartesianResult(Map resultMap, float value, float oldValue, String name, String oldName)
           
 boolean run(org.apache.jetspeed.request.RequestContext requestContext, Map resultMap)
           
protected  boolean runAction(org.apache.jetspeed.request.RequestContext requestContext, Map resultMap, boolean batch)
           
 boolean runBatch(org.apache.jetspeed.request.RequestContext requestContext, Map resultMap)
           
 void setMoveType(String p_sMoveType)
           
 
Methods inherited from class org.apache.jetspeed.layout.impl.BasePortletAction
buildContext, buildErrorContext, checkAccess, createNewPageOnEdit, getActionParameter, getErrorTemplate, getFragmentIdFromLocation, getFragmentIdFromLocation, getNonNullActionParameter, getParentFragmentById, getTemplate, isCreateNewPageOnEditEnabled, isPageQualifiedForCreateNewPageOnEdit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.jetspeed.ajax.AjaxAction
checkAccess
 
Methods inherited from interface org.apache.jetspeed.ajax.AjaxBuilder
buildContext, buildErrorContext, getErrorTemplate, getTemplate
 

Field Detail

log

protected static final org.apache.commons.logging.Log log

eol

protected static final String eol

registry

private org.apache.jetspeed.components.portletregistry.PortletRegistry registry

iMoveType

private int iMoveType

sMoveType

private String sMoveType
Constructor Detail

MovePortletAction

public MovePortletAction(String template,
                         String errorTemplate,
                         org.apache.jetspeed.components.portletregistry.PortletRegistry registry,
                         String sMoveType)
                  throws org.apache.jetspeed.ajax.AJAXException
Throws:
org.apache.jetspeed.ajax.AJAXException

MovePortletAction

public MovePortletAction(String template,
                         String errorTemplate,
                         org.apache.jetspeed.components.portletregistry.PortletRegistry registry,
                         org.apache.jetspeed.page.PageManager pageManager,
                         org.apache.jetspeed.layout.PortletActionSecurityBehavior securityBehavior)
                  throws org.apache.jetspeed.ajax.AJAXException
Throws:
org.apache.jetspeed.ajax.AJAXException

MovePortletAction

public MovePortletAction(String template,
                         String errorTemplate,
                         org.apache.jetspeed.components.portletregistry.PortletRegistry registry,
                         String sMoveType,
                         org.apache.jetspeed.page.PageManager pageManager,
                         org.apache.jetspeed.layout.PortletActionSecurityBehavior securityBehavior)
                  throws org.apache.jetspeed.ajax.AJAXException
Throws:
org.apache.jetspeed.ajax.AJAXException
Method Detail

setMoveType

public void setMoveType(String p_sMoveType)
                 throws org.apache.jetspeed.ajax.AJAXException
Throws:
org.apache.jetspeed.ajax.AJAXException

runBatch

public boolean runBatch(org.apache.jetspeed.request.RequestContext requestContext,
                        Map resultMap)
                 throws org.apache.jetspeed.ajax.AJAXException
Specified by:
runBatch in interface org.apache.jetspeed.ajax.AjaxAction
Overrides:
runBatch in class BasePortletAction
Throws:
org.apache.jetspeed.ajax.AJAXException

run

public boolean run(org.apache.jetspeed.request.RequestContext requestContext,
                   Map resultMap)
            throws org.apache.jetspeed.ajax.AJAXException
Specified by:
run in interface org.apache.jetspeed.ajax.AjaxAction
Throws:
org.apache.jetspeed.ajax.AJAXException

runAction

protected boolean runAction(org.apache.jetspeed.request.RequestContext requestContext,
                            Map resultMap,
                            boolean batch)
                     throws org.apache.jetspeed.ajax.AJAXException
Throws:
org.apache.jetspeed.ajax.AJAXException

moveInFragment

protected boolean moveInFragment(org.apache.jetspeed.request.RequestContext requestContext,
                                 org.apache.jetspeed.layout.PortletPlacementContext placement,
                                 org.apache.jetspeed.om.page.Fragment fragment,
                                 org.apache.jetspeed.om.page.Fragment placeInLayoutFragment,
                                 Map resultMap,
                                 boolean batch)
                          throws org.apache.jetspeed.layout.PortletPlacementException,
                                 org.apache.jetspeed.page.document.NodeException,
                                 org.apache.jetspeed.ajax.AJAXException
Throws:
org.apache.jetspeed.layout.PortletPlacementException
org.apache.jetspeed.page.document.NodeException
org.apache.jetspeed.ajax.AJAXException

moveToOtherLayoutFragment

protected boolean moveToOtherLayoutFragment(org.apache.jetspeed.request.RequestContext requestContext,
                                            boolean batch,
                                            Map resultMap,
                                            String moveFragmentId,
                                            org.apache.jetspeed.om.page.Fragment moveToLayoutFragment,
                                            org.apache.jetspeed.om.page.Fragment removeFromLayoutFragment)
                                     throws org.apache.jetspeed.layout.PortletPlacementException,
                                            org.apache.jetspeed.page.document.NodeException,
                                            org.apache.jetspeed.ajax.AJAXException
Throws:
org.apache.jetspeed.layout.PortletPlacementException
org.apache.jetspeed.page.document.NodeException
org.apache.jetspeed.ajax.AJAXException

placeFragment

protected boolean placeFragment(org.apache.jetspeed.request.RequestContext requestContext,
                                boolean batch,
                                Map resultMap,
                                org.apache.jetspeed.om.page.Fragment placeFragment,
                                org.apache.jetspeed.om.page.Fragment placeInLayoutFragment)
                         throws org.apache.jetspeed.layout.PortletPlacementException,
                                org.apache.jetspeed.page.document.NodeException,
                                org.apache.jetspeed.ajax.AJAXException
Throws:
org.apache.jetspeed.layout.PortletPlacementException
org.apache.jetspeed.page.document.NodeException
org.apache.jetspeed.ajax.AJAXException

getCoordinateFromParams

protected org.apache.jetspeed.layout.Coordinate getCoordinateFromParams(org.apache.jetspeed.request.RequestContext requestContext)

putCartesianResult

protected void putCartesianResult(Map resultMap,
                                  float value,
                                  float oldValue,
                                  String name,
                                  String oldName)

getPortletRegistry

protected org.apache.jetspeed.components.portletregistry.PortletRegistry getPortletRegistry()


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