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 CREST Filter that just returns a NotSupportedException for all the methods implementations. Subclasses have to override just the needed methods.
  • Constructor Details

    • NotSupportedFilter

      public NotSupportedFilter()
  • Method Details

    • 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 interface Filter
      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 interface Filter
      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 interface Filter
      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 interface Filter
      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 a QueryResponse if the query has completed successfully, or ResourceException if the query did not complete successfully (even if some matching resources were returned).

      Specified by:
      filterQuery in interface Filter
      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 interface Filter
      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 interface Filter
      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.