Class ListBeanExtender
- java.lang.Object
-
- com.hybris.cockpitng.core.util.bean.AbstractBeanExtender
-
- com.hybris.cockpitng.core.util.bean.CollectionBeanExtender
-
- com.hybris.cockpitng.core.util.bean.ListBeanExtender
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.config.BeanPostProcessor
public class ListBeanExtender extends CollectionBeanExtender
Modification bean to change contents of a list property of specified bean from any spring contexts in hierarchy and/or sort them.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBEAN_NAME
-
Constructor Summary
Constructors Constructor Description ListBeanExtender(java.lang.String extendedBeanName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckProperty(java.lang.Object target)Method should check if value of property to be modified is proper (i.e.protected java.util.Comparator<java.lang.Object>getComparator()protected booleanisSort()protected java.lang.ObjectmodifyProperty(java.lang.Object target)Changes a provided value according to current modification bean configuration.voidsetComparator(java.util.Comparator<java.lang.Object> comparator)protected voidsetDefaultComparator()voidsetSort(boolean sort)-
Methods inherited from class com.hybris.cockpitng.core.util.bean.CollectionBeanExtender
getAdd, getRemove, isUnique, makeUnique, setAdd, setRemove, setUnique
-
Methods inherited from class com.hybris.cockpitng.core.util.bean.AbstractBeanExtender
checkPropertyType, getBeanFactory, getBeanName, getExtendedBeanName, getGetter, getInitializationExceptionMessage, getMapper, getProperty, getResolverFactory, getSetter, initialize, mapProperty, modifyBean, postProcessAfterInitialization, postProcessBeforeInitialization, qualifiesForModification, qualifiesForModification, readBeanProperty, readBeanPropertyWithGetter, readBeanPropertyWithReflection, readBeanSimpleProperty, readOriginalValue, readProperty, resolveGetter, resolveGetter, resolveSetter, setBeanFactory, setBeanName, setGetter, setMapper, setProperty, setResolverFactory, setSetter, writeBeanProperty, writeBeanPropertyWithReflection, writeBeanPropertyWithSetter, writeBeanSimpleProperty, writeNewValue, writeProperty
-
-
-
-
Field Detail
-
BEAN_NAME
public static final java.lang.String BEAN_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
checkProperty
protected void checkProperty(java.lang.Object target)
Description copied from class:AbstractBeanExtenderMethod should check if value of property to be modified is proper (i.e. if bean is to modify a list, then it should check if provided value is of typeList)- Overrides:
checkPropertyin classCollectionBeanExtender- Parameters:
target- value that will be modified
-
modifyProperty
protected java.lang.Object modifyProperty(java.lang.Object target)
Description copied from class:AbstractBeanExtenderChanges a provided value according to current modification bean configuration.- Overrides:
modifyPropertyin classCollectionBeanExtender- Parameters:
target- value to be changed- Returns:
- new value
-
isSort
protected boolean isSort()
-
setSort
public void setSort(boolean sort)
-
getComparator
protected java.util.Comparator<java.lang.Object> getComparator()
-
setComparator
public void setComparator(java.util.Comparator<java.lang.Object> comparator)
-
setDefaultComparator
protected void setDefaultComparator()
-
-