org.chwf.servlet.view
Class PageConfig

java.lang.Object
  |
  +--org.chwf.servlet.view.PageConfig

public class PageConfig
extends java.lang.Object

Class that exposes information about the page configuration. It wraps the appropriate Config with type-safe accessors.


Field Summary
static java.lang.String ENCRYPTION_ALWAYS
          Encryption level forcing encryption: "ALWAYS".
static java.lang.String ENCRYPTION_AS_REQUESTED
          Encryption level leaving encryption unchanged: "AS_REQUESTED".
static java.lang.String ENCRYPTION_NEVER
          Encryption level forcing non-encryption: "NEVER".
static java.lang.String PAGE_CONFIG
          Directory for page configuration.
static java.lang.String PAGE_CONFIG_MAP
          Request attribute caching the page config map: "page_config_map".
 
Constructor Summary
PageConfig(java.lang.String resource)
          Constructor.
 
Method Summary
 java.util.Map getConfigMap()
          Get page config data as a map.
static PageConfig getPageConfig(javax.servlet.ServletRequest request)
          Get the view config for this request.
 java.lang.String getPageTemplate()
          The page template.
 Config getRawConfig()
          The page raw configuration data.
 java.lang.String getResource()
          The resource file for page configuration.
 java.lang.String getSecurityEncryption()
          The security encryption level: "ALWAYS", "NEVER" or "AS_REQUESTED".
 java.lang.String getSecurityLogin()
          The login page.
 java.lang.String[] getSecurityRoles()
          The security roles.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PAGE_CONFIG

public static final java.lang.String PAGE_CONFIG
Directory for page configuration.

ENCRYPTION_ALWAYS

public static final java.lang.String ENCRYPTION_ALWAYS
Encryption level forcing encryption: "ALWAYS".

ENCRYPTION_AS_REQUESTED

public static final java.lang.String ENCRYPTION_AS_REQUESTED
Encryption level leaving encryption unchanged: "AS_REQUESTED".

ENCRYPTION_NEVER

public static final java.lang.String ENCRYPTION_NEVER
Encryption level forcing non-encryption: "NEVER".

PAGE_CONFIG_MAP

public static final java.lang.String PAGE_CONFIG_MAP
Request attribute caching the page config map: "page_config_map".
Constructor Detail

PageConfig

public PageConfig(java.lang.String resource)
Constructor.
Parameters:
resource - The resource for the config.
Method Detail

getPageConfig

public static PageConfig getPageConfig(javax.servlet.ServletRequest request)
Get the view config for this request.
Parameters:
request - The request.
Returns:
The config.

getResource

public java.lang.String getResource()
The resource file for page configuration.
Returns:
The resource file for page configuration.

getPageTemplate

public java.lang.String getPageTemplate()
The page template.
Returns:
The page template, or null if there isn't one.

getSecurityRoles

public java.lang.String[] getSecurityRoles()
The security roles.
Returns:
The page template, or null if there isn't one.

getSecurityLogin

public java.lang.String getSecurityLogin()
The login page.
Returns:
The login page, or null if there isn't one.

getSecurityEncryption

public java.lang.String getSecurityEncryption()
The security encryption level: "ALWAYS", "NEVER" or "AS_REQUESTED".
Returns:
The security encryption level.

getRawConfig

public Config getRawConfig()
The page raw configuration data. You can use it to query generic configuration properties.
Returns:
The raw configuration.

getConfigMap

public java.util.Map getConfigMap()
Get page config data as a map. Useful for expose data to scripting environments (e.g. JSTL EL).
Returns:
The config data in a wrapped in a map.


Copyright © 2002-2004, Paul Strack. All Rights Reserved.