com.atlassian.confluence.labels
Class CombinedLabel

java.lang.Object
  extended by com.atlassian.confluence.labels.CombinedLabel
All Implemented Interfaces:
DisplayableLabel

public class CombinedLabel
extends java.lang.Object
implements DisplayableLabel


Field Summary
static java.lang.String ADD_SEPARATOR
           
 
Constructor Summary
CombinedLabel(java.util.List labels)
           
 
Method Summary
 java.lang.String getName()
          Returns the label's name only.
 java.lang.String getRealTitle()
          Return the title as a combination of the namespace and the label name.
 java.lang.String getUrlPath()
          Generates the url path for a label.
 java.lang.String getUrlPath(java.lang.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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ADD_SEPARATOR

public static final java.lang.String ADD_SEPARATOR
See Also:
Constant Field Values
Constructor Detail

CombinedLabel

public CombinedLabel(java.util.List labels)
Method Detail

isRealTitleSafeForUrl

public boolean isRealTitleSafeForUrl()
Description copied from interface: DisplayableLabel
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.

Specified by:
isRealTitleSafeForUrl in interface DisplayableLabel
Returns:
true if the label's title is safe to pass in the URL.

getName

public java.lang.String getName()
Description copied from interface: DisplayableLabel
Returns the label's name only.

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

Specified by:
getName in interface DisplayableLabel

getUrlPath

public java.lang.String getUrlPath()
Description copied from interface: DisplayableLabel
Generates the url path for a label.

Specified by:
getUrlPath in interface DisplayableLabel

getUrlPath

public java.lang.String getUrlPath(java.lang.String spaceKey)
Description copied from interface: DisplayableLabel
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, DisplayableLabel.getUrlPath() is called.

Specified by:
getUrlPath in interface DisplayableLabel

getRealTitle

public java.lang.String getRealTitle()
Description copied from interface: DisplayableLabel
Return the title as a combination of the namespace and the label name.

Specified by:
getRealTitle in interface DisplayableLabel


Copyright © 2003-2014 Atlassian. All Rights Reserved.