org.apache.jetspeed.layout.impl
Class BasePortletAction
java.lang.Object
org.apache.jetspeed.layout.impl.BasePortletAction
- All Implemented Interfaces:
- AjaxAction, AjaxBuilder, Constants
- Direct Known Subclasses:
- BaseGetResourceAction, BaseSiteUpdateAction, ChangePortletAction, GetMenuAction, GetMenusAction, GetPagesAction, GetPortletActionsAction, GetPortletsAction, GetThemesAction, MovePortletAction, MultipleAction, RemovePortletAction, SecurityConstraintsAction, SecurityPermissionAction
public abstract class BasePortletAction
- extends java.lang.Object
- implements AjaxAction, AjaxBuilder, Constants
Abstract portlet placement action
- Version:
- $Id: $
- Author:
- David Gurney, David Sean Taylor
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 |
Method Summary |
boolean |
buildContext(RequestContext requestContext,
java.util.Map responseContext)
Build the normal context template |
boolean |
buildErrorContext(RequestContext requestContext,
java.util.Map responseContext)
Build the error context template |
boolean |
checkAccess(RequestContext context,
java.lang.String action)
Checks to see if the current subject has access to to execute this action. |
boolean |
createNewPageOnEdit(RequestContext context)
|
java.lang.String |
getActionParameter(RequestContext requestContext,
java.lang.String name)
|
java.lang.String |
getErrorTemplate()
|
Fragment |
getFragmentIdFromLocation(int row,
int column,
Fragment parentFragment)
|
Fragment |
getFragmentIdFromLocation(int row,
int column,
Page page)
|
java.lang.String |
getNonNullActionParameter(RequestContext requestContext,
java.lang.String name)
|
Fragment |
getParentFragmentById(java.lang.String id,
Fragment root)
|
java.lang.String |
getTemplate()
|
boolean |
isCreateNewPageOnEditEnabled()
|
boolean |
isPageQualifiedForCreateNewPageOnEdit(RequestContext context)
|
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 |
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 |
run |
log
protected static final org.apache.commons.logging.Log log
template
protected java.lang.String template
pageManager
protected PageManager pageManager
errorTemplate
protected java.lang.String errorTemplate
securityBehavior
protected PortletActionSecurityBehavior securityBehavior
BasePortletAction
public BasePortletAction(java.lang.String template,
java.lang.String errorTemplate,
PortletActionSecurityBehavior securityBehavior)
BasePortletAction
public BasePortletAction(java.lang.String template,
java.lang.String errorTemplate,
PageManager pageManager)
BasePortletAction
public BasePortletAction(java.lang.String template,
java.lang.String errorTemplate,
PageManager pageManager,
PortletActionSecurityBehavior securityBehavior)
buildContext
public boolean buildContext(RequestContext requestContext,
java.util.Map responseContext)
- Description copied from interface:
AjaxBuilder
- Build the normal context template
- Specified by:
buildContext
in interface AjaxBuilder
- Parameters:
requestContext
- The Jetspeed Request ContextresponseContext
- Context variables to be substituted into template
- Returns:
- true on success false onerror
buildErrorContext
public boolean buildErrorContext(RequestContext requestContext,
java.util.Map responseContext)
- Description copied from interface:
AjaxBuilder
- Build the error context template
- Specified by:
buildErrorContext
in interface AjaxBuilder
- Parameters:
requestContext
- The Jetspeed Request ContextresponseContext
- Context variables to be substituted into template
- Returns:
- true on success false onerror
getErrorTemplate
public java.lang.String getErrorTemplate()
- Specified by:
getErrorTemplate
in interface AjaxBuilder
- Returns:
- the name of the error template used for this builder
getTemplate
public java.lang.String getTemplate()
- Specified by:
getTemplate
in interface AjaxBuilder
- Returns:
- the name of the template used for this builder
checkAccess
public boolean checkAccess(RequestContext context,
java.lang.String action)
- Description copied from interface:
AjaxAction
- Checks to see if the current subject has access to to execute this action.
- Specified by:
checkAccess
in interface AjaxAction
- Returns:
- true if access granted, false if denied.
isCreateNewPageOnEditEnabled
public boolean isCreateNewPageOnEditEnabled()
isPageQualifiedForCreateNewPageOnEdit
public boolean isPageQualifiedForCreateNewPageOnEdit(RequestContext context)
createNewPageOnEdit
public boolean createNewPageOnEdit(RequestContext context)
getFragmentIdFromLocation
public Fragment getFragmentIdFromLocation(int row,
int column,
Page page)
getFragmentIdFromLocation
public Fragment getFragmentIdFromLocation(int row,
int column,
Fragment parentFragment)
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
- Parameters:
requestContext
- The Jetspeed Request ContextresultMap
- map of action parameters passed to the builder context
- Returns:
- success is true, failure is false
- Throws:
AJAXException
getActionParameter
public java.lang.String getActionParameter(RequestContext requestContext,
java.lang.String name)
getNonNullActionParameter
public java.lang.String getNonNullActionParameter(RequestContext requestContext,
java.lang.String name)
getParentFragmentById
public Fragment getParentFragmentById(java.lang.String id,
Fragment root)
Copyright © 1999-2009 Apache Software Foundation. All Rights Reserved.