Class ListMergeDirective

java.lang.Object
de.hybris.platform.spring.config.ListMergeDirective
Direct Known Subclasses:
ListMergeDirective

public class ListMergeDirective extends Object
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 Details

    • ListMergeDirective

      public ListMergeDirective()
  • Method Details

    • getAdd

      public Object getAdd()
      Returns:
      the add
    • setAdd

      public void setAdd(Object add)
      Parameters:
      add - The Bean or Element to Add
    • getAfterBeanNames

      public List<String> getAfterBeanNames()
      Returns:
      the after
    • setAfterBeanNames

      public void setAfterBeanNames(List<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 List<String> getBeforeBeanNames()
      Returns:
      the beforeBeanNames
    • setBeforeBeanNames

      public void setBeforeBeanNames(List<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 List<Class> getAfterClasses()
      Add the element after all the elements which are assignable from the specified classes.
      Returns:
      the afterClasses
    • setAfterClasses

      public void setAfterClasses(List<Class> afterClasses)
      Parameters:
      afterClasses - the afterClasses to set
    • getBeforeClasses

      public List<Class> getBeforeClasses()
      Returns:
      the beforeClasses
    • setBeforeClasses

      public void setBeforeClasses(List<Class> beforeClasses)
      Insert the element before all the elements which are assignable from the specified classes.
      Parameters:
      beforeClasses - the afterClasses to set
    • getListPropertyDescriptor

      public String getListPropertyDescriptor()
    • setListPropertyDescriptor

      public void setListPropertyDescriptor(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 List<Object> getAfterValues()
    • setAfterValues

      public void setAfterValues(List<Object> afterValues)
      Adds the element after the specified values (useful for merging into lists of atomic types)
      Parameters:
      afterValues -
    • getBeforeValues

      public List<Object> getBeforeValues()
    • setBeforeValues

      public void setBeforeValues(List<Object> beforeValues)
      Inserts the element before the specified values (useful for merging into lists of atomic types)
      Parameters:
      beforeValues -
    • getFieldName

      public String getFieldName()
    • setFieldName

      public void setFieldName(String fieldName)
      field name of list / map - for use with reflection
      Parameters:
      fieldName -