Package com.adobe.aemds.guide.common
Class GuideContainer
- java.lang.Object
-
- com.adobe.cq.sightly.WCMUsePojo
-
- com.adobe.aemds.guide.common.GuideNode
-
- com.adobe.aemds.guide.common.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 Summary
Constructors Constructor Description GuideContainer()
GuideContainer(Resource resource)
GuideContainer(SlingHttpServletRequest request, Resource resource)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static GuideContainer
from(Resource resource)
Static method to construct aGuideContainer
model from a resourcestatic GuideContainer
from(SlingHttpServletRequest request, Resource resource)
java.lang.String
getAfPath()
Returns the adaptive form Path configured.java.util.Map<java.lang.String,java.lang.Object>
getAuthoringConfig()
Gives the authoring configuration of the adaptive form containerjava.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 strategiesjava.lang.String
getClientLibRef()
Returns the name of the client lib associated with the adaptive form.java.lang.String
getCssFileRef()
Returns the path to the CSS file in CRXDE configured in the authoring of adaptive formJSONObject
getCustomContextPropJson(javax.servlet.http.HttpServletRequest request)
Populates and returns the JSON Object from Custom Property Map attribute from requestjava.lang.String
getDorTemplateRef()
Returns the path of the XDP Template used for generating Document of Record.java.lang.String
getDoRType()
Returns the document of record type configured for the adaptive formjava.lang.String
getGuideContext(GuideModelTransformer guideModelTransformer)
Returns adaptive form specific data required to render an adaptive formjava.lang.String
getGuideCurrentStateJson(java.lang.String locale, java.lang.String dataXml)
Returns the merge json of the adaptive form using the data XML passedjava.lang.String
getGuideInitializationState()
Returns the initialization state of the adaptive form which includes guideJson, guideContext, guideMergeJson, xfaJson, xfaRenderContext.java.lang.String
getGuideInitializationState(boolean clientSideMerge)
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.java.util.List<java.lang.String>
getGuideIntegrationServiceScriptPaths()
java.lang.String
getGuideJson()
Returns the adaptive form information for rendering an adaptive form on Clientjava.util.Calendar
getLastModifiedTime()
Returns the last modified time of the adaptive form Container.java.lang.String
getLayout()
java.lang.String
getLetterRef()
java.lang.String
getMetaTemplateRef()
Returns meta-template reference associated with adaptive form if exists otherwise empty string.java.lang.String
getMobileLayout()
java.lang.String
getPagePath()
Returns the path of the page in which the guideContainer is present.java.lang.Boolean
getParseGridLayoutForMenu()
java.lang.String
getPrefillService()
Returns the prefill service configured in the formjava.lang.String
getRedirect()
GuidePanel
getRootPanel()
Returns the root panel associated with the adaptive form.GuideSchemaType
getSchema()
Returns theGuideSchemaType
configured in the adaptive formjava.lang.String
getSchemaRef()
Returns the path of the Schema used in the adaptive formjava.lang.String
getSchemaType()
Deprecated.java.lang.String
getStatusBarTitle()
GuideItemsContainer
getToolbar()
Returns the tool bar of the adaptive form containerjava.lang.String
getXDPName()
Returns the name of the XDP used in adaptive form.java.lang.String
getXdpRef()
Deprecated.java.lang.String
getXfaJson()
Returns the XDP Template information required to render XDP based adaptive formsjava.lang.String
getXfaRenderContext()
Returns the parameters required for XFA based adaptive forms to render.java.lang.String
getXsdRef()
Deprecated.boolean
isAdobeSignEnabled()
Returns whether AdobeSign is enabled or notboolean
isDoRSubmissionEnabled()
Returns whether send email action should attach DoR PDF or notboolean
isFormFillerFirstSigner()
Returns whether Form filler is first signer or notboolean
isGuideSyncRequired()
Returns if the sync of adaptive form is required or not due to any changes done in XDPboolean
isHasToolbar()
Check if adaptive form container has a toolbarboolean
isMetaTemplateUpdated()
Returns true if meta-template associated with adaptive form is updated.boolean
isMetaTemplateValid()
Checks if path pointed by metaTemplateRef is valid resource.java.lang.Boolean
isOldResponsiveLayoutUsed()
Returns weather the form is using old responsive layout or notboolean
isRenderCall()
Gets the value for renderboolean
isShowAuthoringWarnings()
boolean
isSignatureConfiguredCorrectly()
Returns whether signers are configured correctly or not.boolean
isXDPValid()
Use GuideUtils instead of using this.void
setGuideModelTransformer(GuideModelTransformer guideModelTransformer)
void
setMaxCallCounter(SlingHttpServletRequest request)
Sets the number ofRequestDispatcher.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 attributevoid
setRenderCall(boolean isRenderCall)
boolean
validate(ResourceResolver serviceResourceResolver)
Validate guide container if all required nodes are present, if not present then create them-
Methods inherited from class com.adobe.aemds.guide.common.GuideNode
activate, checkIfPathIsAbsolute, externalize, externalize, getAddMessage, getAppearance, getAuthoringConfigJSON, getBindRef, getColspan, getCssClassName, getDescription, getEnabled, getEnabledExp, getError, getFieldInlineStyles, getGuideFieldType, getHeight, getId, getInlineCssClass, getInlineStyles, getIsEditMode, getIsRepeatable, getIsTitleRichText, getItems, getLayoutPath, getLayoutTabType, getLongDescriptionInlineStyles, getName, getNavTitle, getNodeClass, getNonNavigableProperty, getPath, getQuestionMarkInlineStyles, getRemoveMessage, getResourceSuperType, getResourceType, getResponsiveClasses, getResponsiveConfiguration, getSlingRequest, getStyles, getTargetVersion, getTitle, getToolbarPosition, getVersion, getVisible, getVisibleExp, getWidth, getXssapi, getXssDescription, isDocumentFragmentGroup, isLayoutNavigable, isMenuRequired, isValid, isValidDorTemplateRef, setClientLibRef, setResource, setSlingRequest, setSlingXssApi, syncNode
-
Methods inherited from class com.adobe.cq.sightly.WCMUsePojo
get, getComponent, getComponentContext, getCurrentDesign, getCurrentPage, getCurrentStyle, getDesigner, getEditContext, getInheritedPageProperties, getInheritedProperties, getPageManager, getPageProperties, getProperties, getRequest, getResource, getResourceDesign, getResourcePage, getResourceResolver, getResponse, getSlingScriptHelper, getWcmMode, getXSSAPI, init
-
-
-
-
Constructor Detail
-
GuideContainer
public GuideContainer()
-
GuideContainer
public GuideContainer(SlingHttpServletRequest request, Resource resource)
-
GuideContainer
public GuideContainer(Resource resource)
-
-
Method Detail
-
getRedirect
public java.lang.String getRedirect()
-
setMaxCallCounter
public void setMaxCallCounter(SlingHttpServletRequest request)
Sets the number ofRequestDispatcher.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
-
getAuthoringConfig
public java.util.Map<java.lang.String,java.lang.Object> getAuthoringConfig()
Gives the authoring configuration of the adaptive form container- Overrides:
getAuthoringConfig
in classGuideNode
- 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:
-
getSchema
public GuideSchemaType getSchema()
Returns theGuideSchemaType
configured in the adaptive form- Returns:
GuideSchemaType
-
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 classGuideNode
- 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
-
getToolbar
public GuideItemsContainer getToolbar()
Returns the tool bar of the adaptive form container- Returns:
GuideItemsContainer
toolbar of the adaptive form container- See Also:
GuideItemsContainer
-
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 stringdataXml
- 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 xmllocale
- 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
-
from
public static GuideContainer from(Resource resource)
Static method to construct aGuideContainer
model from a resource- Parameters:
resource
- guideContainerResource
- Returns:
GuideContainer
bean
-
from
public static GuideContainer from(SlingHttpServletRequest request, Resource resource)
- Parameters:
resource
- guideContainerResource
request
-SlingHttpServletRequest
- Returns:
GuideContainer
bean
-
-