|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.opensymphony.xwork.ActionSupport
com.atlassian.confluence.core.ConfluenceActionSupport
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, space |
Fields inherited from class com.atlassian.confluence.core.ConfluenceActionSupport |
---|
CANCEL, DEVMODE, eventManager, i18NBeanFactory, labelManager, languageManager, LICENSE_EXPIRED, LICENSE_USERS_EXCEEDED, log, 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()
|
DisplayableLabel |
getLabel()
Returns a DisplayableLabel based on all the labels being viewed. |
List |
getLabels()
|
List<DisplayableLabel> |
getOtherLabels(ContentEntityObject 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 |
setIds(long[] ids)
|
void |
setSmartListManager(SmartListManager smartListManager)
|
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.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 |
---|
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 setSmartListManager(SmartListManager smartListManager)
public List getLabels()
public List getContent()
public List getRelated()
public PaginationSupport getPaginationSupport()
public void validate()
validate
in interface Validateable
validate
in class ActionSupport
public String execute() throws Exception
execute
in interface Action
execute
in class ActionSupport
Exception
public boolean isViewPermissionRequired()
isViewPermissionRequired
in interface SpaceAware
isViewPermissionRequired
in class AbstractLabelDisplayingAction
public List<DisplayableLabel> getOtherLabels(ContentEntityObject 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)
public String getPaginationUrl()
public WebInterfaceContext getWebInterfaceContext()
WebInterface
getWebInterfaceContext
in interface WebInterface
getWebInterfaceContext
in class ConfluenceActionSupport
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |