Interface LongFormTextComponent
-
@ProviderType public interface LongFormTextComponent
-
-
Field Summary
Fields Modifier and Type Field Description static StringLONG_FORM_TEXT_PAR
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String[]getTextParagraphs(String text)Splits long form text into a series of "chunks" delimited.booleanhasContents(org.apache.sling.api.resource.Resource resource, int index)Determines if the specified long form text parsys has content.voidmergeParagraphSystems(org.apache.sling.api.resource.Resource resource, int numParagraphCount)Housekeeping for the Long Form Text responsible for merging dangling par resource up when the number of <p> decreases.
-
-
-
Field Detail
-
LONG_FORM_TEXT_PAR
static final String LONG_FORM_TEXT_PAR
- See Also:
- Constant Field Values
-
-
Method Detail
-
getTextParagraphs
String[] getTextParagraphs(String text)
Splits long form text into a series of "chunks" delimited. Note: this method does not support intelligence for managing nested <p>'s in <p>'s- Parameters:
text- The HTML text to split- Returns:
- A string array of HTML paragraphs including the surrounding <p>...</p>
-
mergeParagraphSystems
void mergeParagraphSystems(org.apache.sling.api.resource.Resource resource, int numParagraphCount) throws javax.jcr.RepositoryExceptionHousekeeping for the Long Form Text responsible for merging dangling par resource up when the number of <p> decreases.- Parameters:
resource- the long form text resourcenumParagraphCount- the number of text paragraphs- Throws:
javax.jcr.RepositoryException
-
hasContents
boolean hasContents(org.apache.sling.api.resource.Resource resource, int index)Determines if the specified long form text parsys has content.- Parameters:
resource- the long form text resourceindex- the index of the long-form-text parsys to inspect- Returns:
- true to include the parsys
-
-