Class Factory

java.lang.Object
com.opensymphony.module.sitemesh.Factory
All Implemented Interfaces:
PageParserSelector
Direct Known Subclasses:
BaseFactory

public abstract class Factory extends Object implements PageParserSelector
Factory responsible for creating appropriate instances of implementations. This is specific to a web context and is obtained through getInstance(com.opensymphony.module.sitemesh.Config).

The actual Factory method used is determined by the enviroment entry sitemesh.factory. If this doesn't exist, it defaults to DefaultFactory .

Author:
Joe Walnes
  • Constructor Details

    • Factory

      public Factory()
  • Method Details

    • getInstance

      public static Factory getInstance(Config config)
      Entry-point for obtaining singleton instance of Factory. The default factory class that will be instantiated can be overridden with the environment entry sitemesh.factory.
      Parameters:
      config - the config
      Returns:
      single instance of Factory
    • refresh

      public abstract void refresh()
      Refresh.
    • getDecoratorMapper

      public abstract DecoratorMapper getDecoratorMapper()
      Return instance of DecoratorMapper.
      Returns:
      the decorator mapper
    • isPathExcluded

      public abstract boolean isPathExcluded(String path)
      Determine whether the given path should be excluded from decoration or not.
      Parameters:
      path - the path
      Returns:
      true, if is path excluded