/** * Method getTemplateName. * * @param id int * @return String * @see com.percussion.pso.restservice.support.IImportItemSystemInfo#getTemplateName(int) */ public String getTemplateName(int id) { initServices(); log.debug("Getting template name"); String templatename = null; // String templatename=templateNameMap.get(id); if (templatename == null) { try { IPSAssemblyTemplate template = aService.loadTemplate(new PSGuid(PSTypeEnum.TEMPLATE, id), false); templatename = template.getName(); } catch (PSAssemblyException e) { log.error("cannot get template for id " + id, e); templatename = String.valueOf(id); } } IPSAssemblyTemplate template = null; try { template = aService.loadTemplate(new PSGuid(PSTypeEnum.TEMPLATE, id), false); } catch (PSAssemblyException e) { log.error("Cannot find template with id " + id); } log.debug("Got template name"); return (template == null) ? Integer.toString(id) : template.getName(); }