Package oracle.stellent.ridc.filter
Class IdcFilterManager
java.lang.Object
oracle.stellent.ridc.filter.IdcFilterManager
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeRegisterFilter(int slot, IIdcFilter filter) Remove a filter from an execution slot.voidexecuteFilters(IdcFilterType ftype, Object... objects) Execute the filters beforeServiceRequest methodgetFilter(int slot) Get filter that will execute at a specific slot valueintregisterFilter(int slot, IIdcFilter filter) Register a filter that will be called during processing of the RIDC event.
-
Constructor Details
-
IdcFilterManager
public IdcFilterManager()
-
-
Method Details
-
executeFilters
Execute the filters beforeServiceRequest method- Throws:
IdcFilterExceptionIdcClientException
-
registerFilter
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 orderfilter- 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
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 vacatefilter- the instance that previously occupied slot- Throws:
IdcFilterException
-
getFilter
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
- Returns:
- slots that are occupied by filters
-