Interface GuideModelTransformer


  • public interface GuideModelTransformer
    Class representing the adaptive form model transformer
    • Method Detail

      • 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 bean
        locale -
        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 XML
        resource - Resource pointing to the Adaptive Form Container
        serverUrl - URL of the Server to be used for conversion of Rest Calls during server side validation
        locale - Locale to be used while getting the merged json from the data xml
        contextPath - context path of the server
        fileAttachmentMap - 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 XML
        resource - Resource pointing to the Adaptive Form Container
        serverUrl - URL of the Server to be used for conversion of Rest Calls during server side validation
        locale - Locale to be used while getting the merged json from the data xml
        contextPath - 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 XML
        resource - Resource pointing to the adaptive form Container
        serverUrl - URL of the Server to be used for conversion of Rest Calls during server side validation
        contextPath - 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 XML
        resource - Resource pointing to the adaptive form Container
        serverUrl - URL of the Server to be used for conversion of Rest Calls during server side validation
        contextPath - context path of the server
        fileAttachmentMap - file attachment map of the file attachments
        Returns:
        Result of server side 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
      • 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 XML
        options - 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