class 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;
    }

}