|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.opensymphony.xwork.ActionSupport
com.atlassian.confluence.core.ConfluenceActionSupport
com.atlassian.confluence.spaces.actions.AbstractSpaceAction
com.atlassian.confluence.labels.actions.AbstractLabelDisplayingAction
com.atlassian.confluence.labels.actions.ViewLabelAction
public class ViewLabelAction
Action for viewing a label. The label can be specified by either using the labels name(s) or the labels id(s), but not both. 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.
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 |
Fields inherited from class com.atlassian.confluence.spaces.actions.AbstractSpaceAction |
---|
key, notificationManager, originalSpace, space, spaceManager, themeManager, wikiStyleRenderer |
Fields inherited from class com.atlassian.confluence.core.ConfluenceActionSupport |
---|
CANCEL, DEVMODE, eventManager, i18NBeanFactory, labelManager, languageManager, LICENSE_EXPIRED, LICENSE_USERS_EXCEEDED, messageHolder, permissionManager, permitted, pluginAccessor, 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 |
execute()
|
DisplayableLabel |
getAddLabel(Label label)
Returns a DisplayableLabel representing the currently viewed labels and the given label. |
List |
getContent()
|
String |
getDescription()
|
FriendlyDateFormatterHelper |
getFriendlyDateFormatterHelper()
|
String |
getFriendlyTitle()
|
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 |
setFriendlyTitle(String friendlyTitle)
|
void |
setIds(long[] ids)
|
void |
setSearchManager(SearchManager searchManager)
|
void |
setStartIndex(int startIndex)
|
void |
validate()
|
Methods inherited from class com.atlassian.confluence.labels.actions.AbstractLabelDisplayingAction |
---|
getPopularLabels, getRecentLabels, isSpaceRequired |
Methods inherited from class com.atlassian.confluence.spaces.actions.AbstractSpaceAction |
---|
getKey, getPermissionTypes, getSpace, getSpaceKey, getSubscribableName, getThemeManager, hasSpaceIA, isAdminUser, isPermitted, isPersonalSpace, isSuperUser, isUserWatchingSpace, isValidSpaceKey, setKey, setNotificationManager, setSpace, setSpaceManager, setThemeManager, setWikiStyleRenderer |
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 |
Methods inherited from interface com.atlassian.confluence.spaces.actions.SpaceAware |
---|
setSpace |
Methods inherited from interface com.atlassian.confluence.spaces.Spaced |
---|
getSpace |
Field Detail |
---|
public static final int ITEMS_PER_PAGE
protected PaginationSupport paginationSupport
public List preloadedPage
Constructor Detail |
---|
public ViewLabelAction()
Method Detail |
---|
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 for
Label
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 getFriendlyTitle()
public void setFriendlyTitle(String friendlyTitle)
public String getDescription()
public void setDescription(String description)
public FriendlyDateFormatterHelper getFriendlyDateFormatterHelper()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |