com.atlassian.confluence
Class PageAcceptanceTester

java.lang.Object
  extended by com.atlassian.confluence.PageAcceptanceTester

public class PageAcceptanceTester
extends java.lang.Object


Constructor Summary
PageAcceptanceTester(ConfluenceRpc rpc, ConfluenceRpc wikiMarkupRpc, net.sourceforge.jwebunit.junit.WebTester webTester)
           
 
Method Summary
 ViewContentBean createPage(java.lang.String spaceKey, java.lang.String title, java.lang.String content, java.lang.String parentPageTitle)
           
 ViewContentBean createPageWithViewRestrictions(java.lang.String spaceKey, java.lang.String title, java.lang.String content, java.lang.String parentPageTitle, java.lang.String viewPermissionUsers)
           
 void editPageContent(java.lang.String content)
          Sets content via RPC, as the admin user.
 void editPageWithContent(java.lang.String spaceKey, java.lang.String title, java.lang.String content)
           
protected static long getCurrentPageId()
           
 long getPageId(java.lang.String spaceKey, java.lang.String title)
           
 void gotoPageWithError(java.lang.String url)
           
 void movePage(java.lang.String title, Space oldSpace, Space newSpace)
          Deprecated. since 5.0 Use an EditContentBean or appropriate rpc call such as ConfluenceRpc.movePageToTopLevel(com.atlassian.confluence.it.Page, com.atlassian.confluence.it.Space)
 void movePageToNewParent(java.lang.String spaceKey, java.lang.String title, java.lang.String newParentPage)
           
 void movePageToNewParent(java.lang.String oldSpaceKey, java.lang.String title, java.lang.String newSpaceKey, java.lang.String newParentPage)
           
 void movePageToNewSpace(java.lang.String spaceKey, java.lang.String title, java.lang.String newSpaceKey)
           
 void removePageLabel(java.lang.String spaceKey, java.lang.String pageTitle)
           
 void renamePage(java.lang.String spaceKey, java.lang.String originalPageTitle, java.lang.String newPageTitle)
           
 org.codehaus.jackson.JsonNode setBlogLabels(Space space, java.lang.String blogTitle, java.lang.String labels)
          Add the specified labels to the blog
 void setPageEditPermissionsForGroups(java.lang.String spaceKey, java.lang.String pageTitle, java.lang.String groups)
          Deprecated. Since 5.0Use ConfluenceRpc.grantContentPermission(com.atlassian.confluence.it.content.security.ContentPermission, com.atlassian.confluence.it.ContentEntity)
 void setPageEditPermissionsForUsers(java.lang.String spaceKey, java.lang.String pageTitle, java.lang.String users)
          Deprecated. Since 5.0 Use ConfluenceRpc.grantContentPermission(com.atlassian.confluence.it.content.security.ContentPermission, com.atlassian.confluence.it.ContentEntity)
 org.codehaus.jackson.JsonNode setPageLabels(java.lang.String spaceKey, java.lang.String pageTitle, java.lang.String labels)
          Calls setPageLabels(String, String, String, com.atlassian.confluence.it.User) with the default user of User.ADMIN
 org.codehaus.jackson.JsonNode setPageLabels(java.lang.String spaceKey, java.lang.String pageTitle, java.lang.String labels, User user)
          Add the specified labels to the page
 void setPageViewPermissionsForGroups(java.lang.String spaceKey, java.lang.String pageTitle, java.lang.String groups)
          Deprecated. Since 5.0 Use ConfluenceRpc.grantContentPermission(com.atlassian.confluence.it.content.security.ContentPermission, com.atlassian.confluence.it.ContentEntity)
 void setPageViewPermissionsForUsers(java.lang.String spaceKey, java.lang.String pageTitle, java.lang.String users)
          Deprecated. since 5.0 Use ConfluenceRpc.grantContentPermission(com.atlassian.confluence.it.content.security.ContentPermission, com.atlassian.confluence.it.ContentEntity)
 void viewLabel(java.lang.String spaceKey, java.lang.String labelName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PageAcceptanceTester

public PageAcceptanceTester(ConfluenceRpc rpc,
                            ConfluenceRpc wikiMarkupRpc,
                            net.sourceforge.jwebunit.junit.WebTester webTester)
Method Detail

getCurrentPageId

protected static long getCurrentPageId()

movePageToNewSpace

public void movePageToNewSpace(java.lang.String spaceKey,
                               java.lang.String title,
                               java.lang.String newSpaceKey)

movePageToNewParent

public void movePageToNewParent(java.lang.String spaceKey,
                                java.lang.String title,
                                java.lang.String newParentPage)

movePageToNewParent

public void movePageToNewParent(java.lang.String oldSpaceKey,
                                java.lang.String title,
                                java.lang.String newSpaceKey,
                                java.lang.String newParentPage)

movePage

@Deprecated
public void movePage(java.lang.String title,
                                Space oldSpace,
                                Space newSpace)
Deprecated. since 5.0 Use an EditContentBean or appropriate rpc call such as ConfluenceRpc.movePageToTopLevel(com.atlassian.confluence.it.Page, com.atlassian.confluence.it.Space)


getPageId

public long getPageId(java.lang.String spaceKey,
                      java.lang.String title)

viewLabel

public void viewLabel(java.lang.String spaceKey,
                      java.lang.String labelName)

createPageWithViewRestrictions

public ViewContentBean createPageWithViewRestrictions(java.lang.String spaceKey,
                                                      java.lang.String title,
                                                      java.lang.String content,
                                                      java.lang.String parentPageTitle,
                                                      @Nullable
                                                      java.lang.String viewPermissionUsers)

createPage

public ViewContentBean createPage(java.lang.String spaceKey,
                                  java.lang.String title,
                                  java.lang.String content,
                                  java.lang.String parentPageTitle)

renamePage

public void renamePage(java.lang.String spaceKey,
                       java.lang.String originalPageTitle,
                       java.lang.String newPageTitle)

setPageViewPermissionsForUsers

@Deprecated
public void setPageViewPermissionsForUsers(java.lang.String spaceKey,
                                                      java.lang.String pageTitle,
                                                      java.lang.String users)
Deprecated. since 5.0 Use ConfluenceRpc.grantContentPermission(com.atlassian.confluence.it.content.security.ContentPermission, com.atlassian.confluence.it.ContentEntity)

Edit the permissions of the specified page as the current user.

One doesn't need to navigate to the page before calling this method.

Parameters:
spaceKey - the space the page belongs to
pageTitle - the title of the page
users - the users to restrict view permissions to as a comma separated list of usernames.

setPageViewPermissionsForGroups

@Deprecated
public void setPageViewPermissionsForGroups(java.lang.String spaceKey,
                                                       java.lang.String pageTitle,
                                                       java.lang.String groups)
Deprecated. Since 5.0 Use ConfluenceRpc.grantContentPermission(com.atlassian.confluence.it.content.security.ContentPermission, com.atlassian.confluence.it.ContentEntity)

Edit the permissions of the specified page as the current user.

One doesn't need to navigate to the page before calling this method.

Parameters:
spaceKey - the space the page belongs to
pageTitle - the title of the page
groups - the groups to restrict view permissions to as a comma separated list of group names.

setPageEditPermissionsForUsers

@Deprecated
public void setPageEditPermissionsForUsers(java.lang.String spaceKey,
                                                      java.lang.String pageTitle,
                                                      java.lang.String users)
Deprecated. Since 5.0 Use ConfluenceRpc.grantContentPermission(com.atlassian.confluence.it.content.security.ContentPermission, com.atlassian.confluence.it.ContentEntity)

Edit the permissions of the specified page as the current user.

One doesn't need to navigate to the page before calling this method.

Parameters:
spaceKey - the space the page belongs to
pageTitle - the title of the page
users - the users to restrict edit permissions to as a comma separated list of usernames.

setPageEditPermissionsForGroups

@Deprecated
public void setPageEditPermissionsForGroups(java.lang.String spaceKey,
                                                       java.lang.String pageTitle,
                                                       java.lang.String groups)
Deprecated. Since 5.0Use ConfluenceRpc.grantContentPermission(com.atlassian.confluence.it.content.security.ContentPermission, com.atlassian.confluence.it.ContentEntity)

Edit the permissions of the specified page as the current user.

One doesn't need to navigate to the page before calling this method.

Parameters:
spaceKey - the space the page belongs to
pageTitle - the title of the page
groups - the groups to restrict edit permissions to as a comma separated list of group names.

setPageLabels

public org.codehaus.jackson.JsonNode setPageLabels(java.lang.String spaceKey,
                                                   java.lang.String pageTitle,
                                                   java.lang.String labels,
                                                   User user)
                                            throws java.lang.Exception
Add the specified labels to the page

Parameters:
spaceKey - the space key
pageTitle - the page title
labels - the labels
user - the user that adding the labels
Returns:
a JSONObject with the server response
Throws:
java.lang.Exception

setPageLabels

public org.codehaus.jackson.JsonNode setPageLabels(java.lang.String spaceKey,
                                                   java.lang.String pageTitle,
                                                   java.lang.String labels)
                                            throws java.lang.Exception
Calls setPageLabels(String, String, String, com.atlassian.confluence.it.User) with the default user of User.ADMIN

Throws:
java.lang.Exception

setBlogLabels

public org.codehaus.jackson.JsonNode setBlogLabels(Space space,
                                                   java.lang.String blogTitle,
                                                   java.lang.String labels)
                                            throws java.lang.Exception
Add the specified labels to the blog

Parameters:
space - the space
blogTitle - the blog title
labels - the labels
Returns:
a JSONObject with the server response
Throws:
java.lang.Exception

removePageLabel

public void removePageLabel(java.lang.String spaceKey,
                            java.lang.String pageTitle)

editPageContent

public void editPageContent(java.lang.String content)
Sets content via RPC, as the admin user.

Parameters:
content - new page content

editPageWithContent

public void editPageWithContent(java.lang.String spaceKey,
                                java.lang.String title,
                                java.lang.String content)

gotoPageWithError

public void gotoPageWithError(java.lang.String url)


Copyright © 2003-2014 Atlassian. All Rights Reserved.