com.atlassian.confluence.labels
Class PermittedLabelView

java.lang.Object
  extended by com.atlassian.confluence.labels.PermittedLabelView
All Implemented Interfaces:
Labelable

public class PermittedLabelView
extends java.lang.Object
implements Labelable

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


Field Summary
static org.apache.log4j.Category log
          Deprecated. since 5.5, use private logger
 
Constructor Summary
PermittedLabelView(Labelable original, com.atlassian.user.User actingUser, boolean hideSpecialLabels)
           
 
Method Summary
 Labelable getDelegate()
           
 int getLabelCount()
          Get the number of labels that are associated with this object.
 java.util.List<Label> getLabels()
          Retrieve the labels that are associated with this object.
 boolean isFavourite(ConfluenceUser user)
          Is this object marked as somebody's favourite?
 boolean isFavourite(com.atlassian.user.User user)
          Deprecated. 
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

@Deprecated
public static final org.apache.log4j.Category log
Deprecated. since 5.5, use private logger
Constructor Detail

PermittedLabelView

public PermittedLabelView(Labelable original,
                          com.atlassian.user.User actingUser,
                          boolean hideSpecialLabels)
Method Detail

getLabels

public java.util.List<Label> getLabels()
Description copied from interface: Labelable
Retrieve the labels that are associated with this object.

Specified by:
getLabels in interface Labelable
Returns:
a list of label instances.

getLabelCount

public int getLabelCount()
Description copied from interface: Labelable
Get the number of labels that are associated with this object.

Specified by:
getLabelCount in interface Labelable
Returns:
the number of labels associated with this object.

isFavourite

public boolean isFavourite(ConfluenceUser user)
Description copied from interface: Labelable
Is this object marked as somebody's favourite?

Specified by:
isFavourite in interface Labelable
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

isFavourite

@Deprecated
public boolean isFavourite(com.atlassian.user.User user)
Deprecated. 

Specified by:
isFavourite in interface Labelable

getDelegate

public Labelable getDelegate()


Copyright © 2003-2014 Atlassian. All Rights Reserved.