@Test public void test21searchRangerServiceDefs() { setup(); SearchFilter searchFilter = new SearchFilter(); searchFilter.setParam(SearchFilter.POLICY_NAME, "policyName"); searchFilter.setParam(SearchFilter.SERVICE_NAME, "serviceName"); RangerServiceDefList dbRangerServiceDefList = rangerServiceDefService .searchRangerServiceDefs(searchFilter); Assert.assertNotNull(dbRangerServiceDefList); }
public RangerServiceDefList searchRangerServiceDefs(SearchFilter searchFilter) { RangerServiceDefList retList = new RangerServiceDefList(); int startIndex = searchFilter.getStartIndex(); int pageSize = searchFilter.getMaxRows(); searchFilter.setStartIndex(0); searchFilter.setMaxRows(Integer.MAX_VALUE); boolean isAuditPage=false; if(searchFilter.getParam("pageSource")!=null){ isAuditPage=true; } List<T> xSvcDefList = searchResources(searchFilter, searchFields, sortFields, retList); List<T> permittedServiceDefs = new ArrayList<T>(); for (T xSvcDef : xSvcDefList) { if (bizUtil.hasAccess(xSvcDef, null) || (bizUtil.isAdmin() && isAuditPage) ) { permittedServiceDefs.add(xSvcDef); } } if (!permittedServiceDefs.isEmpty()) { populatePageList(permittedServiceDefs, startIndex, pageSize, retList); } return retList; }
RangerServiceDefServiceBase extends RangerBaseModelService<T, V> { public RangerServiceDefList searchRangerServiceDefs(SearchFilter searchFilter) { RangerServiceDefList retList = new RangerServiceDefList(); int startIndex = searchFilter.getStartIndex(); int pageSize = searchFilter.getMaxRows(); searchFilter.setStartIndex(0); searchFilter.setMaxRows(Integer.MAX_VALUE); boolean isAuditPage=false; if(searchFilter.getParam("pageSource")!=null){ isAuditPage=true; } List<T> xSvcDefList = searchResources(searchFilter, searchFields, sortFields, retList); List<T> permittedServiceDefs = new ArrayList<T>(); for (T xSvcDef : xSvcDefList) { if (bizUtil.hasAccess(xSvcDef, null) || (bizUtil.isAdmin() && isAuditPage) ) { permittedServiceDefs.add(xSvcDef); } } if (!permittedServiceDefs.isEmpty()) { populatePageList(permittedServiceDefs, startIndex, pageSize, retList); } return retList; } }
RangerServiceDefServiceBase extends RangerBaseModelService<T, V> { public RangerServiceDefList searchRangerServiceDefs(SearchFilter searchFilter) { RangerServiceDefList retList = new RangerServiceDefList(); int startIndex = searchFilter.getStartIndex(); int pageSize = searchFilter.getMaxRows(); searchFilter.setStartIndex(0); searchFilter.setMaxRows(Integer.MAX_VALUE); boolean isAuditPage=false; if(searchFilter.getParam("pageSource")!=null){ isAuditPage=true; } List<T> xSvcDefList = searchResources(searchFilter, searchFields, sortFields, retList); List<T> permittedServiceDefs = new ArrayList<T>(); for (T xSvcDef : xSvcDefList) { if (bizUtil.hasAccess(xSvcDef, null) || (bizUtil.isAdmin() && isAuditPage) ) { permittedServiceDefs.add(xSvcDef); } } if (!permittedServiceDefs.isEmpty()) { populatePageList(permittedServiceDefs, startIndex, pageSize, retList); } return retList; } RangerServiceDefServiceBase(); }
RangerServiceDefServiceBase extends RangerBaseModelService<T, V> { public RangerServiceDefList searchRangerServiceDefs(SearchFilter searchFilter) { RangerServiceDefList retList = new RangerServiceDefList(); int startIndex = searchFilter.getStartIndex(); int pageSize = searchFilter.getMaxRows(); searchFilter.setStartIndex(0); searchFilter.setMaxRows(Integer.MAX_VALUE); boolean isAuditPage=false; if(searchFilter.getParam("pageSource")!=null){ isAuditPage=true; } List<T> xSvcDefList = searchResources(searchFilter, searchFields, sortFields, retList); List<T> permittedServiceDefs = new ArrayList<T>(); for (T xSvcDef : xSvcDefList) { if (bizUtil.hasAccess(xSvcDef, null) || (bizUtil.isAdmin() && isAuditPage) ) { permittedServiceDefs.add(xSvcDef); } } if (!permittedServiceDefs.isEmpty()) { populatePageList(permittedServiceDefs, startIndex, pageSize, retList); } return retList; } RangerServiceDefServiceBase(); XXServiceConfigDef populateRangerServiceConfigDefToXX(RangerServiceConfigDef vObj, XXServiceConfigDef xObj,
			XXServiceDef serviceDef, int operationContext); RangerServiceConfigDef populateXXToRangerServiceConfigDef(XXServiceConfigDef xObj); XXResourceDef populateRangerResourceDefToXX(RangerResourceDef vObj, XXResourceDef xObj,
			XXServiceDef serviceDef, int operationContext); RangerResourceDef populateXXToRangerResourceDef(XXResourceDef xObj); XXAccessTypeDef populateRangerAccessTypeDefToXX(RangerAccessTypeDef vObj, XXAccessTypeDef xObj,
			XXServiceDef serviceDef, int operationContext); RangerAccessTypeDef populateXXToRangerAccessTypeDef(XXAccessTypeDef xObj); XXPolicyConditionDef populateRangerPolicyConditionDefToXX(RangerPolicyConditionDef vObj,
			XXPolicyConditionDef xObj, XXServiceDef serviceDef, int operationContext); RangerPolicyConditionDef populateXXToRangerPolicyConditionDef(XXPolicyConditionDef xObj); XXContextEnricherDef populateRangerContextEnricherDefToXX(RangerContextEnricherDef vObj,
			XXContextEnricherDef xObj, XXServiceDef serviceDef, int operationContext); RangerContextEnricherDef populateXXToRangerContextEnricherDef(XXContextEnricherDef xObj); XXEnumDef populateRangerEnumDefToXX(RangerEnumDef vObj, XXEnumDef xObj, XXServiceDef serviceDef,
			int operationContext); RangerEnumDef populateXXToRangerEnumDef(XXEnumDef xObj); XXEnumElementDef populateRangerEnumElementDefToXX(RangerEnumElementDef vObj, XXEnumElementDef xObj,
			XXEnumDef enumDef, int operationContext); RangerEnumElementDef populateXXToRangerEnumElementDef(XXEnumElementDef xObj); XXDataMaskTypeDef populateRangerDataMaskDefToXX(RangerDataMaskTypeDef vObj, XXDataMaskTypeDef xObj,
														   XXServiceDef serviceDef, int operationContext); RangerDataMaskTypeDef populateXXToRangerDataMaskTypeDef(XXDataMaskTypeDef xObj); RangerServiceDefList searchRangerServiceDefs(SearchFilter searchFilter); String objectToJson(Serializable obj); DST jsonToObject(String jsonStr, Class<DST> clz); }
RangerServiceDefServiceBase extends RangerBaseModelService<T, V> { public RangerServiceDefList searchRangerServiceDefs(SearchFilter searchFilter) { RangerServiceDefList retList = new RangerServiceDefList(); int startIndex = searchFilter.getStartIndex(); int pageSize = searchFilter.getMaxRows(); searchFilter.setStartIndex(0); searchFilter.setMaxRows(Integer.MAX_VALUE); boolean isAuditPage=false; if(searchFilter.getParam("pageSource")!=null){ isAuditPage=true; } List<T> xSvcDefList = searchResources(searchFilter, searchFields, sortFields, retList); List<T> permittedServiceDefs = new ArrayList<T>(); for (T xSvcDef : xSvcDefList) { if (bizUtil.hasAccess(xSvcDef, null) || (bizUtil.isAdmin() && isAuditPage) ) { permittedServiceDefs.add(xSvcDef); } } if (!permittedServiceDefs.isEmpty()) { populatePageList(permittedServiceDefs, startIndex, pageSize, retList); } return retList; } RangerServiceDefServiceBase(); XXServiceConfigDef populateRangerServiceConfigDefToXX(RangerServiceConfigDef vObj, XXServiceConfigDef xObj,
			XXServiceDef serviceDef, int operationContext); RangerServiceConfigDef populateXXToRangerServiceConfigDef(XXServiceConfigDef xObj); XXResourceDef populateRangerResourceDefToXX(RangerResourceDef vObj, XXResourceDef xObj,
			XXServiceDef serviceDef, int operationContext); RangerResourceDef populateXXToRangerResourceDef(XXResourceDef xObj); XXAccessTypeDef populateRangerAccessTypeDefToXX(RangerAccessTypeDef vObj, XXAccessTypeDef xObj,
			XXServiceDef serviceDef, int operationContext); RangerAccessTypeDef populateXXToRangerAccessTypeDef(XXAccessTypeDef xObj); XXPolicyConditionDef populateRangerPolicyConditionDefToXX(RangerPolicyConditionDef vObj,
			XXPolicyConditionDef xObj, XXServiceDef serviceDef, int operationContext); RangerPolicyConditionDef populateXXToRangerPolicyConditionDef(XXPolicyConditionDef xObj); XXContextEnricherDef populateRangerContextEnricherDefToXX(RangerContextEnricherDef vObj,
			XXContextEnricherDef xObj, XXServiceDef serviceDef, int operationContext); RangerContextEnricherDef populateXXToRangerContextEnricherDef(XXContextEnricherDef xObj); XXEnumDef populateRangerEnumDefToXX(RangerEnumDef vObj, XXEnumDef xObj, XXServiceDef serviceDef,
			int operationContext); RangerEnumDef populateXXToRangerEnumDef(XXEnumDef xObj); XXEnumElementDef populateRangerEnumElementDefToXX(RangerEnumElementDef vObj, XXEnumElementDef xObj,
			XXEnumDef enumDef, int operationContext); RangerEnumElementDef populateXXToRangerEnumElementDef(XXEnumElementDef xObj); XXDataMaskTypeDef populateRangerDataMaskDefToXX(RangerDataMaskTypeDef vObj, XXDataMaskTypeDef xObj,
														   XXServiceDef serviceDef, int operationContext); RangerDataMaskTypeDef populateXXToRangerDataMaskTypeDef(XXDataMaskTypeDef xObj); RangerServiceDefList searchRangerServiceDefs(SearchFilter searchFilter); String objectToJson(Serializable obj); DST jsonToObject(String jsonStr, Class<DST> clz);  }