Class 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
    The leading slash may be omitted from global decorator paths.
    • 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()