@Test public void test3searchRangerServices() { SearchFilter searchFilter = new SearchFilter(); searchFilter.setParam(SearchFilter.POLICY_NAME, "policyName"); searchFilter.setParam(SearchFilter.SERVICE_NAME, "serviceName"); RangerServiceList dbRangerServiceList = rangerServiceService .searchRangerServices(searchFilter); Assert.assertNotNull(dbRangerServiceList); }
public RangerServiceList searchRangerServices(SearchFilter searchFilter) { RangerServiceList retList = new RangerServiceList(); int startIndex = searchFilter.getStartIndex(); int pageSize = searchFilter.getMaxRows(); searchFilter.setStartIndex(0); searchFilter.setMaxRows(Integer.MAX_VALUE); List<T> xSvcList = searchResources(searchFilter, searchFields, sortFields, retList); List<T> permittedServices = new ArrayList<T>(); for (T xSvc : xSvcList) { if(bizUtil.hasAccess(xSvc, null)){ permittedServices.add(xSvc); } } if(!permittedServices.isEmpty()) { populatePageList(permittedServices, startIndex, pageSize, retList); } return retList; }
RangerServiceServiceBase extends RangerBaseModelService<T, V> { public RangerServiceList searchRangerServices(SearchFilter searchFilter) { RangerServiceList retList = new RangerServiceList(); int startIndex = searchFilter.getStartIndex(); int pageSize = searchFilter.getMaxRows(); searchFilter.setStartIndex(0); searchFilter.setMaxRows(Integer.MAX_VALUE); List<T> xSvcList = searchResources(searchFilter, searchFields, sortFields, retList); List<T> permittedServices = new ArrayList<T>(); for (T xSvc : xSvcList) { if(bizUtil.hasAccess(xSvc, null)){ permittedServices.add(xSvc); } } if(!permittedServices.isEmpty()) { populatePageList(permittedServices, startIndex, pageSize, retList); } return retList; } }
RangerServiceServiceBase extends RangerBaseModelService<T, V> { public RangerServiceList searchRangerServices(SearchFilter searchFilter) { RangerServiceList retList = new RangerServiceList(); int startIndex = searchFilter.getStartIndex(); int pageSize = searchFilter.getMaxRows(); searchFilter.setStartIndex(0); searchFilter.setMaxRows(Integer.MAX_VALUE); List<T> xSvcList = searchResources(searchFilter, searchFields, sortFields, retList); List<T> permittedServices = new ArrayList<T>(); for (T xSvc : xSvcList) { if(bizUtil.hasAccess(xSvc, null)){ permittedServices.add(xSvc); } } if(!permittedServices.isEmpty()) { populatePageList(permittedServices, startIndex, pageSize, retList); } return retList; } RangerServiceServiceBase(); }
RangerServiceServiceBase extends RangerBaseModelService<T, V> { public RangerServiceList searchRangerServices(SearchFilter searchFilter) { RangerServiceList retList = new RangerServiceList(); int startIndex = searchFilter.getStartIndex(); int pageSize = searchFilter.getMaxRows(); searchFilter.setStartIndex(0); searchFilter.setMaxRows(Integer.MAX_VALUE); List<T> xSvcList = searchResources(searchFilter, searchFields, sortFields, retList); List<T> permittedServices = new ArrayList<T>(); for (T xSvc : xSvcList) { if(bizUtil.hasAccess(xSvc, null)){ permittedServices.add(xSvc); } } if(!permittedServices.isEmpty()) { populatePageList(permittedServices, startIndex, pageSize, retList); } return retList; } RangerServiceServiceBase(); RangerServiceList searchRangerServices(SearchFilter searchFilter); }
RangerServiceServiceBase extends RangerBaseModelService<T, V> { public RangerServiceList searchRangerServices(SearchFilter searchFilter) { RangerServiceList retList = new RangerServiceList(); int startIndex = searchFilter.getStartIndex(); int pageSize = searchFilter.getMaxRows(); searchFilter.setStartIndex(0); searchFilter.setMaxRows(Integer.MAX_VALUE); List<T> xSvcList = searchResources(searchFilter, searchFields, sortFields, retList); List<T> permittedServices = new ArrayList<T>(); for (T xSvc : xSvcList) { if(bizUtil.hasAccess(xSvc, null)){ permittedServices.add(xSvc); } } if(!permittedServices.isEmpty()) { populatePageList(permittedServices, startIndex, pageSize, retList); } return retList; } RangerServiceServiceBase(); RangerServiceList searchRangerServices(SearchFilter searchFilter);  }