Class IdentityTokenGeneration

java.lang.Object
de.xima.fc.form.identitytoken.IdentityTokenGeneration

public class IdentityTokenGeneration extends Object
  • Method Details

    • getGenerationFailed

      public Optional<EIdentityTokenFailure> getGenerationFailed()
      Returns:
      Empty iff generation succeeded, the type of error otherwise.
    • isGenerationSkipped

      public boolean isGenerationSkipped()
      Returns:
      Whether the generation was skipped due to an empty identifier token template or generated token.
    • getToken

      public String getToken()
      Returns:
      The generated token. If the error is EIdentityTokenFailure.GENERATE_MAX_LENGTH_EXCEEDED, this contains the invalid token. Empty for any other error.
    • perform

      @Deprecated public static IdentityTokenGeneration perform(IEntityContext ec, IFormDataAdapter fda, FormVersion formVersion, Projekt project)
      When enabled, an ID is generated based on the data of a submitted form. The form submission is rejected when a form record with the same identity token exists already. This creates the identity token for the given form.
      Parameters:
      ec - Entity context for accessing the database.
      fda - Form data adapter for the form version.
      formVersion - The form version for which to generate the identity token.
      project - The project of the form version.
      Returns:
      The result of the identity token generation.
    • perform

      public static IdentityTokenGeneration perform(IEntityContext ec, IFormDataAdapter fda, Vorgang formRecord, FormVersion formVersion, Projekt project, com.alibaba.fastjson.JSONObject userData)
      When enabled, an ID is generated based on the data of a submitted form. The form submission is rejected when a form record with the same identity token exists already. This creates the identity token for the given form.
      Parameters:
      ec - Entity context for accessing the database.
      fda - Form data adapter for the form version.
      formRecord - Form record of the submitted form, if a form record is available. May be null.
      formVersion - The form version for which to generate the identity token.
      project - The project of the form version.
      userData - Data from the user who submitted the form, if known. May be null.
      Returns:
      The result of the identity token generation.