Package org.openspaces.core.properties
Class BeanLevelProperties
java.lang.Object
org.openspaces.core.properties.BeanLevelProperties
- All Implemented Interfaces:
Serializable
An extension to Spring support for properties based configuration. This is a properties holder
that can have both context level properties and bean specific (mapped based on the bean name)
properties.
- Author:
- kimchy
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetBeanProperties(String beanName) Returns properties that are associated with a specific bean name.getBeans()Returns the Spring context level properties.getMergedBeanProperties(String beanName) Returns merged properties between the Spring context level properties and the bean level properties associated with the provided bean name.booleanhasBeanProperties(String beanName) Returnstrueif there are properties associated with the given bean name.voidsetBeanProperties(String beanName, Properties nameBasedProperties) Sets properties that will be associated with the given bean name.voidsetContextProperties(Properties contextProperties) Sets the Spring context level properties.toString()
-
Constructor Details
-
BeanLevelProperties
public BeanLevelProperties()
-
-
Method Details
-
getContextProperties
Returns the Spring context level properties. -
setContextProperties
Sets the Spring context level properties. -
getBeanProperties
Returns properties that are associated with a specific bean name. If the properties do not exists, they will be created and bounded to the bean name.- Parameters:
beanName- The bean name to get the properties for- Returns:
- The properties assigned to the bean
-
setBeanProperties
Sets properties that will be associated with the given bean name.- Parameters:
beanName- The bean name to bind the properties tonameBasedProperties- The properties associated with the bean name
-
hasBeanProperties
Returnstrueif there are properties associated with the given bean name.- Parameters:
beanName- The bean name to check if there are properties associated with it- Returns:
trueif there are properties associated with the bean name
-
getMergedBeanProperties
Returns merged properties between the Spring context level properties and the bean level properties associated with the provided bean name. The bean level properties will override existing properties defined in the context level properties.- Parameters:
beanName- The bean name to return the merged properties for- Returns:
- Merged properties of the bean level properties and context properties for the given bean name
-
getBeans
-
toString
-