Class QueryUserFilterInterceptor

java.lang.Object
org.chenile.core.interceptors.BaseChenileInterceptor
org.chenile.query.service.interceptor.QueryUserFilterInterceptor
All Implemented Interfaces:
Command<ChenileExchange>

public class QueryUserFilterInterceptor extends BaseChenileInterceptor
For specific queries, we should restrict the results only to authorized users. Typically authorized users are the users and their lines of supervisors. Hence a user can see everyone who lies in their group. Such queries must use the auth_id as the filter and must support a list of authId's This interceptor generates the list of authId's from the current user down to his reportees
Author:
Raja Shankar Kolluru
  • Field Details

  • Constructor Details

    • QueryUserFilterInterceptor

      public QueryUserFilterInterceptor()
  • Method Details

    • doPreProcessing

      protected void doPreProcessing(ChenileExchange exchange)
      Description copied from class: BaseChenileInterceptor
      Override this to do pre-processing. This will be called before the service is invoked. Don't expect to see exception or response being set in ChenileExchange. However you can check for ChenileExchange.getBody() to manipulate the body if this interceptor is a Chenile post processor or a service specific or operation specific interceptor.
      If this interceptor is a Chenile pre-processor, then ChenileExchange.getBody() will return null. Then you need to look at headers only.
      Overrides:
      doPreProcessing in class BaseChenileInterceptor
    • enhanceSystemFilters

      protected void enhanceSystemFilters(Map<String,Object> systemFilters)
    • executeUserReporteesQuery

      protected List<String> executeUserReporteesQuery(String userId)