Class FormRequestValidator

    • Constructor Detail

      • FormRequestValidator

        public FormRequestValidator()
    • Method Detail

      • isInvalidProjektState

        public static boolean isInvalidProjektState​(IExtendedFormRequestContext requestCtx,
                                                    boolean writeError)
        Ein Projekt ist valide, wenn es existiert UND ein aktives Formular (activeFormVersion) besitzt.
      • hasNoActiveFormVersion

        public static boolean hasNoActiveFormVersion​(IExtendedFormRequestContext requestCtx,
                                                     boolean writeError)
      • isProjektOffline

        @Deprecated
        public static boolean isProjektOffline​(IExtendedFormRequestContext requestCtx,
                                               boolean writeError)
        Deprecated.
        Use isFormUnavailableDueToOfflineRestrictions(IExtendedFormRequestContext, boolean), the name better reflects what the function does.
        Checks whether the form is unavailable due to being offline. This is the case when the form is not allowed to be opened or submitted when offline (Projekt#isOfflineProvideOpen() etc.); AND one of the following condition holds:
        Parameters:
        requestCtx - Current request context with the requested form.
        writeError - When true, respond to the HTTP request with an error when the form is offline.
        Returns:
        Whether the form is not available due to offline restrictions.
      • isFormUnavailableDueToOfflineRestrictions

        public static boolean isFormUnavailableDueToOfflineRestrictions​(IExtendedFormRequestContext requestCtx,
                                                                        boolean writeError)
        Checks whether the form is unavailable due to being offline. This is the case when the form is not allowed to be opened or submitted when offline (Projekt#isOfflineProvideOpen() etc.); AND one of the following condition holds:
        Parameters:
        requestCtx - Current request context with the requested form.
        writeError - When true, respond to the HTTP request with an error when the form is offline.
        Returns:
        Whether the form is not available due to offline restrictions.
      • isUnauthorizedPostfachbearbeiter

        public static boolean isUnauthorizedPostfachbearbeiter​(IExtendedFormRequestContext requestCtx,
                                                               boolean writeError)
        Check if the user is allowed to review the process in the current inbox
        Parameters:
        requestCtx - IExtendedFormRequestContext with the user and process
        writeError - Boolean if errors should be written into re response
        Returns:
        Boolean is user is unauthorized
      • isUnauthorizedBenutzer

        public static boolean isUnauthorizedBenutzer​(IExtendedFormRequestContext requestCtx,
                                                     boolean writeError)
        Ein Anwender ist zum Ansehen eines Formulars (projekt) authorisiert, wenn
        • dem Projekt KEINE Benutzergruppen zugeordnet sind und kein Teilnahmepasswort festgelegt wurde (Projekt besitzt keine Zugriffsbeschränkung); oder
        • innerhalb der Session das korrekte Teilnahmepasswort eingegeben wurde; oder
        • der Formularzugriff innerhalb des aktuellen Projektes auf bestimmte Benutzergruppen beschränkt ist und der aktuelle Benutzer in mindestens einer dieser Benutzergruppe ist.
      • isInactiveFormVersion

        public static boolean isInactiveFormVersion​(IExtendedFormRequestContext requestCtx,
                                                    boolean writeError)
        Liefert true, wenn die im Kontext gesetzte FormVersion nicht die aktive FormVersion des Projektes ist.
      • isFormModuleNotRunning

        public static boolean isFormModuleNotRunning​(IExtendedFormRequestContext requestCtx,
                                                     boolean writeError)