Package com.day.cq.wcm.foundation
Class Paragraph
java.lang.Object
org.apache.sling.api.resource.ResourceWrapper
com.day.cq.wcm.foundation.Paragraph
Provides an abstraction of paragraph within a paragraph system.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.apache.sling.api.resource.Resource
RESOURCE_TYPE_NON_EXISTING -
Method Summary
Modifier and TypeMethodDescription<AdapterType>
AdapterTypeReturns the value of callingadaptToon thewrapped resource.Returns the css class of this paragraph.intgetColNr()Returns the columns number of this paragraph.Returns the auto generated css class for the column of this paragraph.intReturns the total number of columns of the column group this paragraph is in.getType()Returns the type of this paragraphvoidsetDiffInfo(DiffInfo di) Set the diff information for this paragraph.toString()Returns a human readable string representation of this resource.Methods inherited from class org.apache.sling.api.resource.ResourceWrapper
getChild, getChildren, getName, getParent, getPath, getResource, getResourceMetadata, getResourceResolver, getResourceSuperType, getResourceType, getValueMap, hasChildren, isResourceType, listChildren
-
Method Details
-
getType
Returns the type of this paragraph- Returns:
- type of this paragraph
-
getColNr
public int getColNr()Returns the columns number of this paragraph. Note thatParagraph.Type.BREAKandParagraph.Type.ENDparagraphs have the number of the next columns.- Returns:
- the columns number of this paragraph.
-
getNumCols
public int getNumCols()Returns the total number of columns of the column group this paragraph is in.- Returns:
- the total number of columns.
-
getBaseCssClass
Returns the css class of this paragraph.- Returns:
- the CSS class
-
getCssClass
Returns the auto generated css class for the column of this paragraph.- Returns:
- the CSS class
-
setDiffInfo
Set the diff information for this paragraph.- Parameters:
di- The diff information
-
adaptTo
Returns the value of callingadaptToon thewrapped resource.- Specified by:
adaptToin interfaceAdaptable- Overrides:
adaptToin classResourceWrapper- Type Parameters:
AdapterType- The generic type to which this object is adapted to- Parameters:
type- The Class object of the target type, such asjavax.jcr.Node.classorjava.io.File.class- Returns:
- The adapter target or
nullif the object cannot adapt to the requested type
-
toString
Returns a human readable string representation of this resource.- Overrides:
toStringin classResourceWrapper
-