Rename {Default=>Standard}PortletEnvironment
Issue: SPR-8348
This commit is contained in:
@@ -39,7 +39,7 @@ import org.springframework.core.io.Resource;
|
||||
import org.springframework.core.io.ResourceEditor;
|
||||
import org.springframework.core.io.ResourceLoader;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.portlet.context.DefaultPortletEnvironment;
|
||||
import org.springframework.web.portlet.context.StandardPortletEnvironment;
|
||||
import org.springframework.web.portlet.context.PortletContextResourceLoader;
|
||||
|
||||
/**
|
||||
@@ -76,7 +76,7 @@ public abstract class GenericPortletBean extends GenericPortlet implements Envir
|
||||
*/
|
||||
private final Set<String> requiredProperties = new HashSet<String>();
|
||||
|
||||
private Environment environment = new DefaultPortletEnvironment();
|
||||
private Environment environment = new StandardPortletEnvironment();
|
||||
|
||||
|
||||
/**
|
||||
@@ -167,7 +167,7 @@ public abstract class GenericPortletBean extends GenericPortlet implements Envir
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>Any environment set here overrides the {@link DefaultPortletEnvironment}
|
||||
* <p>Any environment set here overrides the {@link StandardPortletEnvironment}
|
||||
* provided by default.
|
||||
*/
|
||||
public void setEnvironment(Environment environment) {
|
||||
|
||||
@@ -152,11 +152,11 @@ public abstract class AbstractRefreshablePortletApplicationContext extends Abstr
|
||||
}
|
||||
|
||||
/**
|
||||
* Create and return a new {@link DefaultPortletEnvironment}.
|
||||
* Create and return a new {@link StandardPortletEnvironment}.
|
||||
*/
|
||||
@Override
|
||||
protected ConfigurableEnvironment createEnvironment() {
|
||||
return new DefaultPortletEnvironment();
|
||||
return new StandardPortletEnvironment();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -200,13 +200,13 @@ public abstract class PortletApplicationContextUtils {
|
||||
|
||||
WebApplicationContextUtils.initServletPropertySources(propertySources, servletContext);
|
||||
|
||||
if(portletContext != null && propertySources.contains(DefaultPortletEnvironment.PORTLET_CONTEXT_PROPERTY_SOURCE_NAME)) {
|
||||
propertySources.replace(DefaultPortletEnvironment.PORTLET_CONTEXT_PROPERTY_SOURCE_NAME,
|
||||
new PortletContextPropertySource(DefaultPortletEnvironment.PORTLET_CONTEXT_PROPERTY_SOURCE_NAME, portletContext));
|
||||
if(portletContext != null && propertySources.contains(StandardPortletEnvironment.PORTLET_CONTEXT_PROPERTY_SOURCE_NAME)) {
|
||||
propertySources.replace(StandardPortletEnvironment.PORTLET_CONTEXT_PROPERTY_SOURCE_NAME,
|
||||
new PortletContextPropertySource(StandardPortletEnvironment.PORTLET_CONTEXT_PROPERTY_SOURCE_NAME, portletContext));
|
||||
}
|
||||
if(portletConfig != null && propertySources.contains(DefaultPortletEnvironment.PORTLET_CONFIG_PROPERTY_SOURCE_NAME)) {
|
||||
propertySources.replace(DefaultPortletEnvironment.PORTLET_CONFIG_PROPERTY_SOURCE_NAME,
|
||||
new PortletConfigPropertySource(DefaultPortletEnvironment.PORTLET_CONFIG_PROPERTY_SOURCE_NAME, portletConfig));
|
||||
if(portletConfig != null && propertySources.contains(StandardPortletEnvironment.PORTLET_CONFIG_PROPERTY_SOURCE_NAME)) {
|
||||
propertySources.replace(StandardPortletEnvironment.PORTLET_CONFIG_PROPERTY_SOURCE_NAME,
|
||||
new PortletConfigPropertySource(StandardPortletEnvironment.PORTLET_CONFIG_PROPERTY_SOURCE_NAME, portletConfig));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -32,16 +32,16 @@ import org.springframework.web.context.support.StandardServletEnvironment;
|
||||
* applications. All Portlet-related {@code ApplicationContext} classes initialize an instance
|
||||
* by default.
|
||||
*
|
||||
* <p>Contributes {@code ServletContext}-, {@code PortletContext}-, and {@code PortletConfig}-based
|
||||
* {@link PropertySource} instances. See the {@link #DefaultPortletEnvironment()} constructor
|
||||
* for details.
|
||||
* <p>Contributes {@code ServletContext}-, {@code PortletContext}-, and
|
||||
* {@code PortletConfig}-based {@link PropertySource} instances. See the
|
||||
* {@link #customizePropertySources} method for details.
|
||||
*
|
||||
* @author Chris Beams
|
||||
* @since 3.1
|
||||
* @see StandardEnvironment
|
||||
* @see StandardServletEnvironment
|
||||
*/
|
||||
public class DefaultPortletEnvironment extends StandardEnvironment {
|
||||
public class StandardPortletEnvironment extends StandardEnvironment {
|
||||
|
||||
/** Portlet context init parameters property source name: {@value} */
|
||||
public static final String PORTLET_CONTEXT_PROPERTY_SOURCE_NAME = "portletContextInitParams";
|
||||
@@ -59,14 +59,14 @@ public class DefaultPortletEnvironment extends StandardEnvironment {
|
||||
* </ul>
|
||||
* <p>Properties present in {@value #PORTLET_CONFIG_PROPERTY_SOURCE_NAME} will
|
||||
* take precedence over those in {@value #PORTLET_CONTEXT_PROPERTY_SOURCE_NAME},
|
||||
* which takes precedence over those in
|
||||
* {@linkplain StandardServletEnvironment#SERVLET_CONTEXT_PROPERTY_SOURCE_NAME "servletContextInitParams"}.
|
||||
* <p>Properties in any of the above will take precedence over system properties and environment
|
||||
* variables contributed by the {@link StandardEnvironment} superclass.
|
||||
* which takes precedence over those in {@linkplain
|
||||
* StandardServletEnvironment#SERVLET_CONTEXT_PROPERTY_SOURCE_NAME "servletContextInitParams"}.
|
||||
* <p>Properties in any of the above will take precedence over system properties and
|
||||
* environment variables contributed by the {@link StandardEnvironment} superclass.
|
||||
* <p>The property sources are added as stubs for now, and will be
|
||||
* {@linkplain PortletApplicationContextUtils#initPortletPropertySources fully initialized}
|
||||
* once the actual {@link PortletConfig}, {@link PortletContext}, and {@link ServletContext}
|
||||
* objects are available.
|
||||
* {@linkplain PortletApplicationContextUtils#initPortletPropertySources fully
|
||||
* initialized} once the actual {@link PortletConfig}, {@link PortletContext}, and
|
||||
* {@link ServletContext} objects are available.
|
||||
* @see StandardEnvironment#customizePropertySources
|
||||
* @see PortletConfigPropertySource
|
||||
* @see PortletContextPropertySource
|
||||
@@ -65,11 +65,11 @@ public class StaticPortletApplicationContext extends StaticApplicationContext
|
||||
|
||||
|
||||
/**
|
||||
* Return a new {@link DefaultPortletEnvironment}
|
||||
* Return a new {@link StandardPortletEnvironment}
|
||||
*/
|
||||
@Override
|
||||
protected ConfigurableEnvironment createEnvironment() {
|
||||
return new DefaultPortletEnvironment();
|
||||
return new StandardPortletEnvironment();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user