Class DefaultDecorator

java.lang.Object
com.opensymphony.module.sitemesh.mapper.DefaultDecorator
All Implemented Interfaces:
Decorator

public class DefaultDecorator extends Object implements Decorator
Default implementation of Decorator. All properties are set by the constructor.
Author:
Joe Walnes
See Also:
  • Field Details

  • Constructor Details

    • DefaultDecorator

      public DefaultDecorator(String name, String page, Map<Object,Object> parameters)
      Constructor to set name, page and parameters.
      Parameters:
      name - the name
      page - the page
      parameters - the parameters
    • DefaultDecorator

      public DefaultDecorator(String name, String page, String uriPath, Map<Object,Object> parameters)
      Constructor to set all properties.
      Parameters:
      name - the name
      page - the page
      uriPath - the uri path
      parameters - the parameters
    • DefaultDecorator

      public DefaultDecorator(String name, String page, String uriPath, String role, Map<Object,Object> parameters)
      Constructor to set all properties.
      Parameters:
      name - the name
      page - the page
      uriPath - the uri path
      role - the role
      parameters - the parameters
  • Method Details

    • getPage

      public String getPage()
      URI of the Servlet/JSP to dispatch the request to (relative to the web-app context).
      Specified by:
      getPage in interface Decorator
      Returns:
      the page
    • getName

      public String getName()
      Name of Decorator. For information purposes only.
      Specified by:
      getName in interface Decorator
      Returns:
      the name
    • getURIPath

      public String getURIPath()
      URI path of the Decorator. Enables support for decorators defined in seperate web-apps.
      Specified by:
      getURIPath in interface Decorator
      Returns:
      the URI path
    • getRole

      public String getRole()
      Role the user has to be in to get this decorator applied.
      Specified by:
      getRole in interface Decorator
      Returns:
      the role
    • getInitParameter

      public String getInitParameter(String paramName)
      Returns a String containing the value of the named initialization parameter, or null if the parameter does not exist.
      Specified by:
      getInitParameter in interface Decorator
      Parameters:
      paramName - Key of parameter.
      Returns:
      Value of parameter or null if not found.
    • getInitParameterNames

      public Iterator<Object> getInitParameterNames()
      Returns the names of the Decorator's initialization parameters as an Iterator of String objects, or an empty Iterator if the Decorator has no initialization parameters.
      Specified by:
      getInitParameterNames in interface Decorator
      Returns:
      the inits the parameter names