@Test public void testGetPSResourceEntityData() { when(commonClassDao.getData(PolicyScopeResource.class)).thenReturn(new ArrayList<>()); controller.getPSResourceEntityData(response); try { assertTrue(response.getContentAsString() != null && response.getContentAsString().contains("psResourceDictionaryDatas")); } catch (Exception e) { fail(); logger.error(e.getMessage(), e); } }
@RequestMapping( value = {"/get_PSResourceData"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) public void getPSResourceEntityData(HttpServletResponse response) { DictionaryUtils utils = getDictionaryUtilsInstance(); utils.getData(response, psResourceDatas, PolicyScopeResource.class); }
PolicyScopeDictionaryController { @RequestMapping( value = {"/get_PSResourceData"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) public void getPSResourceEntityData(HttpServletResponse response) { DictionaryUtils utils = getDictionaryUtilsInstance(); utils.getData(response, psResourceDatas, PolicyScopeResource.class); } }
PolicyScopeDictionaryController { @RequestMapping( value = {"/get_PSResourceData"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) public void getPSResourceEntityData(HttpServletResponse response) { DictionaryUtils utils = getDictionaryUtilsInstance(); utils.getData(response, psResourceDatas, PolicyScopeResource.class); } PolicyScopeDictionaryController(); @Autowired  PolicyScopeDictionaryController(CommonClassDao commonClassDao); }
PolicyScopeDictionaryController { @RequestMapping( value = {"/get_PSResourceData"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) public void getPSResourceEntityData(HttpServletResponse response) { DictionaryUtils utils = getDictionaryUtilsInstance(); utils.getData(response, psResourceDatas, PolicyScopeResource.class); } PolicyScopeDictionaryController(); @Autowired  PolicyScopeDictionaryController(CommonClassDao commonClassDao); void setCommonClassDao(CommonClassDao commonClassDao); @RequestMapping( value = {"/get_GroupPolicyScopeDataByName"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getGroupPolicyScopeEntityDataByName(HttpServletResponse response); @RequestMapping( value = {"/get_GroupPolicyScopeData"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getGroupPolicyScopeEntityData(HttpServletResponse response); @RequestMapping(value = {"/ps_dictionary/save_psGroupPolicyScope"}, method = {RequestMethod.POST}) ModelAndView savePSGroupScopeDictionary(HttpServletRequest request, HttpServletResponse response); @RequestMapping(value = {"/ps_dictionary/remove_GroupPolicyScope"}, method = {RequestMethod.POST}) void removePSGroupScopeDictionary(HttpServletRequest request, HttpServletResponse response); @RequestMapping( value = {"/get_PSClosedLoopDataByName"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getPSClosedLoopEntityDataByName(HttpServletResponse response); @RequestMapping( value = {"/get_PSClosedLoopData"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getPSClosedLoopEntityData(HttpServletResponse response); @RequestMapping(value = {"/ps_dictionary/save_psClosedLoop"}, method = {RequestMethod.POST}) ModelAndView savePSClosedLoopDictionary(HttpServletRequest request, HttpServletResponse response); @RequestMapping(value = {"/ps_dictionary/remove_PSClosedLoop"}, method = {RequestMethod.POST}) void removePSClosedLoopDictionary(HttpServletRequest request, HttpServletResponse response); @RequestMapping( value = {"/get_PSServiceDataByName"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getPSServiceEntityDataByName(HttpServletResponse response); @RequestMapping( value = {"/get_PSServiceData"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getPSServiceEntityData(HttpServletResponse response); @RequestMapping(value = {"/ps_dictionary/save_psService"}, method = {RequestMethod.POST}) ModelAndView savePSServiceDictionary(HttpServletRequest request, HttpServletResponse response); @RequestMapping(value = {"/ps_dictionary/remove_PSService"}, method = {RequestMethod.POST}) void removePSServiceDictionary(HttpServletRequest request, HttpServletResponse response); @RequestMapping( value = {"/get_PSTypeDataByName"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getPSTypeEntityDataByName(HttpServletResponse response); @RequestMapping( value = {"/get_PSTypeData"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getPSTypeEntityData(HttpServletResponse response); @RequestMapping(value = {"/ps_dictionary/save_psType"}, method = {RequestMethod.POST}) ModelAndView savePSTypeDictionary(HttpServletRequest request, HttpServletResponse response); @RequestMapping(value = {"/ps_dictionary/remove_PSType"}, method = {RequestMethod.POST}) void removePSTypeDictionary(HttpServletRequest request, HttpServletResponse response); @RequestMapping( value = {"/get_PSResourceDataByName"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getPSResourceEntityDataByName(HttpServletResponse response); @RequestMapping( value = {"/get_PSResourceData"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getPSResourceEntityData(HttpServletResponse response); @RequestMapping(value = {"/ps_dictionary/save_psResource"}, method = {RequestMethod.POST}) ModelAndView savePSResourceDictionary(HttpServletRequest request, HttpServletResponse response); @RequestMapping(value = {"/ps_dictionary/remove_PSResource"}, method = {RequestMethod.POST}) void removePSResourceDictionary(HttpServletRequest request, HttpServletResponse response); }
PolicyScopeDictionaryController { @RequestMapping( value = {"/get_PSResourceData"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) public void getPSResourceEntityData(HttpServletResponse response) { DictionaryUtils utils = getDictionaryUtilsInstance(); utils.getData(response, psResourceDatas, PolicyScopeResource.class); } PolicyScopeDictionaryController(); @Autowired  PolicyScopeDictionaryController(CommonClassDao commonClassDao); void setCommonClassDao(CommonClassDao commonClassDao); @RequestMapping( value = {"/get_GroupPolicyScopeDataByName"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getGroupPolicyScopeEntityDataByName(HttpServletResponse response); @RequestMapping( value = {"/get_GroupPolicyScopeData"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getGroupPolicyScopeEntityData(HttpServletResponse response); @RequestMapping(value = {"/ps_dictionary/save_psGroupPolicyScope"}, method = {RequestMethod.POST}) ModelAndView savePSGroupScopeDictionary(HttpServletRequest request, HttpServletResponse response); @RequestMapping(value = {"/ps_dictionary/remove_GroupPolicyScope"}, method = {RequestMethod.POST}) void removePSGroupScopeDictionary(HttpServletRequest request, HttpServletResponse response); @RequestMapping( value = {"/get_PSClosedLoopDataByName"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getPSClosedLoopEntityDataByName(HttpServletResponse response); @RequestMapping( value = {"/get_PSClosedLoopData"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getPSClosedLoopEntityData(HttpServletResponse response); @RequestMapping(value = {"/ps_dictionary/save_psClosedLoop"}, method = {RequestMethod.POST}) ModelAndView savePSClosedLoopDictionary(HttpServletRequest request, HttpServletResponse response); @RequestMapping(value = {"/ps_dictionary/remove_PSClosedLoop"}, method = {RequestMethod.POST}) void removePSClosedLoopDictionary(HttpServletRequest request, HttpServletResponse response); @RequestMapping( value = {"/get_PSServiceDataByName"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getPSServiceEntityDataByName(HttpServletResponse response); @RequestMapping( value = {"/get_PSServiceData"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getPSServiceEntityData(HttpServletResponse response); @RequestMapping(value = {"/ps_dictionary/save_psService"}, method = {RequestMethod.POST}) ModelAndView savePSServiceDictionary(HttpServletRequest request, HttpServletResponse response); @RequestMapping(value = {"/ps_dictionary/remove_PSService"}, method = {RequestMethod.POST}) void removePSServiceDictionary(HttpServletRequest request, HttpServletResponse response); @RequestMapping( value = {"/get_PSTypeDataByName"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getPSTypeEntityDataByName(HttpServletResponse response); @RequestMapping( value = {"/get_PSTypeData"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getPSTypeEntityData(HttpServletResponse response); @RequestMapping(value = {"/ps_dictionary/save_psType"}, method = {RequestMethod.POST}) ModelAndView savePSTypeDictionary(HttpServletRequest request, HttpServletResponse response); @RequestMapping(value = {"/ps_dictionary/remove_PSType"}, method = {RequestMethod.POST}) void removePSTypeDictionary(HttpServletRequest request, HttpServletResponse response); @RequestMapping( value = {"/get_PSResourceDataByName"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getPSResourceEntityDataByName(HttpServletResponse response); @RequestMapping( value = {"/get_PSResourceData"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getPSResourceEntityData(HttpServletResponse response); @RequestMapping(value = {"/ps_dictionary/save_psResource"}, method = {RequestMethod.POST}) ModelAndView savePSResourceDictionary(HttpServletRequest request, HttpServletResponse response); @RequestMapping(value = {"/ps_dictionary/remove_PSResource"}, method = {RequestMethod.POST}) void removePSResourceDictionary(HttpServletRequest request, HttpServletResponse response);  }