Class ResponsiveColumn
- java.lang.Object
-
- org.apache.sling.api.adapter.SlingAdaptable
-
- org.apache.sling.api.resource.AbstractResource
-
- com.day.cq.wcm.foundation.model.responsivegrid.ResponsiveColumn
-
- All Implemented Interfaces:
ComponentExporter,ResponsiveColumnExporter,Adaptable,Resource
@ProviderType public class ResponsiveColumn extends AbstractResource implements ResponsiveColumnExporter
Represents a column of a responsive grid. A responsive grid's column is basically a virtual wrapper of a component that is part of the grid.
-
-
Field Summary
-
Fields inherited from interface org.apache.sling.api.resource.Resource
RESOURCE_TYPE_NON_EXISTING
-
-
Constructor Summary
Constructors Constructor Description ResponsiveColumn(Resource resource, java.util.Map<java.lang.String,Breakpoint> gridBreakpoints, java.lang.String classNamePrefix)ResponsiveColumn(Resource resource, java.util.Map<java.lang.String,Breakpoint> gridBreakpoints, java.lang.String classNamePrefix, SlingHttpServletRequest slingRequest, ModelFactory modelFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.util.Map<java.lang.String,Breakpoint>getBreakpoints()java.lang.StringgetColumnClassNames()java.lang.IntegergetColumnCount(java.lang.String breakpointName)Deprecated.java.lang.StringgetCssClass()Deprecated.ComponentExportergetExportedComponent()java.lang.StringgetExportedType()Returns the type of the resource for which the export is performed.java.util.Set<java.lang.String>getMissingBreakpointNames()Deprecated.UsegetBreakpoints()java.lang.StringgetPath()Returns the absolute path of this resource in the resource tree.ValueMapgetProperties()Deprecated.ResourcegetResource()ResourceMetadatagetResourceMetadata()Deprecated.ResourceResolvergetResourceResolver()Deprecated.java.lang.StringgetResourceSuperType()Deprecated.java.lang.StringgetResourceType()Deprecated.-
Methods inherited from class org.apache.sling.api.resource.AbstractResource
getChild, getChildren, getName, getParent, getValueMap, hasChildren, isResourceType, listChildren
-
Methods inherited from class org.apache.sling.api.adapter.SlingAdaptable
adaptTo, setAdapterManager, unsetAdapterManager
-
-
-
-
Constructor Detail
-
ResponsiveColumn
public ResponsiveColumn(Resource resource, java.util.Map<java.lang.String,Breakpoint> gridBreakpoints, java.lang.String classNamePrefix)
-
ResponsiveColumn
public ResponsiveColumn(Resource resource, java.util.Map<java.lang.String,Breakpoint> gridBreakpoints, java.lang.String classNamePrefix, SlingHttpServletRequest slingRequest, ModelFactory modelFactory)
-
-
Method Detail
-
getBreakpoints
public java.util.Map<java.lang.String,Breakpoint> getBreakpoints()
- Specified by:
getBreakpointsin interfaceResponsiveColumnExporter- Returns:
- A map of
Breakpoints associated with the column. The keys of the map are the breakpoint names.
-
getColumnClassNames
public java.lang.String getColumnClassNames()
- Specified by:
getColumnClassNamesin interfaceResponsiveColumnExporter- Returns:
- The CSS class names associated with the column.
-
getExportedComponent
@Nonnull public ComponentExporter getExportedComponent()
- Specified by:
getExportedComponentin interfaceResponsiveColumnExporter- Returns:
- Returns the actual component model that is wrapped inside of the responsive column. This is useful when performing a JSON export of the responsive grid; in such case, responsive child columns act as wrappers for the actual components that are part of the grid.
-
getExportedType
@Nonnull public java.lang.String getExportedType()
Description copied from interface:ResponsiveColumnExporterReturns 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:
getExportedTypein interfaceComponentExporter- Specified by:
getExportedTypein interfaceResponsiveColumnExporter- Returns:
- the type of the component
-
getResource
@Nonnull public Resource getResource()
- Returns:
- The wrapped
Resourceassociated with the column.
-
getPath
@Nonnull public java.lang.String getPath()
Description copied from interface:ResourceReturns the absolute path of this resource in the resource tree.
-
getCssClass
@Deprecated public java.lang.String getCssClass()
Deprecated.
-
getMissingBreakpointNames
@Deprecated public java.util.Set<java.lang.String> getMissingBreakpointNames()
Deprecated.UsegetBreakpoints()
-
getColumnCount
@Deprecated public java.lang.Integer getColumnCount(java.lang.String breakpointName)
Deprecated.Returns the number of columns for the given breakpoint name- Parameters:
breakpointName- The name of the breakpoint- Returns:
- The number of columns for given breakpoint name.
-
getResourceType
@Nonnull @Deprecated public java.lang.String getResourceType()
Deprecated.Description copied from interface:ResourceThe 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 theResourceResolveris 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:
getResourceTypein interfaceResource- Returns:
- The resource type
-
getResourceSuperType
@Deprecated public java.lang.String getResourceSuperType()
Deprecated.Description copied from interface:ResourceReturns the super type of the resource if the resource defines its own super type. Otherwisenullis 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 callResourceResolver.getParentResourceType(Resource).- Specified by:
getResourceSuperTypein interfaceResource- Returns:
- The super type of the resource or
null.
-
getResourceMetadata
@Nonnull @Deprecated public ResourceMetadata getResourceMetadata()
Deprecated.Description copied from interface:ResourceReturns the meta data of this resource. The concrete data contained in theResourceMetadataobject returned is implementation specific except for theResourceMetadata.RESOLUTION_PATHproperty which is required to be set to the part of the request URI used to resolve the resource.- Specified by:
getResourceMetadatain interfaceResource- Returns:
- The resource meta data
- See Also:
ResourceMetadata
-
getResourceResolver
@Nonnull @Deprecated public ResourceResolver getResourceResolver()
Deprecated.Description copied from interface:ResourceReturns theResourceResolverfrom which this resource has been retrieved.- Specified by:
getResourceResolverin interfaceResource- Returns:
- The resource resolver
-
getProperties
@Deprecated public ValueMap getProperties()
Deprecated.
-
-