Eliminate PropertySourceAggregator interface
This commit is contained in:
parent
8770ea96b0
commit
f46a455c72
|
|
@ -16,6 +16,10 @@
|
||||||
|
|
||||||
package org.springframework.core.env;
|
package org.springframework.core.env;
|
||||||
|
|
||||||
|
import java.util.LinkedList;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
import org.springframework.core.convert.ConversionService;
|
import org.springframework.core.convert.ConversionService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -24,19 +28,34 @@ import org.springframework.core.convert.ConversionService;
|
||||||
* @author Chris Beams
|
* @author Chris Beams
|
||||||
* @since 3.1
|
* @since 3.1
|
||||||
*/
|
*/
|
||||||
public interface ConfigurableEnvironment extends Environment, PropertySourceAggregator {
|
public interface ConfigurableEnvironment extends Environment {
|
||||||
|
|
||||||
/**
|
|
||||||
* TODO SPR-7508: document
|
|
||||||
*/
|
|
||||||
void setActiveProfiles(String... profiles);
|
void setActiveProfiles(String... profiles);
|
||||||
|
|
||||||
/**
|
|
||||||
* TODO SPR-7508: document
|
|
||||||
*/
|
|
||||||
void setDefaultProfiles(String... profiles);
|
void setDefaultProfiles(String... profiles);
|
||||||
|
|
||||||
public ConversionService getConversionService();
|
public ConversionService getConversionService();
|
||||||
|
|
||||||
public void setConversionService(ConversionService conversionService);
|
public void setConversionService(ConversionService conversionService);
|
||||||
|
|
||||||
|
void addPropertySource(PropertySource<?> propertySource);
|
||||||
|
|
||||||
|
void addPropertySource(String name, Properties properties);
|
||||||
|
|
||||||
|
void addPropertySource(String name, Map<String, String> propertiesMap);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO: SPR-7508 document
|
||||||
|
*
|
||||||
|
* Care should be taken to ensure duplicates are not introduced.
|
||||||
|
*
|
||||||
|
* Recommend using {@link LinkedList#set(int, Object)} for replacing items,
|
||||||
|
* and combining {@link LinkedList#remove()} with other methods like
|
||||||
|
* {@link LinkedList#add(Object)} to prevent duplicates.
|
||||||
|
*
|
||||||
|
* Explain how {@link PropertySource#equals(Object)} and hashCode work, and that
|
||||||
|
* recommend using {@link PropertySource#named(String)} for lookups in the list.
|
||||||
|
*/
|
||||||
|
LinkedList<PropertySource<?>> getPropertySources();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,51 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2002-2010 the original author or authors.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.springframework.core.env;
|
|
||||||
|
|
||||||
import java.util.LinkedList;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Properties;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* TODO: SPR-7508 document
|
|
||||||
*
|
|
||||||
* @author Chris Beams
|
|
||||||
* @since 3.1
|
|
||||||
*/
|
|
||||||
public interface PropertySourceAggregator {
|
|
||||||
|
|
||||||
void addPropertySource(PropertySource<?> propertySource);
|
|
||||||
|
|
||||||
void addPropertySource(String name, Properties properties);
|
|
||||||
|
|
||||||
void addPropertySource(String name, Map<String, String> propertiesMap);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* TODO: SPR-7508 document
|
|
||||||
*
|
|
||||||
* Care should be taken to ensure duplicates are not introduced.
|
|
||||||
*
|
|
||||||
* Recommend using {@link LinkedList#set(int, Object)} for replacing items,
|
|
||||||
* and combining {@link LinkedList#remove()} with other methods like
|
|
||||||
* {@link LinkedList#add(Object)} to prevent duplicates.
|
|
||||||
*
|
|
||||||
* Explain how {@link PropertySource#equals(Object)} and hashCode work, and that
|
|
||||||
* recommend using {@link PropertySource#named(String)} for lookups in the list.
|
|
||||||
*/
|
|
||||||
LinkedList<PropertySource<?>> getPropertySources();
|
|
||||||
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue