public class ColCtrl extends AbstractFoundationComponent
Created with IntelliJ IDEA. User: catalan Date: 5/29/12 Time: 10:13 AM
  • Field Details

  • Constructor Details

    • ColCtrl

      public ColCtrl(ComponentClient client, String pagePath, String location, String nameHint)
      The constructor stores all the component path information like parentPage, name etc.
      Parameters:
      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.
  • 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:
      create in class AbstractComponent
      Parameters:
      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.
      Returns:
      the response
      Throws:
      org.apache.sling.testing.clients.ClientException - if the request fails
      InterruptedException - to mark this method as waiting
    • getResourceType

      public String getResourceType()
      Description copied from class: AbstractComponent
      The resource type for the component, e.g. foundation/components/text. this will be set in the sling:resourceType property of the node.
      Specified by:
      getResourceType in class AbstractComponent
      Returns:
      the resource type
    • addComponent

      public <T extends AbstractComponent> T addComponent(Class<T> componentClass, int colNum) throws Exception
      Throws:
      Exception
    • getOrderPropertyForCol

      public String getOrderPropertyForCol(int colNum) throws Exception
      Throws:
      Exception
    • setLayout

      public void setLayout(String layout) throws org.apache.sling.testing.clients.ClientException, InterruptedException
      Throws:
      org.apache.sling.testing.clients.ClientException
      InterruptedException
    • getColCtrlEndComponent

      public AbstractFoundationComponent getColCtrlEndComponent() throws org.apache.sling.testing.clients.ClientException
      Returns 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

      public AbstractFoundationComponent[] getColCtrlBreaks()
      Returns the break nodes of the ColCtrl component.
      Returns:
      The array of colctrl break nodes