Class CollectionBeanExtender

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.config.BeanPostProcessor
    Direct Known Subclasses:
    ListBeanExtender

    public class CollectionBeanExtender
    extends AbstractBeanExtender
    Modification bean to change contents of a collection property of specified bean from any spring contexts in hierarchy
    • Constructor Detail

      • CollectionBeanExtender

        public CollectionBeanExtender​(java.lang.String extendedBeanName)
    • Method Detail

      • checkProperty

        protected void checkProperty​(java.lang.Object target)
        Description copied from class: AbstractBeanExtender
        Method 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 type List)
        Specified by:
        checkProperty in class AbstractBeanExtender
        Parameters:
        target - value that will be modified
      • modifyProperty

        protected java.lang.Object modifyProperty​(java.lang.Object target)
        Description copied from class: AbstractBeanExtender
        Changes a provided value according to current modification bean configuration.
        Specified by:
        modifyProperty in class AbstractBeanExtender
        Parameters:
        target - value to be changed
        Returns:
        new value
      • makeUnique

        protected void makeUnique​(java.util.Collection<java.lang.Object> collection)
      • getAdd

        protected java.util.Collection<java.lang.Object> getAdd()
      • setAdd

        public void setAdd​(java.util.Collection<java.lang.Object> add)
      • getRemove

        protected java.util.Collection<java.lang.Object> getRemove()
      • setRemove

        public void setRemove​(java.util.Collection<java.lang.Object> remove)
      • isUnique

        public boolean isUnique()
      • setUnique

        public void setUnique​(boolean unique)