public class

DecoratorName

extends Object
java.lang.Object
   ↳ com.atlassian.confluence.setup.velocity.DecoratorName

Class Overview

Encapsulates the logic around creating and parsing decorator path names. These are in the form:

  • @[space-key]/[template-name] -- custom space decorators
  • /[template-name]/ -- global decorators
The leading slash may be omitted from global decorator paths.

Summary

Public Constructors
DecoratorName(String spaceKey, String templateName)
DecoratorName(String source)
Public Methods
String getSource()
String getSpaceKey()
String getTemplateName()
boolean isGlobalDecorator()
boolean isSpaceDecorator()
static boolean isSpaceDecoratorSource(String source)
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public DecoratorName (String spaceKey, String templateName)

Parameters
spaceKey if a space custom decorator the key of the space, otherwise null.
templateName the name of the template, usually a path on the filesystem.

public DecoratorName (String source)

Parameters
source the full path of the decorator, which will be split according to the decorator path name rules.
Throws
IllegalArgumentException if there is a problem parsing the source

Public Methods

public String getSource ()

public String getSpaceKey ()

Returns
  • the space key of the space the decorator belongs to, or null if this decorator is a global decorator.

public String getTemplateName ()

public boolean isGlobalDecorator ()

public boolean isSpaceDecorator ()

public static boolean isSpaceDecoratorSource (String source)

public String toString ()