@RequestMapping(value={"","/"},method=RequestMethod.GET) @ResponseBody public RestWrapper list(@RequestParam(value="page",defaultValue="0") int startPage,@RequestParam(value="size",defaultValue="10") int pageSize,Principal principal){
  RestWrapper restWrapper=null;
  try {
    List<PropertiesTemplate> getPropertiesTemplate=propertiesTemplateDAO.listPropertyTemplate(startPage,pageSize);
    restWrapper=new RestWrapper(getPropertiesTemplate,RestWrapper.OK);
    LOGGER.info("All records listed from PropertiesTemplate by User:" + principal.getName());
  }
 catch (  Exception e) {
    LOGGER.error(e);
    restWrapper=new RestWrapper(e.getMessage(),RestWrapper.ERROR);
  }
  return restWrapper;
}

@ RequestMapping ( value = { "" , "/" } , method = RequestMethod . GET ) @ ResponseBody public RestWrapper list ( @ RequestParam ( value = "page" , defaultValue = "0" ) int startPage , @ RequestParam ( value = "size" , defaultValue = "10" ) int pageSize , Principal principal ) { RestWrapper restWrapper = null ; try { List < PropertiesTemplate > getPropertiesTemplate = propertiesTemplateDAO . listPropertyTemplate ( startPage , pageSize ) ; restWrapper = new RestWrapper ( getPropertiesTemplate , RestWrapper . OK ) ; LOGGER . info ( "All records listed from PropertiesTemplate by User:" + principal . getName ( ) ) ; } catch ( Exception e ) { LOGGER . error ( e ) ; restWrapper = new RestWrapper ( e . getMessage ( ) , RestWrapper . ERROR ) ; } return restWrapper ; }
this method calls proc listproperty and fetches a list of instances of properties .
