@Test public void testCreateDraftAllowed() { Assert.assertNull(AuthoritiesHelperUtil.performUniqueAndModuleValidation(new IntygUser(""), DB, createEmptyPreviousDraftAndCertificates(), dbModuleApiV1)); }
public static ValidateDraftCreationResponse performUniqueAndModuleValidation( IntygUser user, String certificateType, Map<String, Map<String, PreviousIntyg>> previousDraftAndCertificates, ModuleApi moduleApi) { ValidateDraftCreationResponse certificateValidation = validateUniqueCertificate(user, certificateType, previousDraftAndCertificates); ValidateDraftCreationResponse draftValidation = validateUniqueDraft(user, certificateType, previousDraftAndCertificates); ValidateDraftCreationResponse certificateTypeSpecificValidation = validateCertificateTypeSpecifics(moduleApi, previousDraftAndCertificates); return getPrimaryValidationMessage(certificateValidation, draftValidation, certificateTypeSpecificValidation); }
AuthoritiesHelperUtil { public static ValidateDraftCreationResponse performUniqueAndModuleValidation( IntygUser user, String certificateType, Map<String, Map<String, PreviousIntyg>> previousDraftAndCertificates, ModuleApi moduleApi) { ValidateDraftCreationResponse certificateValidation = validateUniqueCertificate(user, certificateType, previousDraftAndCertificates); ValidateDraftCreationResponse draftValidation = validateUniqueDraft(user, certificateType, previousDraftAndCertificates); ValidateDraftCreationResponse certificateTypeSpecificValidation = validateCertificateTypeSpecifics(moduleApi, previousDraftAndCertificates); return getPrimaryValidationMessage(certificateValidation, draftValidation, certificateTypeSpecificValidation); } }
AuthoritiesHelperUtil { public static ValidateDraftCreationResponse performUniqueAndModuleValidation( IntygUser user, String certificateType, Map<String, Map<String, PreviousIntyg>> previousDraftAndCertificates, ModuleApi moduleApi) { ValidateDraftCreationResponse certificateValidation = validateUniqueCertificate(user, certificateType, previousDraftAndCertificates); ValidateDraftCreationResponse draftValidation = validateUniqueDraft(user, certificateType, previousDraftAndCertificates); ValidateDraftCreationResponse certificateTypeSpecificValidation = validateCertificateTypeSpecifics(moduleApi, previousDraftAndCertificates); return getPrimaryValidationMessage(certificateValidation, draftValidation, certificateTypeSpecificValidation); } private  AuthoritiesHelperUtil(); }
AuthoritiesHelperUtil { public static ValidateDraftCreationResponse performUniqueAndModuleValidation( IntygUser user, String certificateType, Map<String, Map<String, PreviousIntyg>> previousDraftAndCertificates, ModuleApi moduleApi) { ValidateDraftCreationResponse certificateValidation = validateUniqueCertificate(user, certificateType, previousDraftAndCertificates); ValidateDraftCreationResponse draftValidation = validateUniqueDraft(user, certificateType, previousDraftAndCertificates); ValidateDraftCreationResponse certificateTypeSpecificValidation = validateCertificateTypeSpecifics(moduleApi, previousDraftAndCertificates); return getPrimaryValidationMessage(certificateValidation, draftValidation, certificateTypeSpecificValidation); } private  AuthoritiesHelperUtil(); static boolean mayNotCreateUtkastForSekretessMarkerad(SekretessStatus sekretessStatus, IntygUser user,
                                                                 String intygsTyp); static ValidateDraftCreationResponse performUniqueAndModuleValidation(
            IntygUser user,
            String certificateType,
            Map<String, Map<String, PreviousIntyg>> previousDraftAndCertificates,
            ModuleApi moduleApi); }
AuthoritiesHelperUtil { public static ValidateDraftCreationResponse performUniqueAndModuleValidation( IntygUser user, String certificateType, Map<String, Map<String, PreviousIntyg>> previousDraftAndCertificates, ModuleApi moduleApi) { ValidateDraftCreationResponse certificateValidation = validateUniqueCertificate(user, certificateType, previousDraftAndCertificates); ValidateDraftCreationResponse draftValidation = validateUniqueDraft(user, certificateType, previousDraftAndCertificates); ValidateDraftCreationResponse certificateTypeSpecificValidation = validateCertificateTypeSpecifics(moduleApi, previousDraftAndCertificates); return getPrimaryValidationMessage(certificateValidation, draftValidation, certificateTypeSpecificValidation); } private  AuthoritiesHelperUtil(); static boolean mayNotCreateUtkastForSekretessMarkerad(SekretessStatus sekretessStatus, IntygUser user,
                                                                 String intygsTyp); static ValidateDraftCreationResponse performUniqueAndModuleValidation(
            IntygUser user,
            String certificateType,
            Map<String, Map<String, PreviousIntyg>> previousDraftAndCertificates,
            ModuleApi moduleApi); static final String DRAFT_FROM_SAME_CARE_PROVIDER_AND_UNIT_EXISTS; static final String DRAFT_FROM_SAME_CARE_PROVIDER_ON_OTHER_UNIT_EXISTS; static final String DRAFT_FROM_OTHER_CARE_PROVIDER_EXISTS; static final String CERTIFICATE_FROM_SAME_CARE_PROVIDER_AND_UNIT_EXISTS; static final String CERTIFICATE_FROM_SAME_CARE_PROVIDER_ON_OTHER_UNIT_EXISTS; static final String CERTIFICATE_FROM_OTHER_CARE_PROVIDER_EXISTS; static final String CERTIFICATE_FROM_OTHER_CARE_PROVIDER_EXISTS_OVERRIDE; }