public class ViewContentBean extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ViewContentBean.Builder |
Modifier and Type | Field and Description |
---|---|
static String |
REMOVE_CONTENT_MENU_LINK |
static String |
SHOW_COMMENTS_ID |
static String |
VIEW_PAGE_INFO_LINK_ID |
static String |
VIEW_SOURCE_LINK_ID |
Modifier and Type | Method and Description |
---|---|
EditContentBean |
addComment() |
ViewContentBean |
addTextComment(String comment) |
void |
assertCanAddComment() |
void |
assertCanEdit() |
void |
assertHasNoViewPermission() |
void |
assertHasViewPermission() |
static ViewContentBean.Builder |
builder() |
static ViewContentBean.Builder |
builder(net.sourceforge.jwebunit.junit.WebTester tester) |
boolean |
canAddAttachment()
Deprecated.
since 5.9.0.
|
boolean |
canAddBlogPost()
Deprecated.
since 5.9.0.
|
boolean |
canAddComment()
Returns true if the Add Comment link is present.
|
boolean |
canAddPage()
Deprecated.
since 5.9.0.
|
boolean |
canEdit() |
boolean |
canRemoveComment(String commentId) |
boolean |
canRequestAccess()
Returns true if the request access button link is present.
|
boolean |
containsLinkTo(String spaceKey,
String pageTitle) |
EditContentBean |
copy() |
EditContentBean |
createBlogPost()
Deprecated.
since 5.9.0 use
EditContentBean.CreateByUrlBuilder instead. |
EditContentBean |
createPage()
Deprecated.
since 5.9.0 use
EditContentBean.CreateByUrlBuilder instead. |
EditContentBean |
edit() |
EditContentBean |
editBlogPost() |
EditContentBean |
editComment(String commentId) |
void |
ensureCommentsAreShown() |
List<String> |
getChildren()
Returns the first 20 child page titles (if any) on the current page in the order they appear.
|
List<CommentBean> |
getComments()
Gets the first 20 top-level comments (if any) on the current page.
|
String |
getContent() |
CommentBean |
getFocusedComment() |
long |
getPageId() |
PageMetadata |
getPageMetadata() |
Date |
getRequestTime() |
String |
getTitle() |
boolean |
hasLabel(String label) |
boolean |
hasNoPermission()
Deprecated.
Since 5.6 Use
assertHasViewPermission() or assertHasNoViewPermission() |
boolean |
isFavourite()
Returns true if the unfavourite link is present, and false if the favourite link is present.
|
boolean |
isNotPermitted() |
boolean |
isRestricted()
Returns true if the page restrictions link is present.
|
boolean |
isViewable()
Deprecated.
since 5.6 Use
assertHasNoViewPermission() or assertHasViewPermission() |
boolean |
pageNotFound()
Returns true if the "Page Not Found" screen is presented.
|
void |
remove() |
void |
removeComment(String commentId) |
EditContentBean |
replyToComment(String commentId) |
void |
setAsFavourite()
Marks this page as a favourite.
|
ViewAttachmentsBean |
viewAttachments() |
static ViewContentBean |
viewBlogPost()
Factory method to return a ViewContentBean pointing at the current location of the web tester.
|
static ViewContentBean |
viewBlogPost(BlogPost blogPost) |
static ViewContentBean |
viewBlogPost(BlogPost blogPost,
net.sourceforge.jwebunit.junit.WebTester webTester) |
static ViewContentBean |
viewBlogPost(long contentId)
Factory method to return a ViewContentBean for the blog post with the given content ID.
|
static ViewContentBean |
viewBlogPost(long contentId,
net.sourceforge.jwebunit.junit.WebTester webTester)
Factory method to return a ViewContentBean for the blog post with the given content ID.
|
static ViewContentBean |
viewBlogPost(String spaceKey,
String postTitle)
Deprecated.
Since 5.6. This method is flaky as dates can change during test runs.
Use
viewBlogPost(com.atlassian.confluence.it.BlogPost) instead. |
static ViewContentBean |
viewBlogPost(String spaceKey,
String postTitle,
Date postDate)
Factory method to return a ViewContentBean for the given post and space.
|
static ViewContentBean |
viewBlogPost(String spaceKey,
String postTitle,
Date postDate,
net.sourceforge.jwebunit.junit.WebTester webTester)
Factory method to return a ViewContentBean for the given post and space.
|
static ViewContentBean |
viewBlogPost(String spaceKey,
String postTitle,
net.sourceforge.jwebunit.junit.WebTester webTester)
Deprecated.
Since 5.6. This method is flaky as dates can change during test runs.
Use
viewBlogPost(com.atlassian.confluence.it.BlogPost) instead. |
static ViewContentBean |
viewBlogPost(net.sourceforge.jwebunit.junit.WebTester webTester) |
static ViewContentBean |
viewBlogPostRespectingDate(BlogPost blogPost)
When viewing the blog actually respect the date set on the blog.
|
static ViewContentBean |
viewBlogPostRespectingDate(BlogPost blogPost,
net.sourceforge.jwebunit.junit.WebTester webTester)
When viewing the blog actually respect the date set on the blog.
|
ContentInfoBean |
viewInfo() |
static ViewContentBean |
viewPage()
Factory method to return a ViewContentBean pointing at the current location of the web tester.
|
static ViewContentBean |
viewPage(long contentId)
Factory method to return a ViewContentBean for the page with the given content ID.
|
static ViewContentBean |
viewPage(long contentId,
net.sourceforge.jwebunit.junit.WebTester webTester)
Factory method to return a ViewContentBean for the page with the given content ID.
|
static ViewContentBean |
viewPage(Page page) |
static ViewContentBean |
viewPage(Page page,
net.sourceforge.jwebunit.junit.WebTester tester) |
static ViewContentBean |
viewPage(Space space)
View the home page of the given space.
|
static ViewContentBean |
viewPage(Space space,
String pageTitle)
Factory method to return a ViewContentBean for the given page and space.
|
static ViewContentBean |
viewPage(Space space,
String pageTitle,
net.sourceforge.jwebunit.junit.WebTester tester) |
static ViewContentBean |
viewPage(Space space,
net.sourceforge.jwebunit.junit.WebTester tester) |
static ViewContentBean |
viewPage(String spaceKey)
Factory method to return a ViewContentBean for the homepage of the given space.
|
static ViewContentBean |
viewPage(String spaceKey,
String pageTitle)
Factory method to return a ViewContentBean for the given page and space.
|
static ViewContentBean |
viewPage(String spaceKey,
String pageTitle,
boolean commentsOn)
Factory method to return a ViewContentBean for the given page and space, with comments specifically
requested on or off.
|
static ViewContentBean |
viewPage(String spaceKey,
String pageTitle,
boolean commentsOn,
net.sourceforge.jwebunit.junit.WebTester webTester)
Factory method to return a ViewContentBean for the given page and space, with comments specifically
requested on or off.
|
static ViewContentBean |
viewPage(String spaceKey,
String pageTitle,
net.sourceforge.jwebunit.junit.WebTester webTester) |
static ViewContentBean |
viewPage(String spaceKey,
net.sourceforge.jwebunit.junit.WebTester webTester)
Factory method to return a ViewContentBean for the homepage of the given space.
|
static ViewContentBean |
viewPage(net.sourceforge.jwebunit.junit.WebTester webTester) |
static ViewContentBean |
viewPersonalSpace(String username) |
static ViewContentBean |
viewPersonalSpace(String username,
net.sourceforge.jwebunit.junit.WebTester webTester) |
static ViewContentBean |
viewSpaceHomePage(Space space) |
static ViewContentBean |
viewSpaceHomePage(Space space,
net.sourceforge.jwebunit.junit.WebTester webTester) |
static ViewContentBean |
viewUrl(String url) |
static ViewContentBean |
viewUrl(String url,
net.sourceforge.jwebunit.junit.WebTester webTester) |
void |
viewWikiMarkup() |
public static final String VIEW_SOURCE_LINK_ID
public static final String SHOW_COMMENTS_ID
public static final String REMOVE_CONTENT_MENU_LINK
public static final String VIEW_PAGE_INFO_LINK_ID
public static ViewContentBean viewPage()
public static ViewContentBean viewPage(net.sourceforge.jwebunit.junit.WebTester webTester)
public static ViewContentBean viewBlogPost()
public static ViewContentBean viewBlogPost(net.sourceforge.jwebunit.junit.WebTester webTester)
@Deprecated public static ViewContentBean viewBlogPost(String spaceKey, String postTitle)
viewBlogPost(com.atlassian.confluence.it.BlogPost)
instead.@Deprecated public static ViewContentBean viewBlogPost(String spaceKey, String postTitle, net.sourceforge.jwebunit.junit.WebTester webTester)
viewBlogPost(com.atlassian.confluence.it.BlogPost)
instead.public static ViewContentBean viewBlogPost(String spaceKey, String postTitle, Date postDate)
public static ViewContentBean viewBlogPost(String spaceKey, String postTitle, Date postDate, net.sourceforge.jwebunit.junit.WebTester webTester)
public static ViewContentBean viewBlogPost(long contentId)
public static ViewContentBean viewBlogPost(long contentId, net.sourceforge.jwebunit.junit.WebTester webTester)
public static ViewContentBean viewBlogPost(BlogPost blogPost)
public static ViewContentBean viewBlogPost(BlogPost blogPost, net.sourceforge.jwebunit.junit.WebTester webTester)
public static ViewContentBean viewBlogPostRespectingDate(BlogPost blogPost)
public static ViewContentBean viewBlogPostRespectingDate(BlogPost blogPost, net.sourceforge.jwebunit.junit.WebTester webTester)
public static ViewContentBean viewPage(long contentId)
public static ViewContentBean viewPage(long contentId, net.sourceforge.jwebunit.junit.WebTester webTester)
public static ViewContentBean viewPage(String spaceKey, net.sourceforge.jwebunit.junit.WebTester webTester)
public static ViewContentBean viewPage(String spaceKey)
public static ViewContentBean viewPage(Space space, String pageTitle)
public static ViewContentBean viewPage(Space space, String pageTitle, net.sourceforge.jwebunit.junit.WebTester tester)
public static ViewContentBean viewPage(String spaceKey, String pageTitle, net.sourceforge.jwebunit.junit.WebTester webTester)
public static ViewContentBean viewPage(String spaceKey, String pageTitle)
public static ViewContentBean viewPage(Page page)
public static ViewContentBean viewPage(Page page, net.sourceforge.jwebunit.junit.WebTester tester)
public static ViewContentBean viewPage(Space space)
space
- of which the home page will be visitedViewContentBean
viewing the home page of the space.public static ViewContentBean viewPage(Space space, net.sourceforge.jwebunit.junit.WebTester tester)
public static ViewContentBean viewPage(String spaceKey, String pageTitle, boolean commentsOn)
commentsOn
- specifies value of the showComments parameterpublic static ViewContentBean viewPage(String spaceKey, String pageTitle, boolean commentsOn, net.sourceforge.jwebunit.junit.WebTester webTester)
commentsOn
- specifies value of the showComments parameterpublic static ViewContentBean viewPersonalSpace(String username)
public static ViewContentBean viewPersonalSpace(String username, net.sourceforge.jwebunit.junit.WebTester webTester)
public static ViewContentBean viewSpaceHomePage(Space space)
public static ViewContentBean viewSpaceHomePage(Space space, net.sourceforge.jwebunit.junit.WebTester webTester)
public static ViewContentBean viewUrl(String url)
public static ViewContentBean viewUrl(String url, net.sourceforge.jwebunit.junit.WebTester webTester)
public static ViewContentBean.Builder builder()
public static ViewContentBean.Builder builder(net.sourceforge.jwebunit.junit.WebTester tester)
public String getTitle()
public String getContent()
@Deprecated public EditContentBean createPage()
EditContentBean.CreateByUrlBuilder
instead.@Deprecated public EditContentBean createBlogPost()
EditContentBean.CreateByUrlBuilder
instead.public EditContentBean edit()
public EditContentBean editBlogPost()
public void remove()
public ViewContentBean addTextComment(String comment)
public EditContentBean addComment()
public List<CommentBean> getComments()
Ensures the comments are shown before trying to retrieve anything, so may result in a page reload.
TODO threading.
public EditContentBean replyToComment(String commentId)
public EditContentBean editComment(String commentId)
public void removeComment(String commentId)
public ViewAttachmentsBean viewAttachments()
public ContentInfoBean viewInfo()
public void ensureCommentsAreShown()
public List<String> getChildren()
As of CONFDEV-22698 the default sidebar setting will be pagetree, which will not play nicely with this method as-is. The following can be used as a temporary workaround to switch spaces to use the old child pages view:
rpc.executeAuthPluginXmlRpc("space-sidebar", "setOption", TEST_SPACE.getKey(), "nav-type", "pages");
public void viewWikiMarkup()
public long getPageId()
public boolean isFavourite()
AssertionError
- if neither link is present.public void setAsFavourite()
public boolean isRestricted()
public boolean canRequestAccess()
@Deprecated public boolean canAddPage()
@Deprecated public boolean canAddBlogPost()
public boolean canAddComment()
public boolean canRemoveComment(String commentId)
@Deprecated public boolean canAddAttachment()
public boolean canEdit()
public boolean pageNotFound()
@Deprecated public boolean hasNoPermission()
assertHasViewPermission()
or assertHasNoViewPermission()
public void assertHasNoViewPermission()
public void assertHasViewPermission()
public void assertCanEdit()
public void assertCanAddComment()
public boolean isNotPermitted()
public Date getRequestTime()
public CommentBean getFocusedComment()
@Deprecated public boolean isViewable()
assertHasNoViewPermission()
or assertHasViewPermission()
public EditContentBean copy()
public boolean hasLabel(String label)
public PageMetadata getPageMetadata()
Copyright © 2003–2018 Atlassian. All rights reserved.