Package org.forgerock.openig.tools
Class NotSupportedFilter
- java.lang.Object
-
- org.forgerock.openig.tools.NotSupportedFilter
-
- All Implemented Interfaces:
Filter
- Direct Known Subclasses:
CachePolicyDecisionFilter
public class NotSupportedFilter extends Object implements Filter
A convenient implementation of a CRESTFilter
that just returns aNotSupportedException
for all the methods implementations. Subclasses have to override just the needed methods.
-
-
Constructor Summary
Constructors Constructor Description NotSupportedFilter()
-
Method Summary
-
-
-
Method Detail
-
filterAction
public Promise<ActionResponse,ResourceException> filterAction(Context context, ActionRequest actionRequest, RequestHandler requestHandler)
Description copied from interface:Filter
Filters an action request.- Specified by:
filterAction
in interfaceFilter
- Parameters:
context
- The filter chain context.actionRequest
- The action request.requestHandler
- A request handler representing the remainder of the filter chain.- Returns:
- A
Promise
containing the result of the operation.
-
filterCreate
public Promise<ResourceResponse,ResourceException> filterCreate(Context context, CreateRequest createRequest, RequestHandler requestHandler)
Description copied from interface:Filter
Filters a create request.- Specified by:
filterCreate
in interfaceFilter
- Parameters:
context
- The filter chain context.createRequest
- The create request.requestHandler
- A request handler representing the remainder of the filter chain.- Returns:
- A
Promise
containing the result of the operation.
-
filterDelete
public Promise<ResourceResponse,ResourceException> filterDelete(Context context, DeleteRequest deleteRequest, RequestHandler requestHandler)
Description copied from interface:Filter
Filters a delete request.- Specified by:
filterDelete
in interfaceFilter
- Parameters:
context
- The filter chain context.deleteRequest
- The delete request.requestHandler
- A request handler representing the remainder of the filter chain.- Returns:
- A
Promise
containing the result of the operation.
-
filterPatch
public Promise<ResourceResponse,ResourceException> filterPatch(Context context, PatchRequest patchRequest, RequestHandler requestHandler)
Description copied from interface:Filter
Filters a patch request.- Specified by:
filterPatch
in interfaceFilter
- Parameters:
context
- The filter chain context.patchRequest
- The patch request.requestHandler
- A request handler representing the remainder of the filter chain.- Returns:
- A
Promise
containing the result of the operation.
-
filterQuery
public Promise<QueryResponse,ResourceException> filterQuery(Context context, QueryRequest queryRequest, QueryResourceHandler queryResourceHandler, RequestHandler requestHandler)
Description copied from interface:Filter
Filters a query request.Implementations which return results directly rather than forwarding the request should invoke
QueryResourceHandler.handleResource(ResourceResponse)
for each resource which matches the query criteria. Once all matching resources have been returned implementations are required to return either aQueryResponse
if the query has completed successfully, orResourceException
if the query did not complete successfully (even if some matching resources were returned).- Specified by:
filterQuery
in interfaceFilter
- Parameters:
context
- The filter chain context.queryRequest
- The query request.queryResourceHandler
- The resource handler.requestHandler
- A request handler representing the remainder of the filter chain.- Returns:
- A
Promise
containing the result of the operation.
-
filterRead
public Promise<ResourceResponse,ResourceException> filterRead(Context context, ReadRequest readRequest, RequestHandler requestHandler)
Description copied from interface:Filter
Filters a read request.- Specified by:
filterRead
in interfaceFilter
- Parameters:
context
- The filter chain context.readRequest
- The read request.requestHandler
- A request handler representing the remainder of the filter chain.- Returns:
- A
Promise
containing the result of the operation.
-
filterUpdate
public Promise<ResourceResponse,ResourceException> filterUpdate(Context context, UpdateRequest updateRequest, RequestHandler requestHandler)
Description copied from interface:Filter
Filters an update request.- Specified by:
filterUpdate
in interfaceFilter
- Parameters:
context
- The filter chain context.updateRequest
- The update request.requestHandler
- A request handler representing the remainder of the filter chain.- Returns:
- A
Promise
containing the result of the operation.
-
-