public class

PermittedLabelView

extends Object
implements Labelable
java.lang.Object
   ↳ com.atlassian.confluence.labels.PermittedLabelView

Class Overview

This wrapper exposes only those labels and functions of the labelable object that the specified user is permitted to view.

Summary

Fields
public static final Category log
Public Constructors
PermittedLabelView(Labelable original, User actingUser, boolean hideSpecialLabels)
Public Methods
Labelable getDelegate()
int getLabelCount()
Get the number of labels that are associated with this object.
List<Label> getLabels()
Retrieve the labels that are associated with this object.
boolean isFavourite(User user)
Is this object marked as somebody's favourite?
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.confluence.labels.Labelable

Fields

public static final Category log

Public Constructors

public PermittedLabelView (Labelable original, User actingUser, boolean hideSpecialLabels)

Public Methods

public Labelable getDelegate ()

public int getLabelCount ()

Get the number of labels that are associated with this object.

Returns
  • the number of labels associated with this object.

public List<Label> getLabels ()

Retrieve the labels that are associated with this object.

Returns
  • a list of label instances.

public boolean isFavourite (User user)

Is this object marked as somebody's favourite?

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