Interface ResourcePurgeService

All Known Implementing Classes:
ResourcePurgeServiceImpl

public interface ResourcePurgeService
Service capable of deleting old or defunct entities from the persistence layer (e.g. Carts and anonymous Customers)
Author:
Jeff Fischer
  • Method Details

    • purgeCarts

      void purgeCarts(Map<String,String> config)
      Execute a purge of carts from the persistence layer based on the configuration parameters. The default implementation is capable of looking at any combination of name, status and creation date. Take a look at org.broadleafcommerce.core.order.service.OrderService#findCarts(String[], org.broadleafcommerce.core.order.service.type.OrderStatus[], java.util.Date, Boolean, int, int) for more info on the default behavior.
      Parameters:
      config - Map of params used to drive the selection of carts to purge
    • notifyCarts

      void notifyCarts(Map<String,String> config)
    • purgeCustomers

      void purgeCustomers(Map<String,String> config)
    • purgeOrderHistory

      void purgeOrderHistory(Class<?> rootType, String rootTypeIdValue, Map<String,List<DeleteStatementGeneratorImpl.PathElement>> depends, Map<String,Integer> config)
      Generates delete statement and executes them Originally was designed to purge orders and its dependencies
      Parameters:
      rootType - - entity type to start from to find all dependent entities
      rootTypeIdValue - - id value to use, can be any string like '?' that you will want to replace with concrete id, or id itself
      depends - - a map representing dependent tables that can't be navigated from a root type, where key is a table name to depend on, value is structure representing a depending table name, join column name(FK column that is in depending table) and id field name in table to depend on.