Package de.xima.fc.form.identitytoken
Class IdentityTokenUpdate
java.lang.Object
de.xima.fc.form.identitytoken.IdentityTokenUpdate
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IdentityTokenUpdate
perform
(IEntityContext ec, Projekt project) Deprecated.static IdentityTokenUpdate
perform
(IEntityContext ec, Projekt project, com.alibaba.fastjson.JSONObject userData) Updates the identity token of all form records for the given project with the current identity token template of that project.
-
Constructor Details
-
IdentityTokenUpdate
protected IdentityTokenUpdate()
-
-
Method Details
-
getUpdateFailed
- Returns:
- Empty if the update succeeded, the type of error otherwise.
-
getViolations
- Returns:
- List of all violations, ie. form-records with non-unique IDs. The key of the entry is the generated identity token, the value a list of all form records with that token.
-
getFailedFormRecord
- Returns:
- If the update failed and the error is
EIdentityTokenFailure.GENERATE_MAX_LENGTH_EXCEEDED
orEIdentityTokenFailure.UPDATE_NOT_UNIQUE
, one form record that caused the failure.
-
perform
Deprecated.Updates the identity token of all form records for the given project with the current identity token template of that project. Returns whether the operation succeeded. If it did not succeed because the new identity token template resulted in multiple form records with the same identity token, also return the list of form records violating the uniqueness constraint.- Parameters:
ec
- Entity context for accessing the database.project
- The project with the form records to update.- Returns:
- The result of the identity token check.
-
perform
public static IdentityTokenUpdate perform(IEntityContext ec, Projekt project, com.alibaba.fastjson.JSONObject userData) Updates the identity token of all form records for the given project with the current identity token template of that project. Returns whether the operation succeeded. If it did not succeed because the new identity token template resulted in multiple form records with the same identity token, also return the list of form records violating the uniqueness constraint.- Parameters:
ec
- Entity context for accessing the database.project
- The project with the form records to update.userData
- Data from the user who submitted the form, if known. May benull
.- Returns:
- The result of the identity token check.
-
perform(IEntityContext, Projekt, JSONObject)
.