public class

Labelling

extends EntityObject
implements Serializable
java.lang.Object
   ↳ com.atlassian.core.bean.EntityObject
     ↳ com.atlassian.confluence.labels.Labelling

Class Overview

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.

Summary

Public Constructors
Labelling(Label label, EditableLabelable labelable, String user)
@Deprecated Labelling(Label label, EditableLabelable content, String user, String spaceKey)
This constructor is deprecated. since 2.10. The Labelling object is only associated with a space through the content. Use #Labelling(Label, ContentEntityObject, String) instead.
Labelling()
Available so that newInstance can be used by hibernate to create this object.
Public Methods
Labelling copy()
boolean equals(Object o)
Label getLabel()
EditableLabelable getLableable()
Getter for the content entity object associated with this labelling.
@Deprecated String getSpaceKey()
This method is deprecated. since 2.10. Use getLableable() and check if it is a SpaceContentEntityObject. If it is, cast it and call getSpaceKey() on it
String getUser()
int hashCode()
void setSpaceKey(String spaceKey)
This method is deprecated. since 2.10. The Labelling object is only associated with a space through the content.
String toString()
Protected Methods
Attachment getAttachment()
ContentEntityObject getContent()
Long getLabelableId()
String getLabelableType()
PageTemplate getPageTemplate()
void setAttachment(Attachment attachment)
void setContent(ContentEntityObject ceo)
void setLabelable(EditableLabelable labelable)
Setter for the content entity object associated with this labelling.
void setLabelableId(Long id)
void setLabelableType(String type)
void setPageTemplate(PageTemplate pageTemplate)
[Expand]
Inherited Methods
From class com.atlassian.core.bean.EntityObject
From class java.lang.Object

Public Constructors

public Labelling (Label label, EditableLabelable labelable, String user)

@Deprecated public Labelling (Label label, EditableLabelable content, String user, String spaceKey)

This constructor is deprecated.
since 2.10. The Labelling object is only associated with a space through the content. Use #Labelling(Label, ContentEntityObject, String) instead.

public Labelling ()

Available so that newInstance can be used by hibernate to create this object.

Public Methods

public Labelling copy ()

public boolean equals (Object o)

public Label getLabel ()

public EditableLabelable getLableable ()

Getter for the content entity object associated with this labelling.

Returns
  • content

@Deprecated public String getSpaceKey ()

This method is deprecated.
since 2.10. Use getLableable() and check if it is a SpaceContentEntityObject. If it is, cast it and call getSpaceKey() on it

public String getUser ()

public int hashCode ()

public void setSpaceKey (String spaceKey)

This method is deprecated.
since 2.10. The Labelling object is only associated with a space through the content.

public String toString ()

Protected Methods

protected Attachment getAttachment ()

protected ContentEntityObject getContent ()

protected Long getLabelableId ()

protected String getLabelableType ()

protected PageTemplate getPageTemplate ()

protected void setAttachment (Attachment attachment)

protected void setContent (ContentEntityObject ceo)

protected void setLabelable (EditableLabelable labelable)

Setter for the content entity object associated with this labelling.

protected void setLabelableId (Long id)

protected void setLabelableType (String type)

protected void setPageTemplate (PageTemplate pageTemplate)