Class ColCtrl
java.lang.Object
com.adobe.cq.testing.client.components.AbstractComponent
com.adobe.cq.testing.client.components.foundation.AbstractFoundationComponent
com.adobe.cq.testing.client.components.foundation.parsys.ColCtrl
Created with IntelliJ IDEA.
User: catalan
Date: 5/29/12
Time: 10:13 AM
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class com.adobe.cq.testing.client.components.AbstractComponent
changeProperties, client, componentPath, DEFAULT_LOCATION, jsonNode, location, pagePath -
Constructor Summary
ConstructorsConstructorDescriptionColCtrl(ComponentClient client, String pagePath, String location, String nameHint) The constructor stores all the component path information like parentPage, name etc. -
Method Summary
Modifier and TypeMethodDescription<T extends AbstractComponent>
TaddComponent(Class<T> componentClass, int colNum) org.apache.sling.testing.clients.SlingHttpResponseWe override the default create call, so we can capture the reference to the end component.Returns the break nodes of the ColCtrl component.Returns the end ColCtrl component that belongs to this start component.getOrderPropertyForCol(int colNum) The resource type for the component, e.g.voidMethods inherited from class com.adobe.cq.testing.client.components.AbstractComponent
getClient, getComponentNode, getComponentPath, getCreateFormEntity, getFirstChild, getLocation, getName, getNext, getNextNodePath, getPagePath, getParentPath, getPrevious, getPreviousNodePath, getProperty, getPropertyAsString, getPropertyAsStringArray, reorder, save, setProperty, setProperty
-
Field Details
-
RESOURCE_TYPE
- See Also:
-
PROP_RESOURCE_TYPE
- See Also:
-
PROP_CONTROL_TYPE
- See Also:
-
PROP_LAYOUT
- See Also:
-
PROP_ORDER
- See Also:
-
COL_BREAK_CONTROL_TYPE
- See Also:
-
COL_END_CONTROL_TYPE
- See Also:
-
LAYOUT_2_COLS
- See Also:
-
LAYOUT_3_COLS
- See Also:
-
-
Constructor Details
-
ColCtrl
The constructor stores all the component path information like parentPage, name etc.- Parameters:
client- TheFoundationClientthat'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. TheAbstractComponent.getName()method will return the correct name after(String,int...)has been called.
-
-
Method Details
-
create
public org.apache.sling.testing.clients.SlingHttpResponse create(String order, int... expectedStatus) throws org.apache.sling.testing.clients.ClientException, InterruptedException We override the default create call, so we can capture the reference to the end component. The end component is created right after the colctrl component.- Overrides:
createin classAbstractComponent- Parameters:
order- Defines where the component should be added in relation to its siblings. Possible values arefirst,last,before [nodeName],after [nodeName].expectedStatus- list of expected HTTP Status to be returned, if not set, 201 is assumed.- Returns:
- the response
- Throws:
org.apache.sling.testing.clients.ClientException- if the request failsInterruptedException- to mark this method as waiting
-
getResourceType
Description copied from class:AbstractComponentThe resource type for the component, e.g. foundation/components/text. this will be set in thesling:resourceTypeproperty of the node.- Specified by:
getResourceTypein classAbstractComponent- Returns:
- the resource type
-
addComponent
public <T extends AbstractComponent> T addComponent(Class<T> componentClass, int colNum) throws Exception - Throws:
Exception
-
getOrderPropertyForCol
- Throws:
Exception
-
setLayout
public void setLayout(String layout) throws org.apache.sling.testing.clients.ClientException, InterruptedException - Throws:
org.apache.sling.testing.clients.ClientExceptionInterruptedException
-
getColCtrlEndComponent
public AbstractFoundationComponent getColCtrlEndComponent() throws org.apache.sling.testing.clients.ClientExceptionReturns the end ColCtrl component that belongs to this start component.- Returns:
- The end component for this start component
- Throws:
org.apache.sling.testing.clients.ClientException- if something fails during request/response
-
getColCtrlBreaks
Returns the break nodes of the ColCtrl component.- Returns:
- The array of colctrl break nodes
-