com.atlassian.confluence.labels
Class Label
java.lang.Object
com.atlassian.core.bean.EntityObject
com.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
|
Methods inherited from interface com.atlassian.confluence.core.Addressable |
getId |
log
public static final org.apache.log4j.Category log
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)
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()