Package de.hybris.platform.spring.config
Class ListMergeDirective
java.lang.Object
de.hybris.platform.spring.config.ListMergeDirective
- Direct Known Subclasses:
ListMergeDirective
List Merge Directives allow an AddOn to merge additional elements into spring-bean lists AND list properties on
Spring Beans. The minimal property to set is the add. This will append to the end of the list and is preferable to
using the list merge feature of spring since you are not required to extend and re-alias the original list bean
meaning the AddOns changes are more isolated from the AddOns. However, the directive also supports the ability to
insert the bean before or after a specified list element bean definition or bean class. List Merge Directive bean
definitions must also include a depends-on qualifier which should be the list-bean or the bean enclosing the list
property.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAdd()Add the element after all the elements which are assignable from the specified classes.voidvoidsetAfterBeanNames(List<String> after) Add the element after the specified bean names (if the target list is a list of beans)voidsetAfterClasses(List<Class> afterClasses) voidsetAfterValues(List<Object> afterValues) Adds the element after the specified values (useful for merging into lists of atomic types)voidsetBeforeBeanNames(List<String> beforeBeanNames) Insert the element before the specified bean names (if the target list is a list of beans)voidsetBeforeClasses(List<Class> beforeClasses) Insert the element before all the elements which are assignable from the specified classes.voidsetBeforeValues(List<Object> beforeValues) Inserts the element before the specified values (useful for merging into lists of atomic types)voidsetFieldName(String fieldName) field name of list / map - for use with reflectionvoidsetListPropertyDescriptor(String listPropertyDescriptor) If the dependency bean is not the actual list, then use the property descriptor to identify the list property.
-
Constructor Details
-
ListMergeDirective
public ListMergeDirective()
-
-
Method Details
-
getAdd
- Returns:
- the add
-
setAdd
- Parameters:
add- The Bean or Element to Add
-
getAfterBeanNames
- Returns:
- the after
-
setAfterBeanNames
Add the element after the specified bean names (if the target list is a list of beans)- Parameters:
after- the after to set
-
getBeforeBeanNames
- Returns:
- the beforeBeanNames
-
setBeforeBeanNames
Insert the element before the specified bean names (if the target list is a list of beans)- Parameters:
beforeBeanNames- the beforeBeanNames to set
-
getAfterClasses
Add the element after all the elements which are assignable from the specified classes.- Returns:
- the afterClasses
-
setAfterClasses
- Parameters:
afterClasses- the afterClasses to set
-
getBeforeClasses
- Returns:
- the beforeClasses
-
setBeforeClasses
Insert the element before all the elements which are assignable from the specified classes.- Parameters:
beforeClasses- the afterClasses to set
-
getListPropertyDescriptor
-
setListPropertyDescriptor
If the dependency bean is not the actual list, then use the property descriptor to identify the list property. The Property descriptor uses Apache Commons BeanUtils syntax. -
getAfterValues
-
setAfterValues
Adds the element after the specified values (useful for merging into lists of atomic types)- Parameters:
afterValues-
-
getBeforeValues
-
setBeforeValues
Inserts the element before the specified values (useful for merging into lists of atomic types)- Parameters:
beforeValues-
-
getFieldName
-
setFieldName
field name of list / map - for use with reflection- Parameters:
fieldName-
-