Package com.atlassian.confluence.core
Class AbstractLabelableEntityObject
java.lang.Object
com.atlassian.core.bean.EntityObject
com.atlassian.confluence.core.AnnotatedEntityObject
com.atlassian.confluence.core.ConfluenceEntityObject
com.atlassian.confluence.core.AbstractVersionedEntityObject
com.atlassian.confluence.core.AbstractLabelableEntityObject
- All Implemented Interfaces:
Versioned,EditableLabelable,Labelable,Serializable,Cloneable
- Direct Known Subclasses:
ContentEntityObject,PageTemplate
public abstract class AbstractLabelableEntityObject
extends AbstractVersionedEntityObject
implements EditableLabelable
- See Also:
-
Field Summary
Fields inherited from class com.atlassian.confluence.core.AbstractVersionedEntityObject
INITIAL_VERSION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLabelling(Labelling content) clone()getGlobalLabels(com.atlassian.user.User user) Deprecated, for removal: This API element is subject to removal in a future version.intGet the number of labels that are associated with this object.Retrieve the labels that are associated with this object.getLabelsForDisplay(com.atlassian.user.User user) List the labels on this content that are visible to a particular user, and should be shown in a list of labels.getPersonalLabels(com.atlassian.user.User user) Deprecated, for removal: This API element is subject to removal in a future version.getTeamLabels(com.atlassian.user.User user) Deprecated, for removal: This API element is subject to removal in a future version.getVisibleLabels(com.atlassian.user.User user) List the labels on this content that are visible to a particular userbooleanisFavourite(ConfluenceUser user) Is this object marked as somebody's favourite?voidremoveLabelling(Labelling labelling) protected voidsetLabellings(List<Labelling> labellings) Methods inherited from class com.atlassian.confluence.core.AbstractVersionedEntityObject
convertToHistoricalVersion, getConfluenceRevision, getLatestVersion, getVersion, getVersionChildPolicy, isLatestVersion, isNew, setOriginalVersion, setVersionMethods inherited from class com.atlassian.confluence.core.ConfluenceEntityObject
getCreator, getCreatorName, getLastModifier, getLastModifierName, getRealClass, isPersistent, setCreator, setLastModifierMethods inherited from class com.atlassian.confluence.core.AnnotatedEntityObject
getCreationDate, getLastModificationDateMethods inherited from class com.atlassian.core.bean.EntityObject
equals, getCurrentDate, getId, hashCode, setClock, setCreationDate, setId, setLastModificationDateMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.confluence.labels.EditableLabelable
getId, getTitle, isPersistentMethods inherited from interface com.atlassian.confluence.core.Versioned
applyChildVersioningPolicy
-
Constructor Details
-
AbstractLabelableEntityObject
public AbstractLabelableEntityObject()
-
-
Method Details
-
getLabels
Description copied from interface:LabelableRetrieve the labels that are associated with this object. -
getLabelCount
public int getLabelCount()Description copied from interface:LabelableGet the number of labels that are associated with this object.- Specified by:
getLabelCountin interfaceLabelable- Returns:
- the number of labels associated with this object.
-
isFavourite
Description copied from interface:LabelableIs this object marked as somebody's favourite?- Specified by:
isFavouritein interfaceLabelable- Parameters:
user- the user who is being checked against. If user is null this method must always return false (anonymous users can not mark anything as a favourite, obviously)- Returns:
- true if the labelable object is a 'favourite' of a given user, false otherwise
-
getVisibleLabels
List the labels on this content that are visible to a particular user- Parameters:
user- the user- Returns:
- the labels on this content visible to that user
-
getPersonalLabels
@Deprecated(forRemoval=true, since="9.3") public List<Label> getPersonalLabels(com.atlassian.user.User user) Deprecated, for removal: This API element is subject to removal in a future version.List the labels on this content that are personal labels for a particular user- Parameters:
user- the user- Returns:
- the personal labels on this content visible to the user
-
getGlobalLabels
@Deprecated(forRemoval=true, since="9.3") public List<Label> getGlobalLabels(com.atlassian.user.User user) Deprecated, for removal: This API element is subject to removal in a future version.List the labels on this content that are global labels- Parameters:
user- the user- Returns:
- the global labels on this content visible to the user
-
getTeamLabels
@Deprecated(forRemoval=true, since="9.3") public List<Label> getTeamLabels(com.atlassian.user.User user) Deprecated, for removal: This API element is subject to removal in a future version.List the labels on this content that are team labels for a particular user- Parameters:
user- the user- Returns:
- the team labels on this content visible to the user
-
getLabelsForDisplay
List the labels on this content that are visible to a particular user, and should be shown in a list of labels. This is like {code}getVisibleLabels{code} except that it also filters out special labels like favourites- Parameters:
user- the user- Returns:
- the labels on this content visible to that user
-
setLabellings
-
getLabellings
- Specified by:
getLabellingsin interfaceEditableLabelable
-
addLabelling
- Specified by:
addLabellingin interfaceEditableLabelable
-
removeLabelling
- Specified by:
removeLabellingin interfaceEditableLabelable
-
clone
- Overrides:
clonein classcom.atlassian.core.bean.EntityObject- Throws:
CloneNotSupportedException
-
LabelPermissionEnforcer.filterLabelsByNamespace(List, User, Namespace)