Class AddFavouriteAction

java.lang.Object
com.opensymphony.xwork2.ActionSupport
com.atlassian.confluence.core.ConfluenceActionSupport
com.atlassian.confluence.labels.actions.AddFavouriteAction
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

public final class AddFavouriteAction extends ConfluenceActionSupport implements Beanable
Makes a page or blogpost the favourite of the specified user. Used for JSON requests, a list of the labels added are available under the 'labels' key of the bean.
See Also:
  • Constructor Details

    • AddFavouriteAction

      public AddFavouriteAction()
  • Method Details

    • getBean

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

      public String execute()
      Specified by:
      execute in interface com.opensymphony.xwork2.Action
      Overrides:
      execute in class com.opensymphony.xwork2.ActionSupport
    • isPermitted

      public boolean isPermitted()
      Overrides:
      isPermitted in class ConfluenceActionSupport
    • getEntity

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

      protected AddLabelsCommand getCommand()
    • setEntityId

      public void setEntityId(long entityId)
    • setLabelsService

      public void setLabelsService(LabelsService labelsService)