Class Labelling

java.lang.Object
com.atlassian.core.bean.EntityObject
com.atlassian.confluence.labels.Labelling
All Implemented Interfaces:
Serializable, Cloneable

public class Labelling extends com.atlassian.core.bean.EntityObject implements Serializable
An ostensibly immutable object that represents the link between labels and the content they label.

This represents a union type, internally only one of content, attachment or pagetemplate should be not null for any instance of a Labelling, this is what will be returned from getContent.

The labelableType and labelableId fields in this class are summary fields, and are present to make the queries around popular and related labels easier.

See Also:
  • Constructor Details

  • Method Details

    • getLableable

      public EditableLabelable getLableable()
      Getter for the content entity object associated with this labelling.
      Returns:
      content
    • setLabelable

      protected void setLabelable(EditableLabelable labelable)
      Setter for the content entity object associated with this labelling.
    • getLabel

      public Label getLabel()
    • getOwningUser

      public ConfluenceUser getOwningUser()
      Since:
      5.2
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class com.atlassian.core.bean.EntityObject
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class com.atlassian.core.bean.EntityObject
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getPageTemplate

      protected PageTemplate getPageTemplate()
    • getContent

      protected ContentEntityObject getContent()
    • setPageTemplate

      protected void setPageTemplate(PageTemplate pageTemplate)
    • setContent

      protected void setContent(ContentEntityObject ceo)
    • copy

      public Labelling copy()
    • copy

      public Labelling copy(EditableLabelable labelable)
      Copies the current Labelling, but providing it with a new EditableLabelable.