com.atlassian.confluence.setup.velocity
Class DecoratorName

java.lang.Object
  extended by 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:

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)
           
 
Method Summary
 java.lang.String getSource()
           
 java.lang.String getSpaceKey()
           
 java.lang.String getTemplateName()
           
 boolean isGlobalDecorator()
           
 boolean isSpaceDecorator()
           
static boolean isSpaceDecoratorSource(java.lang.String source)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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
Method Detail

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.