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 formorg.apache.sling.commons.json.JSONObject
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.util.List<java.lang.String>
getGuideIntegrationServiceScriptPaths()
java.util.Calendar
getLastModifiedTime()
Returns the last modified time of the adaptive form Container.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
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.boolean
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
setRenderCall(boolean isRenderCall)
java.lang.Boolean
useExternalEmailTemplate()
Returns whether form is using external template in Email Submit Action Return value can beBoolean.TRUE
,Boolean.FALSE
or null True value indicates user has chose external email template False value indicates user has not chosen external email template null is cases where user has not made a choice yet / the form was authored in an older version and has not been edited sinceboolean
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, getAddMessage, getAppearance, getAuthoringConfigJSON, getBindRef, getColspan, getCssClassName, getDescription, getEnabled, getEnabledExp, getError, getFieldInlineStyles, getGuideFieldType, getHeight, getI18n, getId, getInlineCssClass, getInlineStyles, getIsEditMode, getIsRepeatable, getItems, getLayoutPath, getLayoutTabType, getLongDescriptionInlineStyles, getName, getNavTitle, getNodeClass, getNonNavigableProperty, getPath, getQuestionMarkInlineStyles, getRemoveMessage, getResourceSuperType, getResourceType, getResponsiveClasses, getSlingRequest, getStyles, getTargetVersion, getTitle, getToolbarPosition, getVersion, getVisible, getVisibleExp, getWidth, getXssapi, getXssDescription, isDocumentFragmentGroup, isLayoutNavigable, isMenuRequired, isValid, isValidDorTemplateRef, setClientLibRef, setResource, setSlingRequest, syncNode
-
Methods inherited from class com.adobe.cq.sightly.WCMUsePojo
get, getComponent, getComponentContext, getCurrentDesign, getCurrentPage, getCurrentStyle, getDesigner, getEditContext, 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()
-
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:
-
useExternalEmailTemplate
public java.lang.Boolean useExternalEmailTemplate()
Returns whether form is using external template in Email Submit Action Return value can beBoolean.TRUE
,Boolean.FALSE
or null True value indicates user has chose external email template False value indicates user has not chosen external email template null is cases where user has not made a choice yet / the form was authored in an older version and has not been edited since- 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.
-
getGuideIntegrationServiceScriptPaths
public java.util.List<java.lang.String> getGuideIntegrationServiceScriptPaths()
-
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 org.apache.sling.commons.json.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
-
-