Class BeanLevelProperties

java.lang.Object
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:
  • Constructor Details

    • BeanLevelProperties

      public BeanLevelProperties()
  • Method Details

    • 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