com.atlassian.confluence.setup.velocity
Class DecoratorName
java.lang.Object
com.atlassian.confluence.setup.velocity.DecoratorName
public class DecoratorName
- extends java.lang.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
The leading slash may be omitted from global decorator paths.
Constructor Summary |
DecoratorName(java.lang.String source)
|
DecoratorName(java.lang.String spaceKey,
java.lang.String templateName)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DecoratorName
public DecoratorName(java.lang.String spaceKey,
java.lang.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(java.lang.String source)
- Parameters:
source
- the full path of the decorator, which will be split according to the
decorator path name rules.
- Throws:
java.lang.IllegalArgumentException
- if there is a problem parsing the source
isSpaceDecoratorSource
public static boolean isSpaceDecoratorSource(java.lang.String source)
getSpaceKey
public java.lang.String getSpaceKey()
- Returns:
- the space key of the space the decorator belongs to, or null
if this decorator is a global decorator.
getTemplateName
public java.lang.String getTemplateName()
isGlobalDecorator
public boolean isGlobalDecorator()
isSpaceDecorator
public boolean isSpaceDecorator()
getSource
public java.lang.String getSource()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2003-2014 Atlassian. All Rights Reserved.