net.sf.jasperreports.jsf.config
Class Configuration

java.lang.Object
  extended by net.sf.jasperreports.jsf.config.Configuration

public final class Configuration
extends Object

Webapp singleton instance used to hold the plugin's relevant information about current webapp faces' configuration.

Author:
A. Alonso Dominguez

Field Summary
protected static String INSTANCE_KEY
          Singleton instance key.
 
Constructor Summary
protected Configuration(javax.faces.context.ExternalContext context)
          Constructor from a faces' external context.
protected Configuration(javax.servlet.ServletContext context)
          Constructor from a servlet context.
 
Method Summary
 String getDefaultMapping()
          Obtains the default faces' mapping.
 Collection<String> getFacesMappings()
          Obtains the collection of faces' servlet mappings.
static Configuration getInstance(javax.faces.context.ExternalContext context)
          Obtains the singleton configuration instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE_KEY

protected static final String INSTANCE_KEY
Singleton instance key.

Constructor Detail

Configuration

protected Configuration(javax.servlet.ServletContext context)
                 throws ConfigurationException
Constructor from a servlet context.

Parameters:
context - a servlet context.
Throws:
ConfigurationException - if application is not properly configured.

Configuration

protected Configuration(javax.faces.context.ExternalContext context)
                 throws ConfigurationException
Constructor from a faces' external context.

Parameters:
context - a faces' external context.
Throws:
ConfigurationException - if application is not properly configured.
Method Detail

getInstance

public static Configuration getInstance(javax.faces.context.ExternalContext context)
                                 throws ConfigurationException
Obtains the singleton configuration instance.

If there is not any configuration instance preloaded, the application configuration files will be parsed and loaded into the application scope map.

Parameters:
context - current faces' external context
Returns:
the singleton instance
Throws:
ConfigurationException - if application is not properly configured.

getDefaultMapping

public String getDefaultMapping()
Obtains the default faces' mapping.

Returns:
a faces' mapping.

getFacesMappings

public Collection<String> getFacesMappings()
Obtains the collection of faces' servlet mappings.

Returns:
the faces' mappings.


Copyright © 2011 SourceForge.net. All Rights Reserved.