Class GuideContainer

  • All Implemented Interfaces:
    FDField, StyledFDField, java.io.Serializable, Use
    Direct Known Subclasses:
    GuideFragmentContainer

    public class GuideContainer
    extends GuideNode
    GuideContainer encapsulates basic properties of an adaptive form Container. adaptive form Container contains the entire adaptive forms related semantics. This consists of few basic properties:
    • XDP Reference of adaptive form if any
    • Initialization State of adaptive form container
    • Client Library if configured for the adaptive form
    Since:
    6.0
    See Also:
    Serialized Form
    • Constructor Detail

      • GuideContainer

        public GuideContainer()
      • GuideContainer

        public GuideContainer​(Resource resource)
    • Method Detail

      • getRedirect

        public java.lang.String getRedirect()
      • setMaxCallCounter

        public void setMaxCallCounter​(SlingHttpServletRequest request)
        Sets the number of RequestDispatcher.include(ServletRequest, ServletResponse) calls that can be reached within the given request if the limit set by system is less than a threshold or someone has explicitly set sling.max.calls in request attribute
        Parameters:
        request - The request to check
      • isOldResponsiveLayoutUsed

        public java.lang.Boolean isOldResponsiveLayoutUsed()
        Returns weather the form is using old responsive layout or not
        Returns:
        Boolean true if the form is using old responsive layout
      • validate

        public boolean validate​(ResourceResolver serviceResourceResolver)
        Validate guide container if all required nodes are present, if not present then create them
        Overrides:
        validate in class GuideNode
        Parameters:
        serviceResourceResolver - reference to service resource resolver since validate would require access to immutable content
        Returns:
      • getAuthoringConfig

        public java.util.Map<java.lang.String,​java.lang.Object> getAuthoringConfig()
        Gives the authoring configuration of the adaptive form container
        Overrides:
        getAuthoringConfig in class GuideNode
        Returns:
        authoring config of adaptive form container
      • getDoRType

        public java.lang.String getDoRType()
        Returns the document of record type configured for the adaptive form
        Returns:
        String representing Document of record type
      • getXdpRef

        public java.lang.String getXdpRef()
        Deprecated.
        Returns the path of the XDP used in the adaptive form
        Returns:
        String representing the XDP reference
      • getLetterRef

        public java.lang.String getLetterRef()
      • getMetaTemplateRef

        public java.lang.String getMetaTemplateRef()
        Returns meta-template reference associated with adaptive form if exists otherwise empty string.
        Returns:
        path of meta-template if exists otherwise empty string
      • getAutoSaveStrategyFilePath

        public java.lang.String getAutoSaveStrategyFilePath()
        Returns the entire path till init.jsp for the autoSave strategy selected in case of forms built over 6.0 For 6.1, it returns relative path to support overlay of auto save strategies
      • getDorTemplateRef

        public java.lang.String getDorTemplateRef()
        Returns the path of the XDP Template used for generating Document of Record. This returns empty String in case of XDP based adaptive forms or if no DOR template is associated while creating adaptive forms
        Returns:
        Path of the DOR Template in CRXDE
      • getLastModifiedTime

        public java.util.Calendar getLastModifiedTime()
        Returns the last modified time of the adaptive form Container.
        Returns:
        last modified time of the adaptive form container
        Throws:
        javax.jcr.RepositoryException
      • getXsdRef

        public java.lang.String getXsdRef()
        Deprecated.
        Returns the path of the XSD used in the adaptive form
        Returns:
        reference to the XSD configured for the adaptive form
      • getSchemaRef

        public java.lang.String getSchemaRef()
        Returns the path of the Schema used in the adaptive form
        Returns:
        reference to the Schema configured for the adaptive form. This reference could be XSD, XDP, JSON or an FDM
      • getSchemaType

        public java.lang.String getSchemaType()
        Deprecated.
        Returns the type of the schema configured in the adaptive form
        Returns:
        String representing schemaType of form it could have any of the following values present in the GuideSchemaType enum
      • getPrefillService

        public java.lang.String getPrefillService()
        Returns the prefill service configured in the form
        Returns:
      • getCssFileRef

        public java.lang.String getCssFileRef()
        Returns the path to the CSS file in CRXDE configured in the authoring of adaptive form
        Returns:
        String representing the path to the CSS file configured during authoring.
      • getClientLibRef

        public java.lang.String getClientLibRef()
        Returns the name of the client lib associated with the adaptive form.
        Overrides:
        getClientLibRef in class GuideNode
        Returns:
        String Name of the client lib
      • isHasToolbar

        public boolean isHasToolbar()
        Check if adaptive form container has a toolbar
        Returns:
        true, if toolbar present false otherwise
      • getAfPath

        public java.lang.String getAfPath()
        Returns the adaptive form Path configured. Used particularly for usecase when someone wants to embed adaptive forms inside a web page
        Returns:
        path of the adaptive form configured
      • getRootPanel

        public GuidePanel getRootPanel()
        Returns the root panel associated with the adaptive form. Root Panel is the parent panel which holds other panel's
        Returns:
        Reference to the root panel GuidePanel
        See Also:
        GuidePanel
      • isGuideSyncRequired

        public boolean isGuideSyncRequired()
        Returns if the sync of adaptive form is required or not due to any changes done in XDP
        Returns:
        boolean indicating if sync required or not
      • isAdobeSignEnabled

        public boolean isAdobeSignEnabled()
        Returns whether AdobeSign is enabled or not
        Returns:
      • isDoRSubmissionEnabled

        public boolean isDoRSubmissionEnabled()
        Returns whether send email action should attach DoR PDF or not
        Returns:
      • isFormFillerFirstSigner

        public boolean isFormFillerFirstSigner()
        Returns whether Form filler is first signer or not
        Returns:
      • isSignatureConfiguredCorrectly

        public boolean isSignatureConfiguredCorrectly()
        Returns whether signers are configured correctly or not.
        Returns:
      • isMetaTemplateUpdated

        public boolean isMetaTemplateUpdated()
        Returns true if meta-template associated with adaptive form is updated.
        Returns:
        boolean indicating if meta-template has been updated.
      • isShowAuthoringWarnings

        public boolean isShowAuthoringWarnings()
      • getStatusBarTitle

        public java.lang.String getStatusBarTitle()
      • getMobileLayout

        public java.lang.String getMobileLayout()
      • getParseGridLayoutForMenu

        public java.lang.Boolean getParseGridLayoutForMenu()
      • getXDPName

        public java.lang.String getXDPName()
        Returns the name of the XDP used in adaptive form. Returns null for non XDP based Forms
        Returns:
        String representing the name of the XDP used
      • isXDPValid

        public boolean isXDPValid()
        Use GuideUtils instead of using this.
      • setGuideModelTransformer

        public void setGuideModelTransformer​(GuideModelTransformer guideModelTransformer)
        Parameters:
        guideModelTransformer -
      • getXfaRenderContext

        public java.lang.String getXfaRenderContext()
                                             throws GuideException
        Returns the parameters required for XFA based adaptive forms to render.
        Returns:
        containing these parameters
        Throws:
        GuideException
      • getXfaJson

        public java.lang.String getXfaJson()
                                    throws GuideException
        Returns the XDP Template information required to render XDP based adaptive forms
        Returns:
        String containing the XDP Template Information
        Throws:
        GuideException
      • getGuideCurrentStateJson

        public java.lang.String getGuideCurrentStateJson​(java.lang.String locale,
                                                         java.lang.String dataXml)
        Returns the merge json of the adaptive form using the data XML passed
        Parameters:
        locale - locale string
        dataXml - String representing data of adaptive form as XML
        Returns:
        String Merge JSON formed after merge of
      • getGuideContext

        public java.lang.String getGuideContext​(GuideModelTransformer guideModelTransformer)
        Returns adaptive form specific data required to render an adaptive form
        Returns:
        String containing the specific data
      • getGuideJson

        public java.lang.String getGuideJson()
        Returns the adaptive form information for rendering an adaptive form on Client
        Returns:
        String containing adaptive form Information
      • getLayout

        public java.lang.String getLayout()
      • getGuideIntegrationServiceScriptPaths

        public java.util.List<java.lang.String> getGuideIntegrationServiceScriptPaths()
      • getGuideInitializationState

        public java.lang.String getGuideInitializationState()
        Returns the initialization state of the adaptive form which includes guideJson, guideContext, guideMergeJson, xfaJson, xfaRenderContext.
        Returns:
        String representing the JSON of the guide initialization state
      • getGuideInitializationState

        public java.lang.String getGuideInitializationState​(java.lang.String dataXml,
                                                            java.lang.String locale)
        Returns the initialization state of the adaptive from the data XML and locale passed. This initialization state includes guideJson, guideContext, guideMergeJson, xfaJson, xfaRenderContext.
        Parameters:
        dataXml - string representing data xml
        locale - locale string
        Returns:
        String representing the guide initialization state
      • getGuideInitializationState

        public java.lang.String getGuideInitializationState​(boolean clientSideMerge)
      • setRenderCall

        public void setRenderCall​(boolean isRenderCall)
        Parameters:
        isRenderCall - true if you do not want JSON of 'on demand' children
      • isRenderCall

        public boolean isRenderCall()
        Gets the value for render
        Returns:
        boolean value indicating if its a render call
      • getCustomContextPropJson

        public JSONObject getCustomContextPropJson​(javax.servlet.http.HttpServletRequest request)
        Populates and returns the JSON Object from Custom Property Map attribute from request
        Parameters:
        request -
        Returns:
        json object representing the custom context property set in the request
      • getPagePath

        public java.lang.String getPagePath()
        Returns the path of the page in which the guideContainer is present.
        Returns:
        path of the page in which the adaptive form container is present
      • isMetaTemplateValid

        public boolean isMetaTemplateValid()
        Checks if path pointed by metaTemplateRef is valid resource.
        Returns:
        false if the resource is null or metaTemplateRef property is null/empty string, true otherwise