org.springframework.web.portlet.context
Class DefaultPortletEnvironment

java.lang.Object
  extended by org.springframework.core.env.AbstractEnvironment
      extended by org.springframework.core.env.DefaultEnvironment
          extended by org.springframework.web.portlet.context.DefaultPortletEnvironment
All Implemented Interfaces:
ConfigurableEnvironment, ConfigurablePropertyResolver, Environment, PropertyResolver

public class DefaultPortletEnvironment
extends DefaultEnvironment

Environment implementation to be used by Servlet-based web applications. All Portlet-related ApplicationContext classes initialize an instance by default.

Contributes ServletContext-, PortletContext-, and PortletConfig-based PropertySource instances. See the DefaultPortletEnvironment() constructor for details.

Since:
3.1
Author:
Chris Beams
See Also:
DefaultEnvironment, DefaultWebEnvironment

Field Summary
static String PORTLET_CONFIG_PROPERTY_SOURCE_NAME
          Portlet config init parameters property source name: "portletConfigInitParams"
static String PORTLET_CONTEXT_PROPERTY_SOURCE_NAME
          Portlet context init parameters property source name: "portletContextInitParams"
 
Fields inherited from class org.springframework.core.env.DefaultEnvironment
SYSTEM_ENVIRONMENT_PROPERTY_SOURCE_NAME, SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAME
 
Fields inherited from class org.springframework.core.env.AbstractEnvironment
ACTIVE_PROFILES_PROPERTY_NAME, DEFAULT_PROFILES_PROPERTY_NAME, logger
 
Constructor Summary
DefaultPortletEnvironment()
          Create a new Environment populated with the property sources contributed by superclasses as well as: "portletConfigInitParams" "portletContextInitParams" "servletContextInitParams"
 
Method Summary
 
Methods inherited from class org.springframework.core.env.AbstractEnvironment
acceptsProfiles, containsProperty, doGetActiveProfiles, doGetDefaultProfiles, getActiveProfiles, getConversionService, getDefaultProfiles, getProperty, getProperty, getPropertyResolver, getPropertySources, getRequiredProperty, getRequiredProperty, getSystemEnvironment, getSystemProperties, resolvePlaceholders, resolveRequiredPlaceholders, setActiveProfiles, setConversionService, setDefaultProfiles, setPlaceholderPrefix, setPlaceholderSuffix, setValueSeparator, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PORTLET_CONTEXT_PROPERTY_SOURCE_NAME

public static final String PORTLET_CONTEXT_PROPERTY_SOURCE_NAME
Portlet context init parameters property source name: "portletContextInitParams"

See Also:
Constant Field Values

PORTLET_CONFIG_PROPERTY_SOURCE_NAME

public static final String PORTLET_CONFIG_PROPERTY_SOURCE_NAME
Portlet config init parameters property source name: "portletConfigInitParams"

See Also:
Constant Field Values
Constructor Detail

DefaultPortletEnvironment

public DefaultPortletEnvironment()
Create a new Environment populated with the property sources contributed by superclasses as well as:

Properties present in "portletConfigInitParams" will take precedence over those in "portletContextInitParams", which takes precedence over those in . Properties in either will take precedence over system properties and environment variables.

The property sources are added as stubs for now, and will be fully initialized once the actual PortletConfig, PortletContext, and ServletContext objects are available.

See Also:
DefaultEnvironment.DefaultEnvironment(), PortletConfigPropertySource, PortletContextPropertySource, AbstractApplicationContext.initPropertySources(), PortletApplicationContextUtils.initPortletPropertySources(org.springframework.core.env.MutablePropertySources, javax.servlet.ServletContext, javax.portlet.PortletContext, javax.portlet.PortletConfig)