Package com.atlassian.confluence.labels
Class ParsedLabelName
- java.lang.Object
-
- com.atlassian.confluence.labels.ParsedLabelName
-
public class ParsedLabelName extends Object
The label reference object encapsulates the unique string representation of a label within confluence.
-
-
Constructor Summary
Constructors Constructor Description ParsedLabelName(String name)
ParsedLabelName(String name, @Nullable String owner)
ParsedLabelName(String name, @Nullable String owner, String prefix)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Label
addLabel(Labelable labelable, LabelManager labelManager)
boolean
equals(Object obj)
String
getName()
The label name.@Nullable String
getOwner()
The name of the labels owner, or null if this label does not have an owner.String
getPrefix()
int
hashCode()
boolean
isOwnerSpecified()
void
setPrefix(String prefix)
Label
toLabel()
Creates a personal, team or global Label object from the parsed name.Label
toLabel(@Nullable ConfluenceUser user)
Creates a personal, team or global Label object from the parsed name with the given owner.
-
-
-
Method Detail
-
getName
public String getName()
The label name.
-
getOwner
public @Nullable String getOwner()
The name of the labels owner, or null if this label does not have an owner.
-
getPrefix
public String getPrefix()
-
setPrefix
public void setPrefix(String prefix)
-
isOwnerSpecified
@EnsuresNonNullIf(expression="getOwner()", result=true) public boolean isOwnerSpecified()
-
addLabel
public Label addLabel(Labelable labelable, LabelManager labelManager)
-
toLabel
public Label toLabel()
Creates a personal, team or global Label object from the parsed name.
-
toLabel
public Label toLabel(@Nullable ConfluenceUser user)
Creates a personal, team or global Label object from the parsed name with the given owner.- Parameters:
user
- For personal or global labels, overrides the original user of the label.
-
-