Package de.xima.fc.form.request
Class FormRequestValidator
- java.lang.Object
-
- de.xima.fc.form.request.FormRequestValidator
-
public class FormRequestValidator extends Object
Class for validating anIExtendedFormRequestContext
s by checking usage-privileges- Author:
- XIMA MEDIA GmbH
-
-
Constructor Summary
Constructors Constructor Description FormRequestValidator()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static boolean
checkPreviewContext(IExtendedFormRequestContext requestCtx)
static boolean
checkPreviewContext(IExtendedFormRequestContext requestCtx, boolean writeError)
static boolean
checkPrintContext(IExtendedFormRequestContext requestCtx, boolean writeError)
static boolean
checkProvideCtx(IExtendedFormRequestContext requestCtx)
static boolean
checkProvideCtx(IExtendedFormRequestContext requestCtx, boolean writeError)
static boolean
checkProzessCtx(IExtendedFormRequestContext requestCtx)
static boolean
checkProzessCtx(IExtendedFormRequestContext requestCtx, boolean writeError)
static boolean
checkReviewCtx(IExtendedFormRequestContext requestCtx)
static boolean
checkReviewCtx(IExtendedFormRequestContext requestCtx, boolean writeError)
static boolean
checkWorkflowCtx(IExtendedFormRequestContext requestCtx)
static boolean
checkWorkflowCtx(IExtendedFormRequestContext requestCtx, boolean writeError)
static boolean
hasNoActiveFormVersion(IExtendedFormRequestContext requestCtx, boolean writeError)
static boolean
isFormLimitReached(IExtendedFormRequestContext requestCtx, boolean writeError)
static boolean
isFormModuleNotRunning(IExtendedFormRequestContext requestCtx, boolean writeError)
static boolean
isFormRecordHasErrors(IExtendedFormRequestContext requestCtx, boolean writeError)
static boolean
isFormUnavailableDueToOfflineRestrictions(IExtendedFormRequestContext requestCtx, boolean writeError)
Checks whether the form is unavailable due to being offline.static boolean
isFsForbidden(IExtendedFormRequestContext requestCtx, boolean writeError)
static boolean
isInactiveFormVersion(IExtendedFormRequestContext requestCtx, boolean writeError)
Lieferttrue
, wenn die im Kontext gesetzte FormVersion nicht die aktive FormVersion des Projektes ist.static boolean
isInvalidFormVersion(IExtendedFormRequestContext requestCtx, boolean writeError)
static boolean
isInvalidProjektState(IExtendedFormRequestContext requestCtx, boolean writeError)
Ein Projekt ist valide, wenn es existiert UND ein aktives Formular (activeFormVersion) besitzt.static boolean
isInvalidRequestType(IExtendedFormRequestContext requestCtx, boolean writeError)
static boolean
isKerberosUnauthorized(IExtendedFormRequestContext requestCtx, boolean writeError)
Deprecated.userFormAuthContext
orKerberosAuthenticator
static boolean
isNTLMUnauthorized(IExtendedFormRequestContext requestCtx, boolean writeError)
Deprecated.userFormAuthContext
orNtlmAuthenticator
static boolean
isProjektNotExcisting(IExtendedFormRequestContext requestCtx, boolean writeError)
static boolean
isProjektOffline(IExtendedFormRequestContext requestCtx, boolean writeError)
Deprecated.UseisFormUnavailableDueToOfflineRestrictions(IExtendedFormRequestContext, boolean)
, the name better reflects what the function does.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.static boolean
isUnauthorizedPostfachbearbeiter(IExtendedFormRequestContext requestCtx, boolean writeError)
Check if the user is allowed to review the process in the current inboxstatic boolean
isUnauthorizedPreview(IExtendedFormRequestContext requestCtx, boolean writeError)
static boolean
isUnauthorizedReprovide(IExtendedFormRequestContext requestCtx, boolean writeError)
Deprecated.Is now checked inisUnauthorizedBenutzer(IExtendedFormRequestContext, boolean)
.
-
-
-
Method Detail
-
checkProzessCtx
public static boolean checkProzessCtx(IExtendedFormRequestContext requestCtx)
-
checkProzessCtx
public static boolean checkProzessCtx(IExtendedFormRequestContext requestCtx, boolean writeError)
-
checkWorkflowCtx
public static boolean checkWorkflowCtx(IExtendedFormRequestContext requestCtx)
-
checkWorkflowCtx
public static boolean checkWorkflowCtx(IExtendedFormRequestContext requestCtx, boolean writeError)
-
checkPreviewContext
public static boolean checkPreviewContext(IExtendedFormRequestContext requestCtx)
-
checkPreviewContext
public static boolean checkPreviewContext(IExtendedFormRequestContext requestCtx, boolean writeError)
-
checkPrintContext
public static boolean checkPrintContext(IExtendedFormRequestContext requestCtx, boolean writeError)
-
checkProvideCtx
public static boolean checkProvideCtx(IExtendedFormRequestContext requestCtx)
-
checkProvideCtx
public static boolean checkProvideCtx(IExtendedFormRequestContext requestCtx, boolean writeError)
-
checkReviewCtx
public static boolean checkReviewCtx(IExtendedFormRequestContext requestCtx)
-
checkReviewCtx
public static boolean checkReviewCtx(IExtendedFormRequestContext requestCtx, boolean writeError)
-
isInvalidProjektState
public static boolean isInvalidProjektState(IExtendedFormRequestContext requestCtx, boolean writeError)
Ein Projekt ist valide, wenn es existiert UND ein aktives Formular (activeFormVersion) besitzt.
-
isInvalidFormVersion
public static boolean isInvalidFormVersion(IExtendedFormRequestContext requestCtx, boolean writeError)
-
isInvalidRequestType
public static boolean isInvalidRequestType(IExtendedFormRequestContext requestCtx, boolean writeError)
-
isFormRecordHasErrors
public static boolean isFormRecordHasErrors(IExtendedFormRequestContext requestCtx, boolean writeError)
-
hasNoActiveFormVersion
public static boolean hasNoActiveFormVersion(IExtendedFormRequestContext requestCtx, boolean writeError)
-
isProjektNotExcisting
public static boolean isProjektNotExcisting(IExtendedFormRequestContext requestCtx, boolean writeError)
-
isProjektOffline
@Deprecated public static boolean isProjektOffline(IExtendedFormRequestContext requestCtx, boolean writeError)
Deprecated.UseisFormUnavailableDueToOfflineRestrictions(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.getOfflineModeProvide()
etc.); AND one of the following condition holds:- the form is marked as always offline (
Project#isActive()
- or when a date range (
Project#getAvailableFrom()
-Project#getAvailableUntil()
) is set and the current point in time falls outside that range.
- 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.
- the form is marked as always offline (
-
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:- the form is marked as always offline (
Project#isActive()
- or when a date range (
Project#getAvailableFrom()
-Project#getAvailableUntil()
) is set and the current point in time falls outside that range.
- 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.
- the form is marked as always offline (
-
isUnauthorizedReprovide
@Deprecated public static boolean isUnauthorizedReprovide(IExtendedFormRequestContext requestCtx, boolean writeError)
Deprecated.Is now checked inisUnauthorizedBenutzer(IExtendedFormRequestContext, boolean)
. Check if the current user is allowed to view the current process- Parameters:
requestCtx
-IExtendedFormRequestContext
with the user and processwriteError
-Boolean
if errors should be written into re response- Returns:
Boolean
is user is unauthorized
-
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 processwriteError
-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.
-
isUnauthorizedPreview
public static boolean isUnauthorizedPreview(IExtendedFormRequestContext requestCtx, boolean writeError)
-
isNTLMUnauthorized
@Deprecated public static boolean isNTLMUnauthorized(IExtendedFormRequestContext requestCtx, boolean writeError)
Deprecated.userFormAuthContext
orNtlmAuthenticator
-
isKerberosUnauthorized
@Deprecated public static boolean isKerberosUnauthorized(IExtendedFormRequestContext requestCtx, boolean writeError)
Deprecated.userFormAuthContext
orKerberosAuthenticator
-
isInactiveFormVersion
public static boolean isInactiveFormVersion(IExtendedFormRequestContext requestCtx, boolean writeError)
Lieferttrue
, wenn die im Kontext gesetzte FormVersion nicht die aktive FormVersion des Projektes ist.
-
isFsForbidden
public static boolean isFsForbidden(IExtendedFormRequestContext requestCtx, boolean writeError)
- Parameters:
requestCtx
-IExtendedFormRequestContext
with request-datawriteError
-Boolean
if errors should be written into re response- Returns:
Boolean
is user is unauthorized
-
isFormModuleNotRunning
public static boolean isFormModuleNotRunning(IExtendedFormRequestContext requestCtx, boolean writeError)
-
isFormLimitReached
public static boolean isFormLimitReached(IExtendedFormRequestContext requestCtx, boolean writeError)
-
-