Package de.xima.fc.formstore
Class StoreFormMetaValidator
java.lang.Object
de.xima.fc.formstore.StoreFormMetaValidator
Validates the
metadata.json
data contained in a form store file.- Since:
- 8.0.0
- Author:
- XIMA MEDIA GmbH
-
Constructor Summary
ConstructorsConstructorDescriptionStoreFormMetaValidator
(Mandant client) Creates a new validator for the form store meta contained in a form store file. -
Method Summary
Modifier and TypeMethodDescriptionreadFormStoreFileAndValidate
(byte[] formStoreFile) readFormStoreFileAndValidate
(InputStream formStoreFile) validate
(StoreFormMeta meta) org.apache.commons.lang3.tuple.Pair<StoreFormMeta,
StoreFormMetaValidationResult>
-
Constructor Details
-
StoreFormMetaValidator
Creates a new validator for the form store meta contained in a form store file.- Parameters:
client
- The client scope where the form should be imported.
-
-
Method Details
-
readFormStoreFileAndValidate
public ValidatedFormStoreFile readFormStoreFileAndValidate(byte[] formStoreFile) throws StoreFormMetaValidationException - Parameters:
formStoreFile
- Form store file (*.xfs) to validate.- Returns:
- All validation violations that were found.
- Throws:
StoreFormMetaValidationException
- When the validation could not be performed due to an unexpected error.
-
readFormStoreFileAndValidate
public ValidatedFormStoreFile readFormStoreFileAndValidate(InputStream formStoreFile) throws StoreFormMetaValidationException - Parameters:
formStoreFile
- Form store file (*.xfs) to validate.- Returns:
- All validation violations that were found.
- Throws:
StoreFormMetaValidationException
- When the validation could not be performed due to an unexpected error.
-
validate
public StoreFormMetaValidationResult validate(StoreFormMeta meta) throws StoreFormMetaValidationException - Parameters:
meta
- Form store meta to validate.- Returns:
- All validation violations that were found.
- Throws:
StoreFormMetaValidationException
- When the validation could not be performed due to an unexpected error.
-
validate
public org.apache.commons.lang3.tuple.Pair<StoreFormMeta,StoreFormMetaValidationResult> validate(String meta) throws StoreFormMetaValidationException - Parameters:
meta
- Form store meta JSON to validate.- Returns:
- All validation violations that were found.
- Throws:
StoreFormMetaValidationException
- When the validation could not be performed due to an unexpected error.
-