Class DictionaryBeanProcessorBase
java.lang.Object
org.kuali.rice.krad.datadictionary.DictionaryBeanProcessorBase
- All Implemented Interfaces:
DictionaryBeanProcessor
- Direct Known Subclasses:
MessageBeanProcessor
Base class for dictionary bean processors that provides utility methods
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapplyPropertyValueToBean(String propertyPath, String propertyValue, org.springframework.beans.factory.config.BeanDefinition beanDefinition) Applies the given property name and value to the bean definitionprotected voidapplyPropertyValueToBean(String propertyPath, String propertyValue, org.springframework.beans.MutablePropertyValues pvs) Applies the given property name and value to given property valuesprotected Class<?> getBeanClass(org.springframework.beans.factory.config.BeanDefinition beanDefinition, org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) Retrieves the class for the object that will be created from the bean definition.protected DataDictionaryServiceReturns an instance of the data dictionary serviceprotected org.springframework.beans.factory.config.BeanDefinitiongetPropertyValueBeanDefinition(org.springframework.beans.PropertyValue propertyValue) Determines if the given property value is a bean definition or bean definition holder and if so returns the value as a bean definintionprotected StringgetStringValue(Object value) Determines whether the given value is of String type and if so returns the string valueprotected booleanisGeneratedBeanName(String beanName) Indicates whether the given bean name was generated by springMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBeanProcessor
processArrayStringPropertyValue, processCollectionBeanDefinition, processListStringPropertyValue, processMapStringPropertyValue, processNestedBeanDefinition, processRootBeanDefinition, processSetStringPropertyValue, processStringPropertyValue
-
Constructor Details
-
DictionaryBeanProcessorBase
public DictionaryBeanProcessorBase()
-
-
Method Details
-
getBeanClass
protected Class<?> getBeanClass(org.springframework.beans.factory.config.BeanDefinition beanDefinition, org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) Retrieves the class for the object that will be created from the bean definition. Since the class might not be configured on the bean definition, but by a parent, each parent bean definition is recursively checked for a class until one is found- Parameters:
beanDefinition- bean definition to get class forbeanFactory- bean factory that contains the bean definition- Returns:
- Classinvalid input: '<'?> class configured for the bean definition, or null
-
getStringValue
Determines whether the given value is of String type and if so returns the string value- Parameters:
value- object value to check- Returns:
- String string value for object or null if object is not a string type
-
applyPropertyValueToBean
protected void applyPropertyValueToBean(String propertyPath, String propertyValue, org.springframework.beans.factory.config.BeanDefinition beanDefinition) Applies the given property name and value to the bean definition- Parameters:
propertyPath- name of the property to add value forpropertyValue- value for the propertybeanDefinition- bean definition to add property value to
-
applyPropertyValueToBean
protected void applyPropertyValueToBean(String propertyPath, String propertyValue, org.springframework.beans.MutablePropertyValues pvs) Applies the given property name and value to given property values- Parameters:
propertyPath- name of the property to add value forpropertyValue- value for the propertypvs- property values to add property to
-
getPropertyValueBeanDefinition
protected org.springframework.beans.factory.config.BeanDefinition getPropertyValueBeanDefinition(org.springframework.beans.PropertyValue propertyValue) Determines if the given property value is a bean definition or bean definition holder and if so returns the value as a bean definintion- Parameters:
propertyValue- property value to get bean definition from- Returns:
- property value as a bean definition or null if value does not contain a bean definition
-
isGeneratedBeanName
Indicates whether the given bean name was generated by spring- Parameters:
beanName- bean name to check- Returns:
- boolean true if bean name is generated, false if not
-
getDataDictionaryService
Returns an instance of the data dictionary service- Returns:
- DataDictionaryService instance
-