Package de.xima.fc.form.identitytoken
Class IdentityTokenGeneration
- java.lang.Object
 - 
- de.xima.fc.form.identitytoken.IdentityTokenGeneration
 
 
- 
public class IdentityTokenGeneration extends Object
 
- 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<EIdentityTokenFailure>getGenerationFailed()StringgetToken()booleanisGenerationSkipped()static IdentityTokenGenerationperform(IEntityContext ec, IFormDataAdapter fda, FormVersion formVersion, Projekt project)When enabled, an ID is generated based on the data of a submitted form. 
 - 
 
- 
- 
Method Detail
- 
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
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.- Returns:
 - The result of the identity token generation.
 
 
 - 
 
 -