test_class.declarator: TEST_TENANT = "test-tenant"
test_class.modifier: private static final
test_class.original_string: private static final String TEST_TENANT = "test-tenant";
test_class.type: String
test_class.var_name: TEST_TENANT
test_class.declarator: TENANT_ID_1 = "z341mmd3ifaasdjm23midijjiro"
test_class.modifier: private static final
test_class.original_string: private static final String TENANT_ID_1 = "z341mmd3ifaasdjm23midijjiro";
test_class.type: String
test_class.var_name: TENANT_ID_1
test_class.declarator: CONNECTION_STRING = "jdbc:hsqldb:mem:target/rules.db"
test_class.modifier: private static final
test_class.original_string: private static final String CONNECTION_STRING = "jdbc:hsqldb:mem:target/rules.db";
test_class.type: String
test_class.var_name: CONNECTION_STRING
test_class.declarator: TARGET_RULES_DB = "target/rules.db"
test_class.modifier: private static final
test_class.original_string: private static final String TARGET_RULES_DB = "target/rules.db";
test_class.type: String
test_class.var_name: TARGET_RULES_DB
test_class.declarator: emf
test_class.modifier: private static
test_class.original_string: private static EntityManagerFactory emf;
test_class.type: EntityManagerFactory
test_class.var_name: emf
test_class.declarator: em
test_class.modifier: private
test_class.original_string: private EntityManager em;
test_class.type: EntityManager
test_class.var_name: em
test_class.declarator: producer
test_class.modifier: @Mock
  	private
test_class.original_string: @Mock
  	private KafkaProducer<String, String> producer;
test_class.type: KafkaProducer<String, String>
test_class.var_name: producer
test_class.declarator: am
test_class.modifier: @Mock
  	private
test_class.original_string: @Mock
  	private ApplicationManager am;
test_class.type: ApplicationManager
test_class.var_name: am
test_class.declarator: id
test_class.modifier: private static
test_class.original_string: private static short id;
test_class.type: short
test_class.var_name: id
test_class.declarator: tenant
test_class.modifier: private
test_class.original_string: private Tenant tenant;
test_class.type: Tenant
test_class.var_name: tenant
test_class.file: hendrix-api/src/test/java/io/symcpe/hendrix/api/dao/TestTemplateManager.java
test_class.identifier: TestTemplateManager
test_case.body: @Test
  	public void testGetTemplate() throws Exception {
  		AlertTemplates templates = new AlertTemplates();
  		tenant = TemplateManager.getInstance().getTenant(em, TENANT_ID_1);
  		id = TemplateManager.getInstance().createNewTemplate(em, templates, tenant).getTemplateId();
  		AlertTemplates template = TemplateManager.getInstance().getTemplate(em, tenant.getTenant_id(), id);
  		assertEquals(id, template.getTemplateId());
  	}
test_case.class_method_signature: TestTemplateManager.testGetTemplate()
test_case.full_signature: @Test public void testGetTemplate()
test_case.identifier: testGetTemplate
test_case.invocations: getTenant getInstance getTemplateId createNewTemplate getInstance getTemplate getInstance getTenant_id assertEquals getTemplateId
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetTemplate()
focal_class.declarator: HENDRIX_TEMPLATE_UPDATES_TXT = "~/hendrix/template-updates.txt"
focal_class.modifier: private static final
focal_class.original_string: private static final String HENDRIX_TEMPLATE_UPDATES_TXT = "~/hendrix/template-updates.txt";
focal_class.type: String
focal_class.var_name: HENDRIX_TEMPLATE_UPDATES_TXT
focal_class.declarator: logger = Logger.getLogger(TemplateManager.class.getName())
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = Logger.getLogger(TemplateManager.class.getName());
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: PARAM_TEMPLATE_ID = "templateId"
focal_class.modifier: private static final
focal_class.original_string: private static final String PARAM_TEMPLATE_ID = "templateId";
focal_class.type: String
focal_class.var_name: PARAM_TEMPLATE_ID
focal_class.declarator: PARAM_TENANT_ID = "tenantId"
focal_class.modifier: private static final
focal_class.original_string: private static final String PARAM_TENANT_ID = "tenantId";
focal_class.type: String
focal_class.var_name: PARAM_TENANT_ID
focal_class.declarator: TEMPLATE_MANAGER = new TemplateManager()
focal_class.modifier: private static
focal_class.original_string: private static TemplateManager TEMPLATE_MANAGER = new TemplateManager();
focal_class.type: TemplateManager
focal_class.var_name: TEMPLATE_MANAGER
focal_class.file: hendrix-api/src/main/java/io/symcpe/hendrix/api/dao/TemplateManager.java
focal_class.identifier: TemplateManager
focal_class.class_method_signature: TemplateManager.TemplateManager()
focal_class.full_signature: private  TemplateManager()
focal_class.identifier: TemplateManager
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  TemplateManager()
focal_class.class_method_signature: TemplateManager.getInstance()
focal_class.full_signature: public static TemplateManager getInstance()
focal_class.identifier: getInstance
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: TemplateManager
focal_class.signature: TemplateManager getInstance()
focal_class.class_method_signature: TemplateManager.getTemplateContents(EntityManager em, String tenantId, boolean pretty)
focal_class.full_signature: public String getTemplateContents(EntityManager em, String tenantId, boolean pretty)
focal_class.identifier: getTemplateContents
focal_class.modifiers: public
focal_class.parameters: (EntityManager em, String tenantId, boolean pretty)
focal_class.return: String
focal_class.signature: String getTemplateContents(EntityManager em, String tenantId, boolean pretty)
focal_class.class_method_signature: TemplateManager.getTemplate(EntityManager em, String tenantId, short templateId)
focal_class.full_signature: public AlertTemplates getTemplate(EntityManager em, String tenantId, short templateId)
focal_class.identifier: getTemplate
focal_class.modifiers: public
focal_class.parameters: (EntityManager em, String tenantId, short templateId)
focal_class.return: AlertTemplates
focal_class.signature: AlertTemplates getTemplate(EntityManager em, String tenantId, short templateId)
focal_class.class_method_signature: TemplateManager.getTemplates(EntityManager em, String tenantId)
focal_class.full_signature: public List<AlertTemplates> getTemplates(EntityManager em, String tenantId)
focal_class.identifier: getTemplates
focal_class.modifiers: public
focal_class.parameters: (EntityManager em, String tenantId)
focal_class.return: List<AlertTemplates>
focal_class.signature: List<AlertTemplates> getTemplates(EntityManager em, String tenantId)
focal_class.class_method_signature: TemplateManager.createNewTemplate(EntityManager em, AlertTemplates templates, Tenant tenant)
focal_class.full_signature: public AlertTemplate createNewTemplate(EntityManager em, AlertTemplates templates, Tenant tenant)
focal_class.identifier: createNewTemplate
focal_class.modifiers: public
focal_class.parameters: (EntityManager em, AlertTemplates templates, Tenant tenant)
focal_class.return: AlertTemplate
focal_class.signature: AlertTemplate createNewTemplate(EntityManager em, AlertTemplates templates, Tenant tenant)
focal_class.class_method_signature: TemplateManager.saveTemplate(EntityManager em, AlertTemplates templates, Tenant tenant, AlertTemplate currTemplate,
  			ApplicationManager am)
focal_class.full_signature: public AlertTemplate saveTemplate(EntityManager em, AlertTemplates templates, Tenant tenant, AlertTemplate currTemplate,
  			ApplicationManager am)
focal_class.identifier: saveTemplate
focal_class.modifiers: public
focal_class.parameters: (EntityManager em, AlertTemplates templates, Tenant tenant, AlertTemplate currTemplate,
  			ApplicationManager am)
focal_class.return: AlertTemplate
focal_class.signature: AlertTemplate saveTemplate(EntityManager em, AlertTemplates templates, Tenant tenant, AlertTemplate currTemplate,
  			ApplicationManager am)
focal_class.class_method_signature: TemplateManager.getTemplateObj(EntityManager em, String tenantId, short templateId)
focal_class.full_signature: public AlertTemplate getTemplateObj(EntityManager em, String tenantId, short templateId)
focal_class.identifier: getTemplateObj
focal_class.modifiers: public
focal_class.parameters: (EntityManager em, String tenantId, short templateId)
focal_class.return: AlertTemplate
focal_class.signature: AlertTemplate getTemplateObj(EntityManager em, String tenantId, short templateId)
focal_class.class_method_signature: TemplateManager.deleteTemplate(EntityManager em, String tenantId, short templateId, ApplicationManager am)
focal_class.full_signature: public void deleteTemplate(EntityManager em, String tenantId, short templateId, ApplicationManager am)
focal_class.identifier: deleteTemplate
focal_class.modifiers: public
focal_class.parameters: (EntityManager em, String tenantId, short templateId, ApplicationManager am)
focal_class.return: void
focal_class.signature: void deleteTemplate(EntityManager em, String tenantId, short templateId, ApplicationManager am)
focal_class.class_method_signature: TemplateManager.deleteTemplates(EntityManager em, Tenant tenant, ApplicationManager am)
focal_class.full_signature: public void deleteTemplates(EntityManager em, Tenant tenant, ApplicationManager am)
focal_class.identifier: deleteTemplates
focal_class.modifiers: public
focal_class.parameters: (EntityManager em, Tenant tenant, ApplicationManager am)
focal_class.return: void
focal_class.signature: void deleteTemplates(EntityManager em, Tenant tenant, ApplicationManager am)
focal_class.class_method_signature: TemplateManager.sendTemplateToKafka(boolean delete, String tenantId, AlertTemplate template, ApplicationManager am)
focal_class.full_signature: public void sendTemplateToKafka(boolean delete, String tenantId, AlertTemplate template, ApplicationManager am)
focal_class.identifier: sendTemplateToKafka
focal_class.modifiers: public
focal_class.parameters: (boolean delete, String tenantId, AlertTemplate template, ApplicationManager am)
focal_class.return: void
focal_class.signature: void sendTemplateToKafka(boolean delete, String tenantId, AlertTemplate template, ApplicationManager am)
focal_class.class_method_signature: TemplateManager.sendTemplateToKafka(boolean delete, String tenantId, String templateJson, ApplicationManager am)
focal_class.full_signature: public void sendTemplateToKafka(boolean delete, String tenantId, String templateJson, ApplicationManager am)
focal_class.identifier: sendTemplateToKafka
focal_class.modifiers: public
focal_class.parameters: (boolean delete, String tenantId, String templateJson, ApplicationManager am)
focal_class.return: void
focal_class.signature: void sendTemplateToKafka(boolean delete, String tenantId, String templateJson, ApplicationManager am)
focal_class.class_method_signature: TemplateManager.getTenant(EntityManager em, String tenantId)
focal_class.full_signature: public Tenant getTenant(EntityManager em, String tenantId)
focal_class.identifier: getTenant
focal_class.modifiers: public
focal_class.parameters: (EntityManager em, String tenantId)
focal_class.return: Tenant
focal_class.signature: Tenant getTenant(EntityManager em, String tenantId)
focal_method.body: public AlertTemplates getTemplate(EntityManager em, String tenantId, short templateId) throws Exception {
  		try {
  			AlertTemplates result = em.createNamedQuery(Queries.TEMPLATE_FIND_BY_ID, AlertTemplates.class)
  					.setParameter("templateId", templateId).setParameter("tenantId", tenantId).getSingleResult();
  			return result;
  		} catch (Exception e) {
  			throw new NoResultException("Template:" + templateId + " not found");
  		}
  	}
focal_method.class_method_signature: TemplateManager.getTemplate(EntityManager em, String tenantId, short templateId)
focal_method.full_signature: public AlertTemplates getTemplate(EntityManager em, String tenantId, short templateId)
focal_method.identifier: getTemplate
focal_method.invocations: getSingleResult setParameter setParameter createNamedQuery
focal_method.modifiers: public
focal_method.parameters: (EntityManager em, String tenantId, short templateId)
focal_method.return: AlertTemplates
focal_method.signature: AlertTemplates getTemplate(EntityManager em, String tenantId, short templateId)