Class DecoratorName
- java.lang.Object
-
- com.atlassian.confluence.setup.velocity.DecoratorName
-
public class DecoratorName extends Object
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
-
-
Constructor Summary
Constructors Constructor Description DecoratorName(String source)
DecoratorName(String spaceKey, String templateName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getSource()
String
getSpaceKey()
String
getTemplateName()
boolean
isGlobalDecorator()
boolean
isSpaceDecorator()
static boolean
isSpaceDecoratorSource(String source)
String
toString()
-
-
-
Constructor Detail
-
DecoratorName
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.
-
DecoratorName
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
-
-
Method Detail
-
isSpaceDecoratorSource
public static boolean isSpaceDecoratorSource(String source)
-
getSpaceKey
public String getSpaceKey()
- Returns:
- the space key of the space the decorator belongs to, or null if this decorator is a global decorator.
-
getTemplateName
public String getTemplateName()
-
isGlobalDecorator
public boolean isGlobalDecorator()
-
isSpaceDecorator
public boolean isSpaceDecorator()
-
getSource
public String getSource()
-
-