public class PageAcceptanceTester extends Object
Constructor and Description |
---|
PageAcceptanceTester(ConfluenceRpc rpc,
ConfluenceRpc wikiMarkupRpc,
net.sourceforge.jwebunit.junit.WebTester webTester) |
Modifier and Type | Method and Description |
---|---|
ViewContentBean |
createPage(String spaceKey,
String title,
String content,
String parentPageTitle) |
ViewContentBean |
createPageWithViewRestrictions(String spaceKey,
String title,
String content,
String parentPageTitle,
String viewPermissionUsers) |
void |
editPageContent(String content)
Sets content via RPC, as the admin user.
|
void |
editPageWithContent(String spaceKey,
String title,
String content) |
protected static long |
getCurrentPageId() |
long |
getPageId(String spaceKey,
String title) |
void |
gotoPageWithError(String url) |
void |
movePage(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(String spaceKey,
String title,
String newParentPage) |
void |
movePageToNewParent(String oldSpaceKey,
String title,
String newSpaceKey,
String newParentPage) |
void |
movePageToNewSpace(String spaceKey,
String title,
String newSpaceKey) |
void |
removePageLabel(String spaceKey,
String pageTitle) |
void |
renamePage(String spaceKey,
String originalPageTitle,
String newPageTitle) |
org.codehaus.jackson.JsonNode |
setBlogLabels(Space space,
BlogPost blogPost,
String labels)
Add the specified labels to the blog
|
void |
setPageEditPermissionsForGroups(String spaceKey,
String pageTitle,
String groups)
|
void |
setPageEditPermissionsForUsers(String spaceKey,
String pageTitle,
String users)
|
org.codehaus.jackson.JsonNode |
setPageLabels(String spaceKey,
String pageTitle,
String labels)
Calls
setPageLabels(String, String, String, com.atlassian.confluence.it.User) with
the default user of User.ADMIN |
org.codehaus.jackson.JsonNode |
setPageLabels(String spaceKey,
String pageTitle,
String labels,
User user)
Add the specified labels to the page
|
void |
setPageViewPermissionsForGroups(String spaceKey,
String pageTitle,
String groups)
|
void |
setPageViewPermissionsForUsers(String spaceKey,
String pageTitle,
String users)
|
void |
viewLabel(String spaceKey,
String labelName) |
public PageAcceptanceTester(ConfluenceRpc rpc, ConfluenceRpc wikiMarkupRpc, net.sourceforge.jwebunit.junit.WebTester webTester)
protected static long getCurrentPageId()
public void movePageToNewSpace(String spaceKey, String title, String newSpaceKey)
public void movePageToNewParent(String spaceKey, String title, String newParentPage)
public void movePageToNewParent(String oldSpaceKey, String title, String newSpaceKey, String newParentPage)
@Deprecated public void movePage(String title, Space oldSpace, Space newSpace)
EditContentBean
or appropriate rpc call such as ConfluenceRpc.movePageToTopLevel(com.atlassian.confluence.it.Page, com.atlassian.confluence.it.Space)
public ViewContentBean createPageWithViewRestrictions(String spaceKey, String title, String content, String parentPageTitle, @Nullable String viewPermissionUsers)
public ViewContentBean createPage(String spaceKey, String title, String content, String parentPageTitle)
@Deprecated public void setPageViewPermissionsForUsers(String spaceKey, String pageTitle, String users)
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.
spaceKey
- the space the page belongs topageTitle
- the title of the pageusers
- the users to restrict view permissions to as a comma separated list of usernames.@Deprecated public void setPageViewPermissionsForGroups(String spaceKey, String pageTitle, String groups)
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.
spaceKey
- the space the page belongs topageTitle
- the title of the pagegroups
- the groups to restrict view permissions to as a comma separated list of group names.@Deprecated public void setPageEditPermissionsForUsers(String spaceKey, String pageTitle, String users)
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.
spaceKey
- the space the page belongs topageTitle
- the title of the pageusers
- the users to restrict edit permissions to as a comma separated list of usernames.@Deprecated public void setPageEditPermissionsForGroups(String spaceKey, String pageTitle, String groups)
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.
spaceKey
- the space the page belongs topageTitle
- the title of the pagegroups
- the groups to restrict edit permissions to as a comma separated list of group names.public org.codehaus.jackson.JsonNode setPageLabels(String spaceKey, String pageTitle, String labels, User user) throws Exception
spaceKey
- the space keypageTitle
- the page titlelabels
- the labelsuser
- the user that adding the labelsException
public org.codehaus.jackson.JsonNode setPageLabels(String spaceKey, String pageTitle, String labels) throws Exception
setPageLabels(String, String, String, com.atlassian.confluence.it.User)
with
the default user of User.ADMINException
public org.codehaus.jackson.JsonNode setBlogLabels(Space space, BlogPost blogPost, String labels) throws Exception
space
- the spaceblogPost
- the blog postlabels
- the labelsException
public void editPageContent(String content)
content
- new page contentpublic void gotoPageWithError(String url)
Copyright © 2003–2017 Atlassian. All rights reserved.