public class ParagraphSystem
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COL_CTL_LAYOUT
name of the layout property
|
static java.lang.String |
COL_CTL_TYPE
name of the column control type property
|
static Logger |
log
default logger
|
static java.lang.String |
PARAMETER_VERSION_DIFF
Request parameter for the version diff.
|
static java.lang.String |
PARAMETER_VERSION_VIEW
Request parameter for the version view.
|
Constructor and Description |
---|
ParagraphSystem(Resource resource)
Creates a new paragraph system based on the given resource
|
ParagraphSystem(Resource resource,
java.lang.String versionLabel)
Creates a new paragraph system based on the given resource
and sets up the paragraph system to compare itself to a
versioned resource.
|
ParagraphSystem(Resource resource,
java.lang.String versionLabel,
boolean isVersionDiff)
Creates a new paragraph system based on the given resource
and sets up the paragraph system to compare itself to a
versioned resource.
|
Modifier and Type | Method and Description |
---|---|
static ParagraphSystem |
create(Resource resource,
SlingHttpServletRequest req)
Create the paragraph system based on the given
request.
|
java.lang.String |
getDefaultLayout()
Returns the default layout
|
java.util.List<Paragraph> |
paragraphs()
Returns the list of paragraphs of this system
|
void |
repair()
Checks the structure of this paragraph system and fixes it.
|
void |
setColCtrlResourceType(java.lang.String colCtrlResourceType)
Sets the columns control resource type used when fixing the structure
|
void |
setDefaultLayout(java.lang.String defaultLayout)
Sets the default layout in the format:
numCols;cssClass |
public static final Logger log
public static final java.lang.String PARAMETER_VERSION_DIFF
public static final java.lang.String PARAMETER_VERSION_VIEW
public static final java.lang.String COL_CTL_TYPE
public static final java.lang.String COL_CTL_LAYOUT
public ParagraphSystem(Resource resource)
resource
- underlying resourcepublic ParagraphSystem(Resource resource, java.lang.String versionLabel)
resource
- underlying resourceversionLabel
- optional version label for comparing.public ParagraphSystem(Resource resource, java.lang.String versionLabel, boolean isVersionDiff)
resource
- underlying resourceversionLabel
- optional version label for comparing.isVersionDiff
- true
if this parsys is used for
version diffingpublic static ParagraphSystem create(Resource resource, SlingHttpServletRequest req)
resource
- resourcereq
- requestpublic void setColCtrlResourceType(java.lang.String colCtrlResourceType)
colCtrlResourceType
- the resource typepublic java.lang.String getDefaultLayout()
public void setDefaultLayout(java.lang.String defaultLayout)
numCols;cssClass
defaultLayout
- default layoutpublic java.util.List<Paragraph> paragraphs()
public void repair()
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"