public abstract class

AbstractPageAwareAction

extends ConfluenceActionSupport
implements PageAware
java.lang.Object
   ↳ com.opensymphony.xwork.ActionSupport
     ↳ com.atlassian.confluence.core.ConfluenceActionSupport
       ↳ com.atlassian.confluence.pages.actions.AbstractPageAwareAction
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

Parent class for actions which operate on AbstractPages (pages or blog posts).

Summary

[Expand]
Inherited Constants
From class com.atlassian.confluence.core.ConfluenceActionSupport
From interface com.opensymphony.xwork.Action
Fields
protected ContentPermissionManager contentPermissionManager
protected SpaceManager spaceManager
[Expand]
Inherited Fields
From class com.atlassian.confluence.core.ConfluenceActionSupport
From class com.opensymphony.xwork.ActionSupport
Public Constructors
AbstractPageAwareAction()
Public Methods
AbstractPage getPage()
long getPageId()
Space getSpace()
String getSpaceKey()
String getTitle()
boolean isLatestVersionRequired()
If the action can only work on the most recent version of a page, this will cause the interceptor to silently replace the version that it looks up with the most recent version, if necessary.
boolean isPageRequired()
If the action requires that the page be set before being run, then it should return true to this method.
boolean isPermitted()
boolean isViewPermissionRequired()
void setContentPermissionManager(ContentPermissionManager contentPermissionManager)
void setPage(AbstractPage page)
IOC method for setting the page on the action.
void setSpaceManager(SpaceManager spaceManager)
Protected Methods
@Deprecated boolean hasViewPagePermission()
This method is deprecated. since 4.0 because this method doesn't check permissions properly, use hasPermission(User, Permission, Object) instead.
[Expand]
Inherited Methods
From class com.atlassian.confluence.core.ConfluenceActionSupport
From class com.opensymphony.xwork.ActionSupport
From class java.lang.Object
From interface com.atlassian.confluence.pages.actions.PageAware
From interface com.atlassian.confluence.plugin.descriptor.web.WebInterface
From interface com.opensymphony.xwork.Action
From interface com.opensymphony.xwork.LocaleProvider
From interface com.opensymphony.xwork.TextProvider
From interface com.opensymphony.xwork.Validateable
From interface com.opensymphony.xwork.ValidationAware

Fields

protected ContentPermissionManager contentPermissionManager

protected SpaceManager spaceManager

Public Constructors

public AbstractPageAwareAction ()

Public Methods

public AbstractPage getPage ()

public long getPageId ()

public Space getSpace ()

public String getSpaceKey ()

public String getTitle ()

public boolean isLatestVersionRequired ()

If the action can only work on the most recent version of a page, this will cause the interceptor to silently replace the version that it looks up with the most recent version, if necessary.

Returns
  • true if the action requires the most recent version of a page

public boolean isPageRequired ()

If the action requires that the page be set before being run, then it should return true to this method. If the action requires a page, but no page is available, then the interceptor will automatically redirect to the 'pagenotfound' result

Returns
  • true if the action requires a page in order to execute

public boolean isPermitted ()

public boolean isViewPermissionRequired ()

public void setContentPermissionManager (ContentPermissionManager contentPermissionManager)

public void setPage (AbstractPage page)

IOC method for setting the page on the action. This is called from the interceptor

Parameters
page the page that the action will be working on.

public void setSpaceManager (SpaceManager spaceManager)

Protected Methods

@Deprecated protected boolean hasViewPagePermission ()

This method is deprecated.
since 4.0 because this method doesn't check permissions properly, use hasPermission(User, Permission, Object) instead.