@Ignore @Test public void testInitFormData() throws Exception { String expected = IOUtils.toString(getClass().getClassLoader().getResourceAsStream("txt/InitFormData.txt")); assertEquals(expected, closeComplaintServiceTest.get("init-form-data").toString()); }
private Object initFormData() { String mode = getRequest().getParameter("mode"); CloseComplaintForm closeComplaint = new CloseComplaintForm(); ResolveInformation information = new ResolveInformation(); if (!"edit".equals(mode)) { information.setDate(new Date()); } information.setResolveOptions(getStandardLookupEntries("dispositions")); ReferExternal referExternal = new ReferExternal(); if (!"edit".equals(mode)) { referExternal.setDate(new Date()); } ContactMethod contact = new ContactMethod(); contact.setTypes(getStandardLookupEntries("deviceTypes")); referExternal.setContact(contact); closeComplaint.setInformation(information); closeComplaint.setReferExternal(referExternal); JSONObject json = createResponse(closeComplaint); return json; }
CloseComplaintService extends FrevvoFormAbstractService { private Object initFormData() { String mode = getRequest().getParameter("mode"); CloseComplaintForm closeComplaint = new CloseComplaintForm(); ResolveInformation information = new ResolveInformation(); if (!"edit".equals(mode)) { information.setDate(new Date()); } information.setResolveOptions(getStandardLookupEntries("dispositions")); ReferExternal referExternal = new ReferExternal(); if (!"edit".equals(mode)) { referExternal.setDate(new Date()); } ContactMethod contact = new ContactMethod(); contact.setTypes(getStandardLookupEntries("deviceTypes")); referExternal.setContact(contact); closeComplaint.setInformation(information); closeComplaint.setReferExternal(referExternal); JSONObject json = createResponse(closeComplaint); return json; } }
CloseComplaintService extends FrevvoFormAbstractService { private Object initFormData() { String mode = getRequest().getParameter("mode"); CloseComplaintForm closeComplaint = new CloseComplaintForm(); ResolveInformation information = new ResolveInformation(); if (!"edit".equals(mode)) { information.setDate(new Date()); } information.setResolveOptions(getStandardLookupEntries("dispositions")); ReferExternal referExternal = new ReferExternal(); if (!"edit".equals(mode)) { referExternal.setDate(new Date()); } ContactMethod contact = new ContactMethod(); contact.setTypes(getStandardLookupEntries("deviceTypes")); referExternal.setContact(contact); closeComplaint.setInformation(information); closeComplaint.setReferExternal(referExternal); JSONObject json = createResponse(closeComplaint); return json; }  }
CloseComplaintService extends FrevvoFormAbstractService { private Object initFormData() { String mode = getRequest().getParameter("mode"); CloseComplaintForm closeComplaint = new CloseComplaintForm(); ResolveInformation information = new ResolveInformation(); if (!"edit".equals(mode)) { information.setDate(new Date()); } information.setResolveOptions(getStandardLookupEntries("dispositions")); ReferExternal referExternal = new ReferExternal(); if (!"edit".equals(mode)) { referExternal.setDate(new Date()); } ContactMethod contact = new ContactMethod(); contact.setTypes(getStandardLookupEntries("deviceTypes")); referExternal.setContact(contact); closeComplaint.setInformation(information); closeComplaint.setReferExternal(referExternal); JSONObject json = createResponse(closeComplaint); return json; }  @Override Object get(String action); @Override boolean save(String xml, MultiValueMap<String, MultipartFile> attachments); @Override String getFormName(); @Override Class<?> getFormClass(); ComplaintDao getComplaintDao(); void setComplaintDao(ComplaintDao complaintDao); CaseFileDao getCaseFileDao(); void setCaseFileDao(CaseFileDao caseFileDao); CloseComplaintRequestDao getCloseComplaintRequestDao(); void setCloseComplaintRequestDao(CloseComplaintRequestDao closeComplaintRequestDao); ApplicationEventPublisher getApplicationEventPublisher(); void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher); @Override Object convertToFrevvoForm(Object obj, Object form); CloseComplaintRequestFactory getCloseComplaintRequestFactory(); void setCloseComplaintRequestFactory(CloseComplaintRequestFactory closeComplaintRequestFactory); }
CloseComplaintService extends FrevvoFormAbstractService { private Object initFormData() { String mode = getRequest().getParameter("mode"); CloseComplaintForm closeComplaint = new CloseComplaintForm(); ResolveInformation information = new ResolveInformation(); if (!"edit".equals(mode)) { information.setDate(new Date()); } information.setResolveOptions(getStandardLookupEntries("dispositions")); ReferExternal referExternal = new ReferExternal(); if (!"edit".equals(mode)) { referExternal.setDate(new Date()); } ContactMethod contact = new ContactMethod(); contact.setTypes(getStandardLookupEntries("deviceTypes")); referExternal.setContact(contact); closeComplaint.setInformation(information); closeComplaint.setReferExternal(referExternal); JSONObject json = createResponse(closeComplaint); return json; }  @Override Object get(String action); @Override boolean save(String xml, MultiValueMap<String, MultipartFile> attachments); @Override String getFormName(); @Override Class<?> getFormClass(); ComplaintDao getComplaintDao(); void setComplaintDao(ComplaintDao complaintDao); CaseFileDao getCaseFileDao(); void setCaseFileDao(CaseFileDao caseFileDao); CloseComplaintRequestDao getCloseComplaintRequestDao(); void setCloseComplaintRequestDao(CloseComplaintRequestDao closeComplaintRequestDao); ApplicationEventPublisher getApplicationEventPublisher(); void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher); @Override Object convertToFrevvoForm(Object obj, Object form); CloseComplaintRequestFactory getCloseComplaintRequestFactory(); void setCloseComplaintRequestFactory(CloseComplaintRequestFactory closeComplaintRequestFactory);  }