Class EntityTreeElement


  • public class EntityTreeElement
    extends BaseElement
    Represents the actions possible on the XWiki Explorer Tree.
    Since:
    5.1M1
    Version:
    $Id: 8df661e0f5597a6fd0d5de24023c99af44fbe075 $
    • Constructor Detail

      • EntityTreeElement

        public EntityTreeElement()
    • Method Detail

      • waitForSpace

        public EntityTreeElement waitForSpace​(String spaceName)
        Waits for the node corresponding to the specified space to be present but not selected.
        Parameters:
        spaceName - the space name
        Returns:
        this
      • waitForSpace

        public EntityTreeElement waitForSpace​(String spaceName,
                                              boolean selected)
        Waits for the node corresponding to the specified space to be present.
        Parameters:
        spaceName - the space name
        selected - true if the space node should be selected, false otherwise
        Returns:
        this
      • hasSpace

        public boolean hasSpace​(String spaceName)
        Parameters:
        spaceName - the space name
        Returns:
        true if the node corresponding to the specified space is present (selected or not), false otherwise
      • waitForPage

        public EntityTreeElement waitForPage​(String spaceName,
                                             String pageName)
        Waits for the node corresponding to the specified page to be present but not selected. We assume the page title equals the page name.
        Parameters:
        spaceName - the space containing the page
        pageName - the page name
        Returns:
        this
      • waitForPage

        public EntityTreeElement waitForPage​(String spaceName,
                                             String pageName,
                                             String pageTitle)
        Waits for the node corresponding to the specified page to be present but not selected.
        Parameters:
        spaceName - the space containing the page
        pageName - the page name (used as the node tool tip)
        pageTitle - the page title (used as the node label)
        Returns:
        this
      • waitForPage

        public EntityTreeElement waitForPage​(String spaceName,
                                             String pageName,
                                             boolean selected)
        Waits for the node corresponding to the specified page to be present. We assume the page title equals the page name.
        Parameters:
        spaceName - the space containing the page
        pageName - the page name
        selected - true if the page node should be selected, false otherwise
        Returns:
        this
      • waitForPage

        public EntityTreeElement waitForPage​(String spaceName,
                                             String pageName,
                                             String pageTitle,
                                             boolean selected)
        Waits for the node corresponding to the specified page to be present.
        Parameters:
        spaceName - the space containing the page
        pageName - the page name (used as the node hint)
        pageTitle - the page title (used as the node label)
        selected - true if the page node should be selected, false otherwise
        Returns:
        this
      • hasPage

        public boolean hasPage​(String spaceName,
                               String pageName)
        Parameters:
        spaceName - the space containing the page
        pageName - the page name
        Returns:
        true if the specified page node is present, selected or not, false otherwise; we assume the page title equals the page name
      • hasPage

        public boolean hasPage​(String spaceName,
                               String pageName,
                               String pageTitle)
        Parameters:
        spaceName - the space containing the page
        pageName - the page name (used as the node hint)
        pageTitle - the page title (used as the node label)
        Returns:
        true if the specified page node is present, selected or not, false otherwise
      • waitForAttachment

        public EntityTreeElement waitForAttachment​(String spaceName,
                                                   String pageName,
                                                   String fileName)
        Waits for the node corresponding to the specified attachments to be present but not selected.
        Parameters:
        spaceName - the space containing the page
        pageName - the page that holds the attachment
        fileName - the attachment file name
        Returns:
        this
      • waitForAttachment

        public EntityTreeElement waitForAttachment​(String spaceName,
                                                   String pageName,
                                                   String fileName,
                                                   boolean selected)
        Waits for the node corresponding to the specified attachment to be present.
        Parameters:
        spaceName - the space containing the page
        pageName - the page that holds the attachment
        fileName - the attachment file name
        selected - true if the attachment node should be selected, false otherwise
        Returns:
        this
      • hasAttachment

        public boolean hasAttachment​(String spaceName,
                                     String pageName,
                                     String fileName)
        Parameters:
        spaceName - the space containing the page
        pageName - the page that holds the attachment
        fileName - the attachment file name
        Returns:
        true if the specified attachment node is present, selected or not, false otherwise
      • lookupEntity

        public void lookupEntity​(String entityReference)
        Types the given text in the input box below the tree. As a result the tree will lookup an entity among its nodes (e.g. page, attachment) that matches the given reference.
        Parameters:
        entityReference - the text to be typed in the input box below the tree, usually an entity reference