Package com.atlassian.confluence.labels
Class Labelling
java.lang.Object
com.atlassian.core.bean.EntityObject
com.atlassian.confluence.core.AnnotatedEntityObject
com.atlassian.confluence.labels.Labelling
- All Implemented Interfaces:
Serializable,Cloneable
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 Summary
ConstructorsConstructorDescriptionAvailable so that newInstance can be used by hibernate to create this object.Labelling(Label label, EditableLabelable labelable, ConfluenceUser user) Labelling(Label label, EditableLabelable labelable, String user) Deprecated.since 5.2. -
Method Summary
Modifier and TypeMethodDescriptioncopy()copy(EditableLabelable labelable) Copies the current Labelling, but providing it with a new EditableLabelable.booleanprotected ContentEntityObjectlonggetId()getLabel()Getter for the content entity object associated with this labelling.protected PageTemplateinthashCode()protected voidprotected voidsetLabelable(EditableLabelable labelable) Setter for the content entity object associated with this labelling.protected voidsetPageTemplate(PageTemplate pageTemplate) toString()Methods inherited from class com.atlassian.confluence.core.AnnotatedEntityObject
getCreationDate, getLastModificationDateMethods inherited from class com.atlassian.core.bean.EntityObject
clone, getCurrentDate, setClock, setCreationDate, setId, setLastModificationDate
-
Constructor Details
-
Labelling
Deprecated.since 5.2.- Parameters:
label-labelable-user- the username of the user who owns this Labellings- Throws:
IllegalArgumentException- if the user does not identify a known user
-
Labelling
-
Labelling
public Labelling()Available so that newInstance can be used by hibernate to create this object.
-
-
Method Details
-
getId
public long getId()- Overrides:
getIdin classcom.atlassian.core.bean.EntityObject
-
getLableable
Getter for the content entity object associated with this labelling.- Returns:
- content
-
setLabelable
Setter for the content entity object associated with this labelling. -
getLabel
-
getOwningUser
- Since:
- 5.2
-
equals
- Overrides:
equalsin classcom.atlassian.core.bean.EntityObject
-
hashCode
public int hashCode()- Overrides:
hashCodein classcom.atlassian.core.bean.EntityObject
-
toString
-
getPageTemplate
-
setPageTemplate
-
getContent
-
setContent
-
copy
-
copy
Copies the current Labelling, but providing it with a new EditableLabelable.
-