@RequestMapping(value={"/{id}"},method=RequestMethod.GET) @ResponseBody public RestWrapper list(@PathVariable("id") Integer processTemplateId,Principal principal){
  RestWrapper restWrapper=null;
  try {
    PropertiesTemplate propertiesTemplate=new PropertiesTemplate();
    propertiesTemplate.setProcessTemplateId(processTemplateId);
    List<PropertiesTemplate> propertiesTemplateList=propertiesTemplateDAO.listPropertiesTemplateBean(processTemplateId);
    restWrapper=new RestWrapper(propertiesTemplateList,RestWrapper.OK);
    LOGGER.info("Record with ID:" + processTemplateId + " selected from PropertiesTemplate by User:"+ principal.getName());
  }
 catch (  Exception e) {
    LOGGER.error(e);
    restWrapper=new RestWrapper(e.getMessage(),RestWrapper.ERROR);
  }
  return restWrapper;
}

@ RequestMapping ( value = { "/{id}" } , method = RequestMethod . GET ) @ ResponseBody public RestWrapper list ( @ PathVariable ( "id" ) Integer processTemplateId , Principal principal ) { RestWrapper restWrapper = null ; try { PropertiesTemplate propertiesTemplate = new PropertiesTemplate ( ) ; propertiesTemplate . setProcessTemplateId ( processTemplateId ) ; List < PropertiesTemplate > propertiesTemplateList = propertiesTemplateDAO . listPropertiesTemplateBean ( processTemplateId ) ; restWrapper = new RestWrapper ( propertiesTemplateList , RestWrapper . OK ) ; LOGGER . info ( "Record with ID:" + processTemplateId + " selected 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 listproperties and fetches a list of records from properties table corresponding to processid passed .
