class CaseFormServiceImpl implements CaseFormService {

    public boolean isReady() {
        User.Role roleType = PrimeroAppConfiguration.getCurrentUser().getRoleType();
        if (roleType == User.Role.CP) {
            return caseFormDao.getCaseForm(PrimeroAppConfiguration.MODULE_ID_CP, PrimeroAppConfiguration
                    .getApiBaseUrl()) != null && caseFormDao
                    .getCaseForm(PrimeroAppConfiguration.MODULE_ID_CP, PrimeroAppConfiguration.getApiBaseUrl())
                    .getForm() != null;
        }
        if (roleType == User.Role.GBV) {
            return caseFormDao.getCaseForm(PrimeroAppConfiguration.MODULE_ID_GBV, PrimeroAppConfiguration
                    .getApiBaseUrl()) != null &&
                    caseFormDao.getCaseForm(PrimeroAppConfiguration.MODULE_ID_GBV, PrimeroAppConfiguration
                            .getApiBaseUrl()).getForm() != null;
        }
        return caseFormDao.getCaseForm(PrimeroAppConfiguration.MODULE_ID_CP, PrimeroAppConfiguration.getApiBaseUrl()) != null && caseFormDao
                .getCaseForm(PrimeroAppConfiguration.MODULE_ID_CP, PrimeroAppConfiguration.getApiBaseUrl()).getForm() != null;
    }

    public  CaseFormServiceImpl(CaseFormDao caseFormDao);

}