org.apache.jetspeed.layout.impl
Class MovePortletAction
java.lang.Object
org.apache.jetspeed.layout.impl.BasePortletAction
org.apache.jetspeed.layout.impl.MovePortletAction
- All Implemented Interfaces:
- AjaxAction, AjaxBuilder, Constants
- Direct Known Subclasses:
- AddPortletAction
public class MovePortletAction
- extends BasePortletAction
- implements AjaxAction, 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 java.lang.String |
eol
|
protected static org.apache.commons.logging.Log |
log
|
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(java.lang.String template,
java.lang.String errorTemplate,
PortletRegistry registry,
PageManager pageManager,
PortletActionSecurityBehavior securityBehavior)
|
MovePortletAction(java.lang.String template,
java.lang.String errorTemplate,
PortletRegistry registry,
java.lang.String sMoveType)
|
MovePortletAction(java.lang.String template,
java.lang.String errorTemplate,
PortletRegistry registry,
java.lang.String sMoveType,
PageManager pageManager,
PortletActionSecurityBehavior securityBehavior)
|
Method Summary |
protected Coordinate |
getCoordinateFromParams(RequestContext requestContext)
|
protected PortletRegistry |
getPortletRegistry()
|
protected boolean |
moveInFragment(RequestContext requestContext,
PortletPlacementContext placement,
Fragment fragment,
Fragment placeInLayoutFragment,
java.util.Map resultMap,
boolean batch)
|
protected boolean |
moveToOtherLayoutFragment(RequestContext requestContext,
boolean batch,
java.util.Map resultMap,
java.lang.String moveFragmentId,
Fragment moveToLayoutFragment,
Fragment removeFromLayoutFragment)
|
protected boolean |
placeFragment(RequestContext requestContext,
boolean batch,
java.util.Map resultMap,
Fragment placeFragment,
Fragment placeInLayoutFragment)
|
protected void |
putCartesianResult(java.util.Map resultMap,
float value,
float oldValue,
java.lang.String name,
java.lang.String oldName)
|
boolean |
run(RequestContext requestContext,
java.util.Map resultMap)
The action should put any parameters or results it wants
passed on to the builders in the resultMap
This method runs an Ajax action. |
protected boolean |
runAction(RequestContext requestContext,
java.util.Map resultMap,
boolean batch)
|
boolean |
runBatch(RequestContext requestContext,
java.util.Map resultMap)
Same as run method, but runs in batch mode, as a hint to the action
that it is running a multiple action and can delay its update
runBatch currently supports pageManager.updatePage |
void |
setMoveType(java.lang.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 |
log
protected static final org.apache.commons.logging.Log log
eol
protected static final java.lang.String eol
MovePortletAction
public MovePortletAction(java.lang.String template,
java.lang.String errorTemplate,
PortletRegistry registry,
java.lang.String sMoveType)
throws AJAXException
- Throws:
AJAXException
MovePortletAction
public MovePortletAction(java.lang.String template,
java.lang.String errorTemplate,
PortletRegistry registry,
PageManager pageManager,
PortletActionSecurityBehavior securityBehavior)
throws AJAXException
- Throws:
AJAXException
MovePortletAction
public MovePortletAction(java.lang.String template,
java.lang.String errorTemplate,
PortletRegistry registry,
java.lang.String sMoveType,
PageManager pageManager,
PortletActionSecurityBehavior securityBehavior)
throws AJAXException
- Throws:
AJAXException
setMoveType
public void setMoveType(java.lang.String p_sMoveType)
throws AJAXException
- Throws:
AJAXException
runBatch
public boolean runBatch(RequestContext requestContext,
java.util.Map resultMap)
throws AJAXException
- Description copied from interface:
AjaxAction
- Same as run method, but runs in batch mode, as a hint to the action
that it is running a multiple action and can delay its update
runBatch currently supports pageManager.updatePage
- Specified by:
runBatch
in interface AjaxAction
- Overrides:
runBatch
in class BasePortletAction
- Parameters:
requestContext
- The Jetspeed Request ContextresultMap
- map of action parameters passed to the builder context
- Returns:
- success is true, failure is false
- Throws:
AJAXException
run
public boolean run(RequestContext requestContext,
java.util.Map resultMap)
throws AJAXException
- Description copied from interface:
AjaxAction
- The action should put any parameters or results it wants
passed on to the builders in the resultMap
This method runs an Ajax action.
- Specified by:
run
in interface AjaxAction
- Parameters:
requestContext
- The Jetspeed Request ContextresultMap
- map of action parameters passed to the builder context
- Returns:
- success is true, failure is false
- Throws:
AJAXException
runAction
protected boolean runAction(RequestContext requestContext,
java.util.Map resultMap,
boolean batch)
throws AJAXException
- Throws:
AJAXException
moveInFragment
protected boolean moveInFragment(RequestContext requestContext,
PortletPlacementContext placement,
Fragment fragment,
Fragment placeInLayoutFragment,
java.util.Map resultMap,
boolean batch)
throws PortletPlacementException,
NodeException,
AJAXException
- Throws:
PortletPlacementException
NodeException
AJAXException
moveToOtherLayoutFragment
protected boolean moveToOtherLayoutFragment(RequestContext requestContext,
boolean batch,
java.util.Map resultMap,
java.lang.String moveFragmentId,
Fragment moveToLayoutFragment,
Fragment removeFromLayoutFragment)
throws PortletPlacementException,
NodeException,
AJAXException
- Throws:
PortletPlacementException
NodeException
AJAXException
placeFragment
protected boolean placeFragment(RequestContext requestContext,
boolean batch,
java.util.Map resultMap,
Fragment placeFragment,
Fragment placeInLayoutFragment)
throws PortletPlacementException,
NodeException,
AJAXException
- Throws:
PortletPlacementException
NodeException
AJAXException
getCoordinateFromParams
protected Coordinate getCoordinateFromParams(RequestContext requestContext)
putCartesianResult
protected void putCartesianResult(java.util.Map resultMap,
float value,
float oldValue,
java.lang.String name,
java.lang.String oldName)
getPortletRegistry
protected PortletRegistry getPortletRegistry()
Copyright © 1999-2010 Apache Software Foundation. All Rights Reserved.