public class ViewLabelAction extends AbstractLabelDisplayingAction
The names and ids are the parameters passed in, and used for null-input validation, but are not "maintained" once the labels they point to are retrieved. This means that the names and ids fields have trivial state after retrieveLabels has been called and should not be accessed via getter methods.
Modifier and Type | Field and Description |
---|---|
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 |
MAX_LABELS
key, notificationManager, space, spaceManager, themeManager, wikiStyleRenderer
CANCEL, DEVMODE, eventManager, i18NBeanFactory, labelManager, languageManager, LICENSE_EXPIRED, LICENSE_USERS_EXCEEDED, messageHolder, permissionManager, permitted, pluginAccessor, PREVIEW, settingsManager, spacePermissionManager, userAccessor, webInterfaceManager
Constructor and Description |
---|
ViewLabelAction() |
Modifier and Type | Method and Description |
---|---|
String |
execute() |
DisplayableLabel |
getAddLabel(Label label)
Returns a DisplayableLabel representing the currently viewed labels
and the given label.
|
List |
getContent() |
String |
getDescription() |
FriendlyDateFormatterHelper |
getFriendlyDateFormatterHelper() |
DisplayableLabel |
getLabel()
Returns a DisplayableLabel based on all the labels being viewed.
|
List |
getLabels() |
List<DisplayableLabel> |
getOtherLabels(Labelable content)
Returns the first nine global labels on the given content that are not this.label.
|
PaginationSupport |
getPaginationSupport() |
String |
getPaginationUrl() |
List |
getPreloadedPage() |
List |
getRelated() |
DisplayableLabel |
getRemoveLabel(Label label)
Returns a DisplayableLabel representing the currently viewed labels,
minus the given label.
|
WebInterfaceContext |
getWebInterfaceContext()
Returns a context which can be passed to web items when rendering them.
|
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 |
setDescription(String description) |
void |
setIds(long[] ids) |
void |
setSearchManager(SearchManager searchManager) |
void |
setStartIndex(int startIndex) |
void |
validate() |
getPopularLabels, getRecentLabels, isSpaceRequired
getKey, getPermissionTypes, getSpace, getSpaceKey, getSubscribableName, getThemeManager, hasSpaceIA, isAdminUser, isPermitted, isPersonalSpace, isSuperUser, isUserWatchingSpace, isValidSpaceKey, setKey, setNotificationManager, setSpace, setSpaceManager, setThemeManager, setWikiStyleRenderer
addActionError, addActionMessage, addFieldError, addPermissionTypeTo, addToHistory, doDefault, formatFriendlyDate, getActionName, getActionName, getAuthenticatedUser, getBootstrapManager, getCancel, getCancelResult, getConfluenceAccessManager, getContext, getCurrentRequest, getCurrentSession, getDateFormatSetting, getDateFormatter, getDefaultResourceBundle, getDefaultTimeZone, getDocLink, getEventManager, getFriendlyDateFormatter, getFrontendServiceURL, getGlobalSettings, getHelper, getI18n, getInstalledLanguages, getLabelManager, getLanguageManager, getLanguageUserFriendly, getLocale, getLocaleManager, getLocaleString, getMessageHolder, getNiceContentType, getPermissionManager, getPermittedEntitiesOf, getPermittedEntitiesOf, getPermittedEntitiesOf, getPreviousLoginDate, getRemoteUser, getSession, getSystemInformationService, getText, getText, getText, getText, getTextStatic, getTextStatic, getTextStrict, getTimeZone, getUser, getUserAccessor, getUserByName, getUserFullName, getUserHasLicensedAccess, getUserInterfaceState, getUserLocaleDefaultDatePattern, getUserProfilePicUrl, getWebInterfaceManager, hasPermissionForSpace, isAnonymousUser, isCanceled, isDevMode, isEmailVisible, isExternalUserManagementEnabled, isLabelable, isPrintableVersion, isSharedMode, isSkipAccessCheck, isUserStatusPluginEnabled, isUsingH2, isUsingHSQL, setApiDateFormatService, setBootstrapManager, setCancel, setConfluenceAccessManager, setContentUiSupport, setEventManager, setFormatSettingsManager, setI18NBean, setI18NBeanFactory, setLabelManager, setLanguageManager, setLocaleManager, setLoginManager, setMessageHolder, setPermissionManager, setPluginAccessor, setPreviousLoginDate, setServletRequestSupplier, setSettingsManager, setSkipAccessCheck, setSpacePermissionManager, setSystemInformationService, setTimeZoneManager, setUserAccessor, setWebInterfaceManager
addActionError, addActionMessage, addFieldError, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getText, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, setActionErrors, setActionMessages, setFieldErrors
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setSpace
public static final int ITEMS_PER_PAGE
protected PaginationSupport paginationSupport
public List preloadedPage
public void setIds(long[] ids)
public void setStartIndex(int startIndex)
public void setSearchManager(SearchManager searchManager)
public List getLabels()
public List getContent()
public List getRelated()
public PaginationSupport getPaginationSupport()
public void validate()
validate
in interface MessageHolderAware
validate
in interface com.opensymphony.xwork.Validateable
validate
in class com.opensymphony.xwork.ActionSupport
public String execute() throws Exception
execute
in interface com.opensymphony.xwork.Action
execute
in class com.opensymphony.xwork.ActionSupport
Exception
public boolean isViewPermissionRequired()
isViewPermissionRequired
in interface SpaceAware
isViewPermissionRequired
in class AbstractLabelDisplayingAction
public List<DisplayableLabel> getOtherLabels(Labelable content)
content
- the content to get labels forLabel
s with size between 0 and 8 inclusive. Not null.public List getPreloadedPage()
public DisplayableLabel getLabel()
public DisplayableLabel getAddLabel(Label label)
For example, if the current viewed labels are "a+b" and the passed label is "c", it returns a DisplayableLabel of "a+b+c"
Sorts the labels by title before returning them, so the order is canonical.
public DisplayableLabel getRemoveLabel(Label label)
For example, if the current viewed labels are "a+b+c" and the passed label is "a", it returns a DisplayableLabel of "b+c"
Sorts the labels by title before returning them, so the order is canonical.
public String getPaginationUrl()
public WebInterfaceContext getWebInterfaceContext()
WebInterface
Typically, WebWork actions will implement this to provide extra details in the context such as content objects, and so on.
getWebInterfaceContext
in interface WebInterface
getWebInterfaceContext
in class ConfluenceActionSupport
public String getDescription()
public void setDescription(String description)
public FriendlyDateFormatterHelper getFriendlyDateFormatterHelper()
Copyright © 2003–2017 Atlassian. All rights reserved.