Class ListMergeDirective

  • Direct Known Subclasses:
    ListMergeDirective

    public class ListMergeDirective
    extends java.lang.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.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object getAdd()  
      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.String getFieldName()  
      java.lang.String getListPropertyDescriptor()  
      void setAdd​(java.lang.Object add)  
      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)
      void setAfterClasses​(java.util.List<java.lang.Class> afterClasses)  
      void setAfterValues​(java.util.List<java.lang.Object> afterValues)
      Adds the element after the specified values (useful for merging into lists of atomic types)
      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)
      void setBeforeClasses​(java.util.List<java.lang.Class> beforeClasses)
      Insert the element before all the elements which are assignable from the specified classes.
      void setBeforeValues​(java.util.List<java.lang.Object> beforeValues)
      Inserts the element before the specified values (useful for merging into lists of atomic types)
      void setFieldName​(java.lang.String fieldName)
      field name of list / map - for use with reflection
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ListMergeDirective

        public ListMergeDirective()
    • 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 -