public interface

DisplayableLabel

com.atlassian.confluence.labels.DisplayableLabel
Known Indirect Subclasses

Class Overview

Provides getter methods for a Label that can be displayed.

Summary

Public Methods
String getName()
Returns the label's name only.
String getRealTitle()
Return the title as a combination of the namespace and the label name.
String getUrlPath()
Generates the url path for a label.
String getUrlPath(String spaceKey)
Generates the url path for a label in the context of a given space i.e.
boolean isRealTitleSafeForUrl()
Returns true if the label's title is safe to pass in the URL.

Public Methods

public String getName ()

Returns the label's name only.

eg. label name for label my:foo is "foo".

public String getRealTitle ()

Return the title as a combination of the namespace and the label name.

public String getUrlPath ()

Generates the url path for a label.

public String getUrlPath (String spaceKey)

Generates the url path for a label in the context of a given space i.e. the user is taken to a page that contains content for that space only. If no space if provided, getUrlPath() is called.

public boolean isRealTitleSafeForUrl ()

Returns true if the label's title is safe to pass in the URL.

eg. my:foo is safe, perc% is not safe. chicken+cheese is safe in a "combined" label.

Returns
  • true if the label's title is safe to pass in the URL.