com.atlassian.confluence.labels
Class Label

java.lang.Object
  extended bycom.atlassian.core.bean.EntityObject
      extended bycom.atlassian.confluence.labels.Label
All Implemented Interfaces:
Addressable, Cloneable, Comparable, Serializable

public class Label
extends EntityObject
implements Comparable, Addressable, Serializable

See Also:
Serialized Form

Field Summary
static org.apache.log4j.Category log
           
 
Constructor Summary
Label()
           
Label(String name)
           
Label(String name, Namespace namespace)
           
Label(String name, Namespace namespace, String owner)
           
Label(String name, String namespace, String owner)
           
 
Method Summary
 int compareTo(Object o)
           
 boolean equals(Object o)
          Equals implementation is a value based implementation.
 String getName()
           
 Namespace getNamespace()
           
 String getOwner()
           
 String getRealTitle()
           
 String getType()
           
 String getUrlPath()
           
 int hashCode()
           
 boolean isNew()
           
 boolean isPersistent()
          This label is persistent iff the id is not 0.
 boolean isTeamLabel()
           
 boolean isVisibleTo(String username)
          Determines whether the label should be made visible to a particular user.
 String toString()
           
 String toStringWithNamespace()
           
 String toStringWithOwnerPrefix()
           
 
Methods inherited from class com.atlassian.core.bean.EntityObject
clone, getCreationDate, getCurrentDate, getId, getLastModificationDate, setClock, setCreationDate, setId, setLastModificationDate
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.atlassian.confluence.core.Addressable
getId
 

Field Detail

log

public static final org.apache.log4j.Category log
Constructor Detail

Label

public Label()

Label

public Label(String name)

Label

public Label(String name,
             Namespace namespace)

Label

public Label(String name,
             String namespace,
             String owner)

Label

public Label(String name,
             Namespace namespace,
             String owner)
Method Detail

getName

public String getName()

getOwner

public String getOwner()

getNamespace

public Namespace getNamespace()

getType

public String getType()
Specified by:
getType in interface Addressable

equals

public boolean equals(Object o)
Equals implementation is a value based implementation. It does not take into account the 'persistence' state of this label instance.

Parameters:
o -
Returns:
true if the specified object is considered value equivalent.

hashCode

public int hashCode()

compareTo

public int compareTo(Object o)
Specified by:
compareTo in interface Comparable

getRealTitle

public String getRealTitle()
Specified by:
getRealTitle in interface Addressable

getUrlPath

public String getUrlPath()
Specified by:
getUrlPath in interface Addressable

isNew

public boolean isNew()

isPersistent

public boolean isPersistent()
This label is persistent iff the id is not 0.

Returns:
true if this instance is a persisted label.

isVisibleTo

public boolean isVisibleTo(String username)
Determines whether the label should be made visible to a particular user. This does not check the permissions on labelled content, you will need to do that separately

Parameters:
username - the username of the user who wishes to see the label
Returns:
true if the user is permitted to see it, false otherwise

toStringWithOwnerPrefix

public String toStringWithOwnerPrefix()

toString

public String toString()

toStringWithNamespace

public String toStringWithNamespace()

isTeamLabel

public boolean isTeamLabel()


Confluence is developed by Atlassian.