Class IdcFilterManager

java.lang.Object
oracle.stellent.ridc.filter.IdcFilterManager

@Exported public class IdcFilterManager extends Object
Manage a list of filters that are registered to be executed. RIDC code will call executeFilters at various strategic points in the library. Application code can register a filter to be executed at a particular time (slot) in relation to all other registered filters. If the slot you want to use is currently in use, then the next higher available slot will be automatically selected. Application code can also deregister a filter from a slot. To guard against accidentally deregistering the wrong filter, you need to also specify the instance of the filter in that slot.
  • Constructor Details

    • IdcFilterManager

      public IdcFilterManager()
  • Method Details

    • executeFilters

      public void executeFilters(IdcFilterType ftype, Object... objects) throws IdcClientException
      Execute the filters beforeServiceRequest method
      Throws:
      IdcFilterException
      IdcClientException
    • registerFilter

      public int registerFilter(int slot, IIdcFilter filter) throws IdcFilterException
      Register a filter that will be called during processing of the RIDC event. Filters will execute in the order specified when they where registered. If the order value you've asked for (slot) is in use, then the next higher available value will automatically be used for registration.
      Parameters:
      slot - Execution slot for the filter, slots are executed in order
      filter - IIdcFilter class
      Returns:
      slot where filter was inserted. Returned value might not equal your requested value
      Throws:
      IdcFilterException - if the filter cannot be registered
    • deRegisterFilter

      public IIdcFilter deRegisterFilter(int slot, IIdcFilter filter) throws IdcFilterException
      Remove a filter from an execution slot. You must also pass in the exact instance of the filter that you want to remove.
      Parameters:
      slot - the filter slot to vacate
      filter - the instance that previously occupied slot
      Throws:
      IdcFilterException
    • getFilter

      public IIdcFilter getFilter(int slot)
      Get filter that will execute at a specific slot value
      Parameters:
      slot - execution slot
      Returns:
      IRidcFilter that will execute in specified slot, null if execution slot is empty
    • getUsedSlots

      public List<Integer> getUsedSlots()
      Returns:
      slots that are occupied by filters