Package com.adobe.aemds.guide.service
Interface GuideModelTransformer
-
public interface GuideModelTransformer
Class representing the adaptive form model transformer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description java.lang.String
exportGuideDataJson(Resource guideContainer, java.lang.String data, I18n i18n)
Deprecated.use the getDataJson APIjava.lang.String
exportGuideDataJsonFromDataRef(Resource guideContainer, java.lang.String dataRef, I18n i18n)
Deprecated.use the getDataJson APIjava.lang.String
exportGuideJson(Resource guideContainer, I18n i18n)
Deprecated.java.lang.String
exportGuideJson(Resource guideContainer, I18n i18n, java.util.Locale locale)
JSONObject
exportGuideJsonObject(Resource guideContainer)
Deprecated.JSONObject
exportGuideJsonObject(Resource guideContainer, JSONCreationOptions jsonCreationOptions)
JSONObject
exportGuideJsonObject(Resource guideContainer, I18n i18n)
Deprecated.JSONObject
exportGuideJsonObject(Resource guideContainer, I18n i18n, java.util.Locale locale)
java.lang.String
exportGuideState(java.lang.String guideStatePath)
java.lang.String
exportGuideStateFromStore(java.lang.String guideStatePathRef)
java.util.Map<java.lang.String,java.lang.String>
exportXfaJson(Resource guideContainer)
java.lang.String
getAdaptiveFormTreeJSON(Resource guideContainer, ResourcePropertyTransformer transformer)
The API returns the information about the Adaptive Form Elements required by the Expression Editorjava.lang.String
getAdaptiveFormTreeJSON(Resource guideContainer, JSONCreationOptions options)
java.lang.String
getDataJson(Resource guideContainer, JSONCreationOptions options)
Returns the JSON after merging Guide Template with the data XMLjava.util.Map<java.lang.String,java.lang.Object>
getGuideContext(GuideContainer guideContainer)
The API returns the context from common AF/MF services for Adaptive Form to renderjava.lang.String
getGuideMergedJson(java.lang.String mergedJsonPath)
Returns the Guide Merged Json available at mergedJsonPathjava.lang.String
readFile(java.lang.String path)
This API should not be used, it is for internal purpose onlyjava.util.Map<java.lang.String,java.lang.Object>
syncXfaProps(GuideContainer guideContainer, java.lang.String locale)
java.util.Map<java.lang.String,java.lang.Object>
syncXfaProps(GuideContainer guideContainer, java.lang.String locale, boolean insertInCache)
java.util.Map<java.lang.String,java.lang.String>[]
validate(java.lang.String dataXml, Resource resource, java.lang.String serverUrl, java.lang.String contextPath)
Deprecated.java.util.Map<java.lang.String,java.lang.String>[]
validate(java.lang.String dataXml, Resource resource, java.lang.String serverUrl, java.lang.String locale, java.lang.String contextPath)
Deprecated.java.util.Map<java.lang.String,java.lang.String>[]
validate(java.lang.String dataXml, Resource resource, java.lang.String serverUrl, java.lang.String locale, java.lang.String contextPath, java.lang.String fileAttachmentMap)
Deprecated.GuideValidationResult
validateData(java.lang.String dataXml, Resource resource, java.lang.String serverUrl, java.lang.String locale, java.lang.String contextPath, java.lang.String fileAttachmentMap)
This API performs Server Side validation for an adaptive formGuideValidationResult
validateForm(ValidationOptions validationOptions)
This API performs Server Side and captcha validation for an adaptive form.
-
-
-
Method Detail
-
exportGuideJson
java.lang.String exportGuideJson(Resource guideContainer, I18n i18n) throws GuideException
Deprecated.- Throws:
GuideException
-
exportGuideJson
java.lang.String exportGuideJson(Resource guideContainer, I18n i18n, java.util.Locale locale) throws GuideException
- Throws:
GuideException
-
exportGuideJsonObject
JSONObject exportGuideJsonObject(Resource guideContainer) throws GuideException
Deprecated.- Throws:
GuideException
-
exportGuideJsonObject
JSONObject exportGuideJsonObject(Resource guideContainer, JSONCreationOptions jsonCreationOptions) throws GuideException
- Throws:
GuideException
-
exportGuideJsonObject
JSONObject exportGuideJsonObject(Resource guideContainer, I18n i18n) throws GuideException
Deprecated.- Throws:
GuideException
-
exportGuideJsonObject
JSONObject exportGuideJsonObject(Resource guideContainer, I18n i18n, java.util.Locale locale) throws GuideException
- Throws:
GuideException
-
exportXfaJson
java.util.Map<java.lang.String,java.lang.String> exportXfaJson(Resource guideContainer) throws GuideException
- Throws:
GuideException
-
exportGuideState
java.lang.String exportGuideState(java.lang.String guideStatePath) throws GuideException
- Throws:
GuideException
-
exportGuideStateFromStore
java.lang.String exportGuideStateFromStore(java.lang.String guideStatePathRef) throws GuideException
- Throws:
GuideException
-
exportGuideDataJson
@Deprecated java.lang.String exportGuideDataJson(Resource guideContainer, java.lang.String data, I18n i18n) throws GuideException
Deprecated.use the getDataJson API- Throws:
GuideException
-
exportGuideDataJsonFromDataRef
@Deprecated java.lang.String exportGuideDataJsonFromDataRef(Resource guideContainer, java.lang.String dataRef, I18n i18n) throws GuideException
Deprecated.use the getDataJson API- Throws:
GuideException
-
syncXfaProps
java.util.Map<java.lang.String,java.lang.Object> syncXfaProps(GuideContainer guideContainer, java.lang.String locale) throws GuideException
- Parameters:
guideContainer
-locale
-- Throws:
GuideException
-
syncXfaProps
java.util.Map<java.lang.String,java.lang.Object> syncXfaProps(GuideContainer guideContainer, java.lang.String locale, boolean insertInCache)
- Parameters:
guideContainer
- GuideContainer beanlocale
-insertInCache
- flag to control the insertion of computed content in cache- Returns:
- Map
Map consisting of two keys "guidejson" and "xfajson" (xfajson represents the json whose props have been sync with guide)
-
readFile
java.lang.String readFile(java.lang.String path)
This API should not be used, it is for internal purpose only- Parameters:
path
-
-
validate
@Deprecated java.util.Map<java.lang.String,java.lang.String>[] validate(java.lang.String dataXml, Resource resource, java.lang.String serverUrl, java.lang.String locale, java.lang.String contextPath, java.lang.String fileAttachmentMap) throws GuideException
Deprecated.This API performs Server Side validation for an adaptive form Returns an array of hash map with two keys("som", "errorText")- Parameters:
dataXml
- String representing data of Adaptive Form in XMLresource
- Resource pointing to the Adaptive Form ContainerserverUrl
- URL of the Server to be used for conversion of Rest Calls during server side validationlocale
- Locale to be used while getting the merged json from the data xmlcontextPath
- context path of the serverfileAttachmentMap
- file attachment map of the file attachments- Returns:
- Array of HashMap, Suppose the output is stored in a variable named map, then map[0].get("som") will give the som expression of the field not valid and map[0].get("errorText") gives the error message of the invalid field.
- Throws:
GuideException
- See Also:
Resource
-
validate
@Deprecated java.util.Map<java.lang.String,java.lang.String>[] validate(java.lang.String dataXml, Resource resource, java.lang.String serverUrl, java.lang.String locale, java.lang.String contextPath) throws GuideException
Deprecated.This API performs Server Side validation for an adaptive form Returns an array of hash map with two keys("som", "errorText")- Parameters:
dataXml
- String representing data of Adaptive Form in XMLresource
- Resource pointing to the Adaptive Form ContainerserverUrl
- URL of the Server to be used for conversion of Rest Calls during server side validationlocale
- Locale to be used while getting the merged json from the data xmlcontextPath
- context path of the server- Returns:
- Array of HashMap, Suppose the output is stored in a variable named map, then map[0].get("som") will give the som expression of the field not valid and map[0].get("errorText") gives the error message of the invalid field.
- Throws:
GuideException
- See Also:
Resource
-
validate
@Deprecated java.util.Map<java.lang.String,java.lang.String>[] validate(java.lang.String dataXml, Resource resource, java.lang.String serverUrl, java.lang.String contextPath) throws GuideException
Deprecated.This API performs Server Side validation for an adaptive form Returns an array of hash map with two keys("som", "errorText")- Parameters:
dataXml
- String representing data of adaptive form in XMLresource
- Resource pointing to the adaptive form ContainerserverUrl
- URL of the Server to be used for conversion of Rest Calls during server side validationcontextPath
- context path of the server- Returns:
- Array of HashMap, Suppose the output is stored in a variable named map, then map[0].get("som") will give the som expression of the field not valid and map[0].get("errorText") gives the error message of the invalid field.
- Throws:
GuideException
- See Also:
Resource
-
validateData
GuideValidationResult validateData(java.lang.String dataXml, Resource resource, java.lang.String serverUrl, java.lang.String locale, java.lang.String contextPath, java.lang.String fileAttachmentMap) throws GuideException
This API performs Server Side validation for an adaptive form- Parameters:
dataXml
- String representing data of adaptive form in XMLresource
- Resource pointing to the adaptive form ContainerserverUrl
- URL of the Server to be used for conversion of Rest Calls during server side validationcontextPath
- context path of the serverfileAttachmentMap
- file attachment map of the file attachments- Returns:
- Result of server side validation
- Throws:
GuideException
- See Also:
GuideValidationResult
-
validateForm
GuideValidationResult validateForm(ValidationOptions validationOptions) throws GuideException
This API performs Server Side and captcha validation for an adaptive form. If a non-empty som expression is provided, the captcha validation is skipped, captcha validation is performed only for form. For example, if one needs to validate a panel, then the corresponding somExpression of panel is set viaValidationOptions.ValidationOptionsBuilder.setSomExpression(String)
- Parameters:
validationOptions
- ValidationOptions object, options input for validation- Returns:
- Result of server side and captcha validation
- Throws:
GuideException
- See Also:
GuideValidationResult
-
getAdaptiveFormTreeJSON
java.lang.String getAdaptiveFormTreeJSON(Resource guideContainer, ResourcePropertyTransformer transformer) throws JSONException
The API returns the information about the Adaptive Form Elements required by the Expression Editor- Parameters:
guideContainer
- Adaptive Form Container resource for which the information is required- Returns:
- Serialized JSON of the Adaptive Form containing the properties required for each object.
- Throws:
JSONException
-
getAdaptiveFormTreeJSON
java.lang.String getAdaptiveFormTreeJSON(Resource guideContainer, JSONCreationOptions options) throws JSONException
- Throws:
JSONException
-
getDataJson
java.lang.String getDataJson(Resource guideContainer, JSONCreationOptions options) throws GuideException
Returns the JSON after merging Guide Template with the data XML- Parameters:
guideContainer
- Guide Container resource which has to be merged with data XMLoptions
- Options for merging Guide- Returns:
- JSON representation of adaptive from after merging with data XML(if present)
- Throws:
GuideException
-
getGuideMergedJson
java.lang.String getGuideMergedJson(java.lang.String mergedJsonPath) throws GuideException
Returns the Guide Merged Json available at mergedJsonPath- Parameters:
mergedJsonPath
- Path to guidemergedjson data- Returns:
- guide merged json
- Throws:
GuideException
-
getGuideContext
java.util.Map<java.lang.String,java.lang.Object> getGuideContext(@Nonnull GuideContainer guideContainer) throws GuideException
The API returns the context from common AF/MF services for Adaptive Form to render- Parameters:
guideContainer
- Adaptive Form Container for which the information is required- Returns:
- map containing the guide context
- Throws:
GuideException
-
-