org.kuali.rice.krad.datadictionary
Class DictionaryBeanProcessorBase

java.lang.Object
  extended by org.kuali.rice.krad.datadictionary.DictionaryBeanProcessorBase
All Implemented Interfaces:
DictionaryBeanProcessor
Direct Known Subclasses:
MessageBeanProcessor

public abstract class DictionaryBeanProcessorBase
extends Object
implements DictionaryBeanProcessor

Base class for dictionary bean processors that provides utility methods

Author:
Kuali Rice Team (rice.collab@kuali.org)

Constructor Summary
DictionaryBeanProcessorBase()
           
 
Method Summary
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
protected  void applyPropertyValueToBean(String propertyPath, String propertyValue, org.springframework.beans.MutablePropertyValues pvs)
          Applies the given property name and value to given property values
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.
protected  DataDictionaryService getDataDictionaryService()
          Returns an instance of the data dictionary service
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
protected  String getStringValue(Object value)
          Determines whether the given value is of String type and if so returns the string value
protected  boolean isGeneratedBeanName(String beanName)
          Indicates whether the given bean name was generated by spring
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBeanProcessor
processArrayStringPropertyValue, processCollectionBeanDefinition, processListStringPropertyValue, processMapStringPropertyValue, processNestedBeanDefinition, processRootBeanDefinition, processSetStringPropertyValue, processStringPropertyValue
 

Constructor Detail

DictionaryBeanProcessorBase

public DictionaryBeanProcessorBase()
Method Detail

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 for
beanFactory - bean factory that contains the bean definition
Returns:
Class class configured for the bean definition, or null

getStringValue

protected String getStringValue(Object value)
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 for
propertyValue - value for the property
beanDefinition - 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 for
propertyValue - value for the property
pvs - 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

protected boolean isGeneratedBeanName(String beanName)
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

protected DataDictionaryService getDataDictionaryService()
Returns an instance of the data dictionary service

Returns:
DataDictionaryService instance


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.