Interface Component

    • Method Detail

      • isAccessible

        boolean isAccessible()
        Checks if this component is accessible, i.e. if the current session can access the underlying resource.
        Returns:
        true if the component is accessible.
        Since:
        5.4
      • getCellName

        java.lang.String getCellName()
        Returns the cell name of this component. If the cell name is an empty string is returned, the wcm request filter will not create a new edit context.
        Returns:
        the cell name
      • isEditable

        boolean isEditable()
        Checks if this component is editable. This is the case if it defines or inherits a dialog
        Returns:
        true if the component is editable.
      • isDesignable

        boolean isDesignable()
        Checks if this component is designable. This is the case if it defines or inherits a design dialog
        Returns:
        true if the component is designable.
      • isContainer

        boolean isContainer()
        Checks if this component is a container component. For example a paragraph system component. Container components affect the cell name generation of included resources where the cell name of the respective component is used instead of the name of the addressed resource.
        Returns:
        true if this component is a container.
      • isAnalyzable

        boolean isAnalyzable()
        Checks if this component is analyzable. This is the case if it defines an analytics node.
        Returns:
        true if the component is analyzable.
      • noDecoration

        boolean noDecoration()
        Checks if this component does not need decoration when included.
        Returns:
        true if this component does not need decoration when included.
      • getDialogPath

        java.lang.String getDialogPath()
        Returns the dialog path of this component or of an inherited one. Please note, that inheriting a dialog is not always desirable, since (currently) the resource type is defined as hidden field in the dialog. so extending a component without defining an own dialog would result in content having the base component's resource type.
        Returns:
        the dialog path or null
      • getDesignDialogPath

        java.lang.String getDesignDialogPath()
        Returns the design dialog path of this component or of an inherited one.
        Returns:
        the design dialog path or null
      • getIconPath

        java.lang.String getIconPath()
        Returns the path to an icon for this component or null if the component does not provide an icon. If this component does not define a path the one of the super component is returned. Note: the path is a webapp relative URL. eg: /docroot/c1.gif
        Returns:
        the path to an icon or null
      • getThumbnailPath

        java.lang.String getThumbnailPath()
        Returns the path to a thumbnail for this component or null if the component does not provide a thumbnail. If this component does not define a path the one of the super component is returned. Note: the path is a webapp relative URL. eg: /docroot/c1.gif
        Returns:
        the path to a thumbnail or null
      • getComponentGroup

        java.lang.String getComponentGroup()
        Returns the name of the component group. This is merely informational for dialogs that want to group the components.
        Returns:
        the name of the component group or null if not defined.
      • getProperties

        ValueMap getProperties()
        Returns the properties of this Component.
        Returns:
        the component properties
      • getDeclaredEditConfig

        ComponentEditConfig getDeclaredEditConfig()
        Returns the edit config of this component
        Returns:
        the edit config or null if not available
      • getDeclaredChildEditConfig

        ComponentEditConfig getDeclaredChildEditConfig()
        Returns the child edit config of this component
        Returns:
        the child edit config or null if not available
      • getEditConfig

        ComponentEditConfig getEditConfig()
        Returns the edit config of this component or the one of it's super component.
        Returns:
        the edit config or null if not available
      • getChildEditConfig

        ComponentEditConfig getChildEditConfig()
        Returns the child edit config of this component or the one of it's super component.
        Returns:
        the edit config or null if not available
      • getDesignEditConfig

        ComponentEditConfig getDesignEditConfig​(java.lang.String cellName)
        Returns the design edit config for the given cell name
        Parameters:
        cellName - name of the cell
        Returns:
        the design edit config
      • getHtmlTagAttributes

        java.util.Map<java.lang.String,​java.lang.String> getHtmlTagAttributes()
        Returns additional tag attributes that are added to the surrounding html tag.
        Returns:
        map of additional tag attributes.
      • getSuperComponent

        Component getSuperComponent()
        Returns the super component if the super resource type is defined and points to a valid component.
        Returns:
        the super component or null
      • getResourceType

        java.lang.String getResourceType()
        Returns the resource type to be used for this component. this is usually the path of this component without the first path segment, but can be overridden by setting the "sling:resourceType".
        Returns:
        the resource type
      • getLocalResource

        Resource getLocalResource​(java.lang.String name)
        Finds the resource with the given name that is stored "in" this component. If the resource cannot be found, the super component is asked. This is usually used in image scripts that need to load additional images.
        Parameters:
        name - name of the resource
        Returns:
        resource or null
      • getVirtualComponents

        java.util.Collection<VirtualComponent> getVirtualComponents()
        Returns a collection of virtual components that are configured for this component.
        Returns:
        a collection of virtual components.
      • getDefaultView

        java.lang.String getDefaultView()
        Returns the default view for this component
        Returns:
        the default view or null is not defined.
      • getTemplatePath

        java.lang.String getTemplatePath()
        Returns the path to the template for the component's content.
        Returns:
        path to the template for the component's content. null if not defined
      • getInfoProviders

        java.lang.String[] getInfoProviders()
        Returns a collection of info provider names that are configured for this page-level component.
        Returns:
        the provider names