Class GuideNode

    • Field Summary

      Fields 
      Modifier and Type Field Description
      com.day.cq.i18n.I18n i18n  
    • Constructor Summary

      Constructors 
      Constructor Description
      GuideNode()  
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void activate()  
      boolean checkIfPathIsAbsolute​(java.lang.String path)
      Checks if the path is absolute.
      java.lang.String externalize​(java.lang.String key)  
      java.lang.String getAddMessage()  
      java.lang.String getAppearance()
      Returns the appearance of the widget configured during authoring.
      java.util.Map<java.lang.String,​java.lang.Object> getAuthoringConfig()
      AuthoringConfig is a map populated only for authoring and it contains key value pairs that govern components behaviour.
      java.lang.String getAuthoringConfigJSON()
      Return the JSON string containing property map of an AEM form component which is to be used during author time.
      java.lang.String getBindRef()  
      java.lang.String getClientLibRef()  
      java.lang.Integer getColspan()
      Returns the colspan of an AEM form component configured during authoring.
      java.lang.String getCssClassName()
      Returns the name of the CSS class configured during authoring.
      java.lang.String getDescription()  
      java.lang.String getEnabled()  
      java.lang.String getEnabledExp()  
      java.lang.String getError()  
      java.lang.String getFieldInlineStyles()  
      java.lang.String getGuideFieldType()
      Returns the field type of the AEM Forms Component
      java.lang.String getHeight()
      Returns the height of AEM Form component configured in the authoring dialog.
      com.day.cq.i18n.I18n getI18n()  
      java.lang.String getId()  
      java.lang.String getInlineCssClass()
      Returns the inline CSS class applied to the component during style authoring.
      java.lang.String getInlineStyles​(java.lang.String name)  
      java.lang.Boolean getIsEditMode()
      Utility to check if the AEM Form Component is rendered during edit/design mode of AEM.
      boolean getIsRepeatable()
      Utility to check if the given AEM Form Component is repeatable or not
      java.util.List<GuideNode> getItems()
      Returns the list of items present inside an AEM Forms container
      java.lang.String getLayoutPath()
      Returns the path of the layout configured in an AEM Form Panel
      java.lang.String getLayoutTabType()  
      java.lang.String getLongDescriptionInlineStyles()  
      java.lang.String getName()  
      java.lang.String getNavTitle()  
      java.lang.String getNodeClass()
      Returns the node class associated with the of the AEM form component.
      java.lang.Boolean getNonNavigableProperty()
      Returns the nonNavigable property of the layout.
      java.lang.String getPath()
      Returns the path representing the current AEM Form Component.
      java.lang.String getQuestionMarkInlineStyles()  
      java.lang.String getRemoveMessage()  
      java.lang.String getResourceSuperType()
      Returns the sling resource super type of the current resource set.
      java.lang.String getResourceType()
      Returns the sling resource type of the current resource set.
      java.lang.String getResponsiveClasses()
      Returns CSS classes to be applied on field/panel, for honoring its responsive configurtion.
      SlingHttpServletRequest getSlingRequest()
      Returns the Interface to provide client request information to a servlet.
      java.lang.String getStyles()
      Returns the string containing the width and height property represented as an inline CSS rule.
      java.lang.String getTargetVersion()
      Returns the target specification version of Adaptive Form Component.
      java.lang.String getTitle()
      Returns the title of the AEM Form component.
      java.lang.String getToolbarPosition()  
      java.lang.String getVersion()
      Returns the specification version of Adaptive Form Component Version of an adaptive form component specifies the node structure changes.
      java.lang.String getVisible()  
      java.lang.String getVisibleExp()  
      java.lang.String getWidth()
      Returns the width of AEM Form Component configured in the authoring dialog.
      com.adobe.granite.xss.XSSAPI getXssapi()  
      java.lang.String getXssDescription()  
      boolean isDocumentFragmentGroup()
      Deprecated. 
      boolean isLayoutNavigable()
      Checks if the layout configured in the AEM Forms Panel component is navigable.
      boolean isMenuRequired()
      Returns true for guide node type or super type being rootPanel / panel / guideAdModule / guideAdModuleGroup
      boolean isValid()  
      boolean isValidDorTemplateRef()  
      void setClientLibRef​(java.lang.String clientLibRef)  
      void setResource​(Resource resource)
      Deprecated.
      use the init API
      void setSlingRequest​(SlingHttpServletRequest slingRequest)
      Set's the sling resource for the given AEM Form Component.
      void syncNode()  
      boolean validate​(ResourceResolver serviceResourceResolver)
      This API is meant to validate the current AF object.
      • 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
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • i18n

        public com.day.cq.i18n.I18n i18n
    • Constructor Detail

      • GuideNode

        public GuideNode()
    • Method Detail

      • activate

        public void activate()
                      throws java.lang.Exception
        Specified by:
        activate in class com.adobe.cq.sightly.WCMUsePojo
        Throws:
        java.lang.Exception
      • getResponsiveClasses

        public java.lang.String getResponsiveClasses()
        Returns CSS classes to be applied on field/panel, for honoring its responsive configurtion.
        Returns:
        String representing CSS responsive classes
      • getGuideFieldType

        public java.lang.String getGuideFieldType()
        Returns the field type of the AEM Forms Component
        Specified by:
        getGuideFieldType in interface FDField
        Returns:
        String representing guide field type
      • getAuthoringConfigJSON

        public java.lang.String getAuthoringConfigJSON()
        Return the JSON string containing property map of an AEM form component which is to be used during author time. Say, a custom component, wants to provides its own author config JSON, its has to override this.
        Specified by:
        getAuthoringConfigJSON in interface FDField
        Returns:
        String authoringConfig JSON string
      • getAuthoringConfig

        public java.util.Map<java.lang.String,​java.lang.Object> getAuthoringConfig()
        AuthoringConfig is a map populated only for authoring and it contains key value pairs that govern components behaviour. There may be a use case where one wants to access few list of properties of AEM form component during authoring, this API is built for this.
        Returns:
        Map authoringConfig Map
      • checkIfPathIsAbsolute

        public boolean checkIfPathIsAbsolute​(java.lang.String path)
        Checks if the path is absolute. This API is written to support backward compatibility for forms developed over 6.0. In 6.1, we have introduced the notion of overlay, hence this API makes sure if any property of a node present in 6.0 form has an absolute path. Currently, this is used for field layout and autoSave strategy.
      • getAppearance

        public java.lang.String getAppearance()
        Returns the appearance of the widget configured during authoring.
        Returns:
        String representing path of appearance
      • getStyles

        public java.lang.String getStyles()
        Returns the string containing the width and height property represented as an inline CSS rule.
        Returns:
        string containing width and height as inline CSS styl
      • getInlineStyles

        public java.lang.String getInlineStyles​(java.lang.String name)
      • getFieldInlineStyles

        public java.lang.String getFieldInlineStyles()
      • getQuestionMarkInlineStyles

        public java.lang.String getQuestionMarkInlineStyles()
      • getLongDescriptionInlineStyles

        public java.lang.String getLongDescriptionInlineStyles()
      • getColspan

        public java.lang.Integer getColspan()
        Returns the colspan of an AEM form component configured during authoring. This holds valid only in case of AEM form field's whose parent has a grid fluid layout configured. Col Span indicates the number of columns an AEM Form component should span across
        Returns:
        integer representing the colspan
      • getInlineCssClass

        public java.lang.String getInlineCssClass()
        Returns the inline CSS class applied to the component during style authoring.
        Returns:
        String representing the CSS class name
      • getHeight

        public java.lang.String getHeight()
        Returns the height of AEM Form component configured in the authoring dialog. The value returned has pixel as its unit.
        Specified by:
        getHeight in interface StyledFDField
        Returns:
        String representing the height
      • getWidth

        public java.lang.String getWidth()
        Returns the width of AEM Form Component configured in the authoring dialog. The value returned has percentage as its unit
        Specified by:
        getWidth in interface StyledFDField
        Returns:
        width of the form component
      • getVersion

        public java.lang.String getVersion()
        Returns the specification version of Adaptive Form Component Version of an adaptive form component specifies the node structure changes.
        Returns:
        String representing the adaptive form component's specification version
      • getTargetVersion

        public java.lang.String getTargetVersion()
        Returns the target specification version of Adaptive Form Component. Target version of an Adaptive form component specifies the behaviour/rendition of the component.
        Returns:
        String representing the adaptive form component's target specification version
      • setResource

        public void setResource​(Resource resource)
        Deprecated.
        use the init API
        Set's the sling resource for the given AEM Form Component.
        Parameters:
        resource - Represents the resource to be used
        See Also:
        Resource
      • setSlingRequest

        public void setSlingRequest​(SlingHttpServletRequest slingRequest)
        Set's the sling resource for the given AEM Form Component.
        Parameters:
        slingRequest - Represents the http sling request
        See Also:
        SlingHttpServletRequest
      • getI18n

        public com.day.cq.i18n.I18n getI18n()
      • getEnabledExp

        public java.lang.String getEnabledExp()
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface FDField
        Returns:
        Returns the name of the component
      • getDescription

        public java.lang.String getDescription()
        Specified by:
        getDescription in interface FDField
        Returns:
        Returns the description of the component
      • getXssDescription

        public java.lang.String getXssDescription()
      • getId

        public java.lang.String getId()
                               throws javax.jcr.RepositoryException
        Specified by:
        getId in interface FDField
        Returns:
        Returns the id of the component.
        Throws:
        javax.jcr.RepositoryException
      • getIsEditMode

        public java.lang.Boolean getIsEditMode()
        Utility to check if the AEM Form Component is rendered during edit/design mode of AEM.
        Returns:
        boolean representing if the given mode is edit/design or not
      • getIsRepeatable

        public boolean getIsRepeatable()
        Utility to check if the given AEM Form Component is repeatable or not
        Returns:
        boolean represent if repeatable or not
      • getItems

        public java.util.List<GuideNode> getItems()
        Returns the list of items present inside an AEM Forms container
        Returns:
        List of GuideNode present inside the container
      • getPath

        public java.lang.String getPath()
        Returns the path representing the current AEM Form Component. This path is the JCR Path of the current resource.
        Specified by:
        getPath in interface FDField
        Returns:
        string representing the path
      • getResourceType

        public java.lang.String getResourceType()
        Returns the sling resource type of the current resource set.
        Returns:
        string representing the resource type
      • getResourceSuperType

        public java.lang.String getResourceSuperType()
        Returns the sling resource super type of the current resource set.
        Returns:
        string representing the resource super type
      • getLayoutPath

        public java.lang.String getLayoutPath()
                                       throws PersistenceException
        Returns the path of the layout configured in an AEM Form Panel
        Returns:
        String representing path of the layout
        Throws:
        PersistenceException
      • getNonNavigableProperty

        public java.lang.Boolean getNonNavigableProperty()
        Returns the nonNavigable property of the layout. Till 6.2, nonNavigable property was stored as a string. In 6.3, this property is now stared as boolean. This function gets the nonNavigable property and converts it into a boolean and returns it.
        Returns:
        Boolean
      • isLayoutNavigable

        public boolean isLayoutNavigable()
                                  throws PersistenceException
        Checks if the layout configured in the AEM Forms Panel component is navigable.
        Returns:
        boolean indicating if layout is navigable
        Throws:
        PersistenceException
      • isMenuRequired

        public boolean isMenuRequired()
        Returns true for guide node type or super type being rootPanel / panel / guideAdModule / guideAdModuleGroup
        Returns:
        true, if menu required for the component else false
      • isDocumentFragmentGroup

        public boolean isDocumentFragmentGroup()
        Deprecated.
        Returns true for guide node type or super type is guideAdModuleGroup
        Returns:
        true if component is part of document fragment group else false
      • getAddMessage

        public java.lang.String getAddMessage()
      • getRemoveMessage

        public java.lang.String getRemoveMessage()
      • getNavTitle

        public java.lang.String getNavTitle()
      • getTitle

        public java.lang.String getTitle()
        Returns the title of the AEM Form component.
        Specified by:
        getTitle in interface FDField
        Returns:
        String representing the title
      • getSlingRequest

        public SlingHttpServletRequest getSlingRequest()
        Returns the Interface to provide client request information to a servlet.
        Returns:
        sling http request
      • getNodeClass

        public java.lang.String getNodeClass()
        Returns the node class associated with the of the AEM form component. This node class is used to instantiate client model
        Returns:
        String representing the node class
      • getVisibleExp

        public java.lang.String getVisibleExp()
      • getXssapi

        public com.adobe.granite.xss.XSSAPI getXssapi()
      • getCssClassName

        public java.lang.String getCssClassName()
        Returns the name of the CSS class configured during authoring.
        Specified by:
        getCssClassName in interface StyledFDField
        Returns:
        String representing the CSS class name
      • externalize

        public java.lang.String externalize​(java.lang.String key)
      • getError

        public java.lang.String getError()
      • getBindRef

        public java.lang.String getBindRef()
      • isValid

        public boolean isValid()
      • validate

        public boolean validate​(ResourceResolver serviceResourceResolver)
        This API is meant to validate the current AF object. It could validate and auto-fix if required
        Parameters:
        serviceResourceResolver - reference to service resource resolver since validate would require access to immutable content
        Returns:
        {Boolean} true, if valid else false
      • isValidDorTemplateRef

        public boolean isValidDorTemplateRef()
      • getClientLibRef

        public java.lang.String getClientLibRef()
      • setClientLibRef

        public void setClientLibRef​(java.lang.String clientLibRef)
      • getEnabled

        public java.lang.String getEnabled()
        Returns:
        Returns the value of "enabled" property of field.
      • getVisible

        public java.lang.String getVisible()
        Returns:
        Returns the value of "visible" property of field.