com.atlassian.confluence.labels.actions
Class ViewLabelAction

java.lang.Object
  extended bycom.opensymphony.xwork.ActionSupport
      extended bycom.atlassian.confluence.core.ConfluenceActionSupport
          extended bycom.atlassian.confluence.labels.actions.AbstractLabelDisplayingAction
              extended bycom.atlassian.confluence.labels.actions.ViewLabelAction
All Implemented Interfaces:
com.opensymphony.xwork.Action, com.opensymphony.xwork.LocaleProvider, Serializable, SpaceAware, Spaced, com.opensymphony.xwork.TextProvider, com.opensymphony.xwork.Validateable, com.opensymphony.xwork.ValidationAware

public class ViewLabelAction
extends AbstractLabelDisplayingAction

Action for viewing a label. The label can be specified by either using the labels name or the labels id, but not both.

See Also:
Serialized Form

Field Summary
static int ITEMS_PER_PAGE
          The default number of content to be displayed on each page.
protected  PaginationSupport paginationSupport
          Pagination support to assist in the display of the list of content associated with the label.
 List preloadedPage
           
 
Fields inherited from class com.atlassian.confluence.labels.actions.AbstractLabelDisplayingAction
MAX_LABELS, space
 
Fields inherited from class com.atlassian.confluence.core.ConfluenceActionSupport
CANCEL, DEVMODE, eventManager, i18NBeanFactory, labelManager, languageManager, LICENSE_EXPIRED, LICENSE_USERS_EXCEEDED, log, permissionManager, permitted, PREVIEW, settingsManager, spacePermissionManager, userAccessor, webInterfaceManager
 
Fields inherited from class com.opensymphony.xwork.ActionSupport
LOG
 
Fields inherited from interface com.opensymphony.xwork.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
ViewLabelAction()
           
 
Method Summary
 String doDefault()
          Default webwork action execution method.
 String execute()
           
 List getContent()
           
 long getId()
          Getter for the id property
 Label getLabel()
           
 String getName()
          Getter for the name property
 List getOtherLabels(ContentEntityObject content)
          Returns the first nine global labels on the given content that are not this.label.
 PaginationSupport getPaginationSupport()
           
 List getPreloadedPage()
           
 List getRelated()
           
 List getSpacesForLabelledContent()
           
 boolean isViewPermissionRequired()
          For viewing individual labels, we don't require view permission on any particular space (actually, this doesn't matter right now - but might in the future!)
 void setId(long id)
          Setter for the id property
 void setName(String name)
          Setter for the name property
 void setStartIndex(int startIndex)
           
 void validate()
           
 
Methods inherited from class com.atlassian.confluence.labels.actions.AbstractLabelDisplayingAction
getPopularLabels, getRecentLabels, getSpace, isSpaceRequired, setSpace
 
Methods inherited from class com.atlassian.confluence.core.ConfluenceActionSupport
addActionError, addPermissionTypeTo, addToHistory, getActionName, getBootstrapManager, getCancelResult, getDateFormatter, getDefaultResourceBundle, getEditorLanguage, getEventManager, getGlobalHelper, getGlobalSettings, getHelper, getI18n, getInstalledLanguages, getLabelManager, getLanguageManager, getLanguageUserFriendly, getLocale, getLocaleManager, getLocaleString, getNiceContentType, getPermissionTypes, getPermittedEntitiesOf, getPermittedEntitiesOf, getPermittedEntitiesOf, getPreviousLoginDate, getRandom, getRemoteUser, getSession, getSpaceHelper, getText, getText, getText, getText, getTextStatic, getTextStatic, getTextStrict, getTimeZone, getUser, getUserAccessor, getUserFullName, getUserInterfaceState, getWebInterfaceManager, hasPermissionForSpace, isAnonymousUser, isCanceled, isDevMode, isEmailVisible, isExternalUserManagementEnabled, isLabelable, isPermissionCheck, isPermitted, isPermittedAsString, isPrintableVersion, setBootstrapManager, setCancel, setEventManager, setFormatSettingsManager, setI18NBeanFactory, setLabelManager, setLanguageManager, setLocaleManager, setPermissionCheck, setPermissionManager, setPreviousLoginDate, setSettingsManager, setSpacePermissionManager, setUserAccessor, setWebInterfaceManager
 
Methods inherited from class com.opensymphony.xwork.ActionSupport
addActionError, addActionMessage, addFieldError, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getText, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, setActionErrors, setActionMessages, setFieldErrors
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ITEMS_PER_PAGE

public static final int ITEMS_PER_PAGE
The default number of content to be displayed on each page.

See Also:
Constant Field Values

paginationSupport

protected PaginationSupport paginationSupport
Pagination support to assist in the display of the list of content associated with the label.


preloadedPage

public List preloadedPage
Constructor Detail

ViewLabelAction

public ViewLabelAction()
Method Detail

setId

public void setId(long id)
Setter for the id property

Parameters:
id -

getId

public long getId()
Getter for the id property


setName

public void setName(String name)
Setter for the name property

Parameters:
name -

getName

public String getName()
Getter for the name property


getLabel

public Label getLabel()

getContent

public List getContent()

getRelated

public List getRelated()

getPaginationSupport

public PaginationSupport getPaginationSupport()

setStartIndex

public void setStartIndex(int startIndex)

validate

public void validate()

execute

public String execute()
               throws Exception
Throws:
Exception

doDefault

public String doDefault()
                 throws Exception
Description copied from class: ConfluenceActionSupport
Default webwork action execution method.

Overrides:
doDefault in class ConfluenceActionSupport
Returns:
the action result
Throws:
Exception - if something goes wrong

isViewPermissionRequired

public boolean isViewPermissionRequired()
For viewing individual labels, we don't require view permission on any particular space (actually, this doesn't matter right now - but might in the future!)

Specified by:
isViewPermissionRequired in interface SpaceAware
Overrides:
isViewPermissionRequired in class AbstractLabelDisplayingAction

getSpacesForLabelledContent

public List getSpacesForLabelledContent()

getOtherLabels

public List getOtherLabels(ContentEntityObject content)
Returns the first nine global labels on the given content that are not this.label. It is expected that the view will only display the first eight such labels, and use the sixth as a signal that a "..." is required

Parameters:
content - the content to get labels for

getPreloadedPage

public List getPreloadedPage()


Confluence is developed by Atlassian.