GigaSpaces XAP 9.7.2 API

org.openspaces.core.properties
Class BeanLevelProperties

java.lang.Object
  extended by org.openspaces.core.properties.BeanLevelProperties
All Implemented Interfaces:
Serializable

public class BeanLevelProperties
extends Object
implements 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:
BeanLevelPropertiesAware, BeanLevelPropertyPlaceholderConfigurer, Serialized Form

Constructor Summary
BeanLevelProperties()
           
 
Method Summary
 Properties getBeanProperties(String beanName)
          Returns properties that are associated with a specific bean name.
 Map<String,Properties> getBeans()
           
 Properties getContextProperties()
          Returns the Spring context level properties.
 Properties getMergedBeanProperties(String beanName)
          Returns merged properties between the Spring context level properties and the bean level properties associated with the provided bean name.
 boolean hasBeanProperties(String beanName)
          Returns true if there are properties associated with the given bean name.
 void setBeanProperties(String beanName, Properties nameBasedProperties)
          Sets properties that will be associated with the given bean name.
 void setContextProperties(Properties contextProperties)
          Sets the Spring context level properties.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BeanLevelProperties

public BeanLevelProperties()
Method Detail

getContextProperties

public Properties getContextProperties()
Returns the Spring context level properties.


setContextProperties

public void setContextProperties(Properties contextProperties)
Sets the Spring context level properties.


getBeanProperties

public Properties getBeanProperties(String beanName)
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

public void setBeanProperties(String beanName,
                              Properties nameBasedProperties)
Sets properties that will be associated with the given bean name.

Parameters:
beanName - The bean name to bind the properties to
nameBasedProperties - The properties associated with the bean name

hasBeanProperties

public boolean hasBeanProperties(String beanName)
Returns true if there are properties associated with the given bean name.

Parameters:
beanName - The bean name to check if there are properties associated with it
Returns:
true if there are properties associated with the bean name

getMergedBeanProperties

public Properties getMergedBeanProperties(String beanName)
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

public Map<String,Properties> getBeans()

toString

public String toString()
Overrides:
toString in class Object

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.