public class ColCtrl extends AbstractFoundationComponent
Modifier and Type | Field and Description |
---|---|
static String |
COL_BREAK_CONTROL_TYPE |
static String |
COL_END_CONTROL_TYPE |
static String |
LAYOUT_2_COLS |
static String |
LAYOUT_3_COLS |
static String |
PROP_CONTROL_TYPE |
static String |
PROP_LAYOUT |
static String |
PROP_ORDER |
static String |
PROP_RESOURCE_TYPE |
static String |
RESOURCE_TYPE |
changeProperties, client, componentPath, DEFAULT_LOCATION, jsonNode, location, pagePath
Constructor and Description |
---|
ColCtrl(ComponentClient client,
String pagePath,
String location,
String nameHint)
The constructor stores all the component path information like parentPage, name etc.
|
Modifier and Type | Method and Description |
---|---|
<T extends AbstractComponent> |
addComponent(Class<T> componentClass,
int colNum) |
org.apache.sling.testing.clients.SlingHttpResponse |
create(String order,
int... expectedStatus)
We override the default create call, so we can capture the reference to the end component.
|
AbstractFoundationComponent[] |
getColCtrlBreaks()
Returns the break nodes of the ColCtrl component.
|
AbstractFoundationComponent |
getColCtrlEndComponent()
Returns the end ColCtrl component that belongs to this start component.
|
String |
getOrderPropertyForCol(int colNum) |
String |
getResourceType()
The resource type for the component, e.g.
|
void |
setLayout(String layout) |
getClient, getComponentNode, getComponentPath, getCreateFormEntity, getFirstChild, getLocation, getName, getNext, getNextNodePath, getPagePath, getParentPath, getPrevious, getPreviousNodePath, getProperty, getPropertyAsString, getPropertyAsStringArray, reorder, save, setProperty, setProperty
public static final String RESOURCE_TYPE
public static final String PROP_RESOURCE_TYPE
public static final String PROP_CONTROL_TYPE
public static final String PROP_LAYOUT
public static final String PROP_ORDER
public static final String COL_BREAK_CONTROL_TYPE
public static final String COL_END_CONTROL_TYPE
public static final String LAYOUT_2_COLS
public static final String LAYOUT_3_COLS
public ColCtrl(ComponentClient client, String pagePath, String location, String nameHint)
client
- The FoundationClient
that's
creating this
instance.pagePath
- path to the page that will contain the component.location
- relative location to the parent node inside the page that will contain the component node.nameHint
- name to be used for the component node. Might get altered by the server if a naming conflict
occurs. The AbstractComponent.getName()
method will return the correct name after (String,int...)
has been called.public org.apache.sling.testing.clients.SlingHttpResponse create(String order, int... expectedStatus) throws org.apache.sling.testing.clients.ClientException, InterruptedException
create
in class AbstractComponent
order
- Defines where the component should be added in relation to its siblings. Possible values
are first
, last
, before [nodeName]
, after [nodeName]
.expectedStatus
- list of expected HTTP Status to be returned, if not set, 201 is assumed.org.apache.sling.testing.clients.ClientException
- if the request failsInterruptedException
- to mark this method as waitingpublic String getResourceType()
AbstractComponent
sling:resourceType
property of the node.getResourceType
in class AbstractComponent
public <T extends AbstractComponent> T addComponent(Class<T> componentClass, int colNum) throws Exception
Exception
public String getOrderPropertyForCol(int colNum) throws Exception
Exception
public void setLayout(String layout) throws org.apache.sling.testing.clients.ClientException, InterruptedException
org.apache.sling.testing.clients.ClientException
InterruptedException
public AbstractFoundationComponent getColCtrlEndComponent() throws org.apache.sling.testing.clients.ClientException
org.apache.sling.testing.clients.ClientException
- if something fails during request/responsepublic AbstractFoundationComponent[] getColCtrlBreaks()
Copyright © 2018. All rights reserved.