Class ResponsiveGrid

All Implemented Interfaces:
ComponentExporter, ContainerExporter, ResponsiveGridExporter, Adaptable, Resource

Sling model for the Responsive grid component. A Responsive grid component provides access to its columns and generates a set of specific responsive data.
  • Constructor Details

    • ResponsiveGrid

      public ResponsiveGrid()
  • Method Details

    • getGridClassNames

      public String getGridClassNames()
      Specified by:
      getGridClassNames in interface ResponsiveGridExporter
      Returns:
      The CSS class names to be applied to the current grid.
    • getColumnClassNames

      @Nonnull public Map<String,String> getColumnClassNames()
      Specified by:
      getColumnClassNames in interface ResponsiveGridExporter
      Returns:
      The CSS class names associated with each responsive grid column and listed by column name
    • getColumnCount

      public int getColumnCount()
      Specified by:
      getColumnCount in interface ResponsiveGridExporter
      Returns:
      The number of columns available for direct children in the grid.
    • getColumns

      @Nonnull public Collection<? extends ResponsiveColumn> getColumns()
      Returns:
      The columns of the current responsive grid.
    • getEffectiveResource

      @Nonnull public <T extends Resource> T getEffectiveResource()
      Type Parameters:
      T - The type of the resource
      Returns:
      Returns the resource optionally wrapped into a TemplatedResource AdobePatentID="P6273-US"
    • getPath

      @Nonnull public String getPath()
      Description copied from interface: Resource
      Returns the absolute path of this resource in the resource tree.
      Specified by:
      getPath in interface Resource
      Returns:
      The resource path
    • getExportedAllowedComponents

      public AllowedComponentsExporter getExportedAllowedComponents()
      Specified by:
      getExportedAllowedComponents in interface ResponsiveGridExporter
      Returns:
      Allowed Components object for the current grid.
    • getExportedItems

      @Nonnull public Map<String,? extends ComponentExporter> getExportedItems()
      Description copied from interface: ContainerExporter

      Returns the map of all exported child items (resource names from Sling Model classes).

      NOTE: Methods whose JSON serialization would lead to the same JSON property name (":items") will not be serialized.

      Specified by:
      getExportedItems in interface ContainerExporter
      Returns:
      the map of all exported child items
      See Also:
    • getExportedItemsOrder

      @Nonnull public String[] getExportedItemsOrder()
      Description copied from interface: ContainerExporter

      Returns the order of items in the map.

      NOTE: This information is required because the JSON specification and most implementations don't provide a stable order of items in JSON objects. Methods whose JSON serialization would lead to the same JSON property name (":order") will not be serialized.

      Specified by:
      getExportedItemsOrder in interface ContainerExporter
      Returns:
      the order of the items in the map; the array can be empty if the item order is not provided by the underlying persistence layer
    • getExportedType

      @Nonnull public String getExportedType()
      Description copied from interface: ComponentExporter

      Returns the type of the resource for which the export is performed.

      NOTE: methods whose JSON serialization would lead to the same JSON property name (":type") will not be serialized.

      Specified by:
      getExportedType in interface ComponentExporter
      Returns:
      the type of the component
    • getParagraphs

      @Deprecated public List<ResponsiveColumn> getParagraphs()
      Deprecated.
      Returns:
      The columns of the current responsive grid.
    • getCssClass

      @Deprecated public String getCssClass()
      Deprecated.
      Returns:
      The CSS class names to be applied to the current grid.
    • getResourceType

      @Nonnull @Deprecated public String getResourceType()
      Deprecated.
      Description copied from interface: Resource
      The resource type is meant to point to rendering/processing scripts, editing dialogs, etc. It is usually a path in the repository, where scripts and other tools definitions are found, but the ResourceResolver is free to set this to any suitable value such as the primary node type of the JCR node from which the resource is created.

      If the resource instance represents a resource which is not actually existing, this method returns Resource.RESOURCE_TYPE_NON_EXISTING.

      Specified by:
      getResourceType in interface Resource
      Returns:
      The resource type
    • getResourceSuperType

      @Deprecated public String getResourceSuperType()
      Deprecated.
      Description copied from interface: Resource
      Returns the super type of the resource if the resource defines its own super type. Otherwise null is returned. A resource might return a resource super type to overwrite the resource type hierarchy. If a client is interested in the effective resource super type of a resource, it should call ResourceResolver.getParentResourceType(Resource).
      Specified by:
      getResourceSuperType in interface Resource
      Returns:
      The super type of the resource or null.
    • getResourceMetadata

      @Nonnull @Deprecated public ResourceMetadata getResourceMetadata()
      Deprecated.
      Description copied from interface: Resource
      Returns the meta data of this resource. The concrete data contained in the ResourceMetadata object returned is implementation specific except for the ResourceMetadata.RESOLUTION_PATH property which is required to be set to the part of the request URI used to resolve the resource.
      Specified by:
      getResourceMetadata in interface Resource
      Returns:
      The resource meta data
      See Also:
    • getResourceResolver

      @Nonnull @Deprecated public ResourceResolver getResourceResolver()
      Deprecated.
      Description copied from interface: Resource
      Returns the ResourceResolver from which this resource has been retrieved.
      Specified by:
      getResourceResolver in interface Resource
      Returns:
      The resource resolver
    • getAppliedCssClasses

      @Nullable public String getAppliedCssClasses()
      Description copied from interface: ResponsiveGridExporter
      Returns the style system information associated with the current grid.
      Specified by:
      getAppliedCssClasses in interface ResponsiveGridExporter
      Returns:
      CSS classes selected by the content author delimited using a SPACE character