Package de.hybris.platform.spring.config
Class ListMergeDirective
- java.lang.Object
-
- de.hybris.platform.spring.config.ListMergeDirective
-
- Direct Known Subclasses:
ListMergeDirective
public class ListMergeDirective extends java.lang.ObjectList 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 Constructor Description ListMergeDirective()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetAdd()java.util.List<java.lang.String>getAfterBeanNames()java.util.List<java.lang.Class>getAfterClasses()Add the element after all the elements which are assignable from the specified classes.java.util.List<java.lang.Object>getAfterValues()java.util.List<java.lang.String>getBeforeBeanNames()java.util.List<java.lang.Class>getBeforeClasses()java.util.List<java.lang.Object>getBeforeValues()java.lang.StringgetFieldName()java.lang.StringgetListPropertyDescriptor()voidsetAdd(java.lang.Object add)voidsetAfterBeanNames(java.util.List<java.lang.String> after)Add the element after the specified bean names (if the target list is a list of beans)voidsetAfterClasses(java.util.List<java.lang.Class> afterClasses)voidsetAfterValues(java.util.List<java.lang.Object> afterValues)Adds the element after the specified values (useful for merging into lists of atomic types)voidsetBeforeBeanNames(java.util.List<java.lang.String> beforeBeanNames)Insert the element before the specified bean names (if the target list is a list of beans)voidsetBeforeClasses(java.util.List<java.lang.Class> beforeClasses)Insert the element before all the elements which are assignable from the specified classes.voidsetBeforeValues(java.util.List<java.lang.Object> beforeValues)Inserts the element before the specified values (useful for merging into lists of atomic types)voidsetFieldName(java.lang.String fieldName)field name of list / map - for use with reflectionvoidsetListPropertyDescriptor(java.lang.String listPropertyDescriptor)If the dependency bean is not the actual list, then use the property descriptor to identify the list property.
-
-
-
Method Detail
-
getAdd
public java.lang.Object getAdd()
- Returns:
- the add
-
setAdd
public void setAdd(java.lang.Object add)
- Parameters:
add- The Bean or Element to Add
-
getAfterBeanNames
public java.util.List<java.lang.String> getAfterBeanNames()
- Returns:
- the after
-
setAfterBeanNames
public void setAfterBeanNames(java.util.List<java.lang.String> after)
Add the element after the specified bean names (if the target list is a list of beans)- Parameters:
after- the after to set
-
getBeforeBeanNames
public java.util.List<java.lang.String> getBeforeBeanNames()
- Returns:
- the beforeBeanNames
-
setBeforeBeanNames
public void setBeforeBeanNames(java.util.List<java.lang.String> beforeBeanNames)
Insert the element before the specified bean names (if the target list is a list of beans)- Parameters:
beforeBeanNames- the beforeBeanNames to set
-
getAfterClasses
public java.util.List<java.lang.Class> getAfterClasses()
Add the element after all the elements which are assignable from the specified classes.- Returns:
- the afterClasses
-
setAfterClasses
public void setAfterClasses(java.util.List<java.lang.Class> afterClasses)
- Parameters:
afterClasses- the afterClasses to set
-
getBeforeClasses
public java.util.List<java.lang.Class> getBeforeClasses()
- Returns:
- the beforeClasses
-
setBeforeClasses
public void setBeforeClasses(java.util.List<java.lang.Class> beforeClasses)
Insert the element before all the elements which are assignable from the specified classes.- Parameters:
beforeClasses- the afterClasses to set
-
getListPropertyDescriptor
public java.lang.String getListPropertyDescriptor()
-
setListPropertyDescriptor
public void setListPropertyDescriptor(java.lang.String listPropertyDescriptor)
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
public java.util.List<java.lang.Object> getAfterValues()
-
setAfterValues
public void setAfterValues(java.util.List<java.lang.Object> afterValues)
Adds the element after the specified values (useful for merging into lists of atomic types)- Parameters:
afterValues-
-
getBeforeValues
public java.util.List<java.lang.Object> getBeforeValues()
-
setBeforeValues
public void setBeforeValues(java.util.List<java.lang.Object> beforeValues)
Inserts the element before the specified values (useful for merging into lists of atomic types)- Parameters:
beforeValues-
-
getFieldName
public java.lang.String getFieldName()
-
setFieldName
public void setFieldName(java.lang.String fieldName)
field name of list / map - for use with reflection- Parameters:
fieldName-
-
-