Class AddLabelAction

java.lang.Object
org.apache.struts2.ActionSupport
com.opensymphony.xwork2.ActionSupport
All Implemented Interfaces:
Beanable, WebInterface, MessageHolderAware, com.opensymphony.xwork2.Action, com.opensymphony.xwork2.interceptor.ValidationAware, com.opensymphony.xwork2.LocaleProvider, com.opensymphony.xwork2.TextProvider, com.opensymphony.xwork2.Validateable, Serializable, org.apache.struts2.action.Action, org.apache.struts2.interceptor.ValidationAware, org.apache.struts2.Validateable

public final class AddLabelAction extends ConfluenceActionSupport implements Beanable
Adds a label to a page or blog post Used for JSON requests, a list of the labels added are available under the 'labels' key of the bean.
See Also:
  • Constructor Details

    • AddLabelAction

      public AddLabelAction()
  • Method Details

    • getBean

      public Map<String,Collection<Label>> getBean()
      Specified by:
      getBean in interface Beanable
    • execute

      public String execute()
      Specified by:
      execute in interface org.apache.struts2.action.Action
      Overrides:
      execute in class org.apache.struts2.ActionSupport
    • isPermitted

      public boolean isPermitted()
      Description copied from class: ConfluenceActionSupport
      Overrides:
      isPermitted in class ConfluenceActionSupport
    • getCommand

      protected AddLabelsCommand getCommand()
    • getEntity

      public Labelable getEntity()
      Used so that the links are correctly built when JS is disabled
      Returns:
      The entity the label is added to
    • setEntityId

      public void setEntityId(long entityId)
    • setLabelString

      public void setLabelString(String labelString)
    • setLabelsService

      public void setLabelsService(LabelsService labelsService)
    • setEntityType

      public void setEntityType(String type)
    • getEntityType

      public String getEntityType()