Package com.opensymphony.module.sitemesh.mapper

# 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.

Version:
  $Revision: 1.1 $
Author:
  Joe Walnes
See Also:
  - `Decorator`

## Field Summary

Fields
Modifier and Type
Field
Description
`protected String`
`name`
`protected String`
`page`
`protected Map`
`parameters`
`protected String`
`role`
`protected String`
`uriPath`

## Constructor Summary

Constructors
Constructor
Description
`DefaultDecorator(String name, String page, String uriPath, String role, Map parameters)`
Constructor to set all properties.
`DefaultDecorator(String name, String page, String uriPath, Map parameters)`
Constructor to set all properties.
`DefaultDecorator(String name, String page, Map parameters)`
Constructor to set name, page and parameters.

## Method Summary

Modifier and Type
Method
Description
`String`
`getInitParameter(String paramName)`
Returns a String containing the value of the named initialization parameter, or null if the parameter does not exist.
`Iterator`
`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.
`String`
`getName()`
Name of Decorator.
`String`
`getPage()`
URI of the Servlet/JSP to dispatch the request to (relative to the web-app context).
`String`
`getRole()`
Role the user has to be in to get this decorator applied.
`String`
`getURIPath()`
URI path of the Decorator.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### page

protected String page

See Also:
  - `getPage()`

### name

protected String name

See Also:
  - `getName()`

### uriPath

protected String uriPath

See Also:
  - `getURIPath()`

### role

protected String role

See Also:
  - `getRole()`

### parameters

protected Map parameters

See Also:
  - `getInitParameter(java.lang.String)`

## Constructor Details

### DefaultDecorator

public DefaultDecorator(String name, String page, Map parameters)
Constructor to set name, page and parameters.

### DefaultDecorator

public DefaultDecorator(String name, String page, String uriPath, Map parameters)
Constructor to set all properties.

### DefaultDecorator

public DefaultDecorator(String name, String page, String uriPath, String role, Map parameters)
Constructor to set all properties.

## 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`

### getName

public String getName()
Name of Decorator. For information purposes only.

Specified by:
  `getName` in interface `Decorator`

### getURIPath

public String getURIPath()
URI path of the Decorator. Enables support for decorators defined in seperate web-apps.

Specified by:
  `getURIPath` in interface `Decorator`

### getRole

public String getRole()
Role the user has to be in to get this decorator applied.

Specified by:
  `getRole` in interface `Decorator`

### 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 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`