|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.it.content.ViewContentBean
public class ViewContentBean
Represents a View page for a Page or News.
Field Summary | |
---|---|
static String |
ADD_MENU_LINK_ID
|
protected Pattern |
PAGE_ID_PATTERN
|
static String |
REMOVE_CONTENT_MENU_LINK
|
static String |
SHOW_COMMENTS_ID
|
protected String |
title
|
static String |
VIEW_PAGE_INFO_LINK_ID
|
static String |
VIEW_SOURCE_LINK_ID
|
protected net.sourceforge.jwebunit.junit.WebTester |
webTester
|
Method Summary | |
---|---|
EditContentBean |
addComment()
|
ViewContentBean |
addTextComment(String comment)
|
boolean |
canAddBlogPost()
Returns true if the Add Blogpost link is present. |
boolean |
canAddComment()
Returns true if the Add Comment link is present. |
boolean |
canAddPage()
Returns true if the Add Page link is present. |
boolean |
canRemoveComment(String commentId)
|
boolean |
containsLinkTo(String spaceKey,
String pageTitle)
|
EditContentBean |
createBlogPost()
|
EditContentBean |
createPage()
|
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()
|
Date |
getRequestTime()
|
String |
getTitle()
|
boolean |
hasLabel(String label)
|
boolean |
isFavourite()
Returns true if the unfavourite link is present, and false if the favourite link is present. |
boolean |
isRestricted()
Returns true if the page restrictions link is present. |
boolean |
isViewable()
|
boolean |
isWatching()
Returns true if the unwatch link is present, and false if the watch link is present. |
boolean |
isWatchingSpace()
Returns true if the space containing the content is being watched. |
boolean |
pageNotFound()
Returns true if the "Page Not Found" screen is presented. |
void |
remove()
|
void |
removeComment(String commentId)
|
EditContentBean |
replyToComment(String commentId)
|
void |
toggleWatch()
Clicks the "Watch" link. |
ViewAttachmentsBean |
viewAttachments()
|
static ViewContentBean |
viewBlogPost(net.sourceforge.jwebunit.junit.WebTester tester)
Factory method to return a ViewContentBean pointing at the current location of the web tester. |
static ViewContentBean |
viewBlogPost(net.sourceforge.jwebunit.junit.WebTester webTester,
BlogPost blogPost)
The blog post is assumed to be today. |
static ViewContentBean |
viewBlogPost(net.sourceforge.jwebunit.junit.WebTester webTester,
long contentId)
Factory method to return a ViewContentBean for the blog post with the given content ID. |
static ViewContentBean |
viewBlogPost(net.sourceforge.jwebunit.junit.WebTester webTester,
String spaceKey,
String postTitle)
Factory method to return a ViewContentBean for the given post and space. |
static ViewContentBean |
viewBlogPost(net.sourceforge.jwebunit.junit.WebTester webTester,
String spaceKey,
String postTitle,
Date postDate)
Factory method to return a ViewContentBean for the given post and space. |
static ViewContentBean |
viewBlogPostRespectingDate(net.sourceforge.jwebunit.junit.WebTester webTester,
BlogPost blogPost)
When viewing the blog actually respect the date set on the blog. |
ContentInfoBean |
viewInfo()
|
static ViewContentBean |
viewPage(net.sourceforge.jwebunit.junit.WebTester webTester)
Factory method to return a ViewContentBean pointing at the current location of the web tester. |
static ViewContentBean |
viewPage(net.sourceforge.jwebunit.junit.WebTester webTester,
long contentId)
Factory method to return a ViewContentBean for the page with the given content ID. |
static ViewContentBean |
viewPage(net.sourceforge.jwebunit.junit.WebTester webTester,
Page page)
|
static ViewContentBean |
viewPage(net.sourceforge.jwebunit.junit.WebTester tester,
Space space)
View the home page of the given space. |
static ViewContentBean |
viewPage(net.sourceforge.jwebunit.junit.WebTester webTester,
Space space,
String pageTitle)
Factory method to return a ViewContentBean for the given page and space. |
static ViewContentBean |
viewPage(net.sourceforge.jwebunit.junit.WebTester webTester,
String spaceKey)
Factory method to return a ViewContentBean for the homepage of the given space. |
static ViewContentBean |
viewPage(net.sourceforge.jwebunit.junit.WebTester webTester,
String spaceKey,
String pageTitle)
Factory method to return a ViewContentBean for the given page and space. |
static ViewContentBean |
viewPage(net.sourceforge.jwebunit.junit.WebTester webTester,
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 |
viewPageWithNoDecorators(net.sourceforge.jwebunit.junit.WebTester webTester,
Page page)
|
static ViewContentBean |
viewPersonalSpace(net.sourceforge.jwebunit.junit.WebTester webTester,
String username)
|
void |
viewWatchingSpace()
Clicks the "Watching Space" link on the Tools menu, which loads the Space Advanced page where space-level watching is administered. |
void |
viewWikiMarkup()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final net.sourceforge.jwebunit.junit.WebTester webTester
public static final String VIEW_SOURCE_LINK_ID
public static final String SHOW_COMMENTS_ID
public static final String ADD_MENU_LINK_ID
public static final String REMOVE_CONTENT_MENU_LINK
public static final String VIEW_PAGE_INFO_LINK_ID
protected final Pattern PAGE_ID_PATTERN
protected final String title
Method Detail |
---|
public static ViewContentBean viewPage(net.sourceforge.jwebunit.junit.WebTester webTester)
public static ViewContentBean viewBlogPost(net.sourceforge.jwebunit.junit.WebTester tester)
public static ViewContentBean viewBlogPost(net.sourceforge.jwebunit.junit.WebTester webTester, String spaceKey, String postTitle)
public static ViewContentBean viewBlogPost(net.sourceforge.jwebunit.junit.WebTester webTester, String spaceKey, String postTitle, Date postDate)
public static ViewContentBean viewBlogPost(net.sourceforge.jwebunit.junit.WebTester webTester, long contentId)
public static ViewContentBean viewBlogPost(net.sourceforge.jwebunit.junit.WebTester webTester, BlogPost blogPost)
public static ViewContentBean viewBlogPostRespectingDate(net.sourceforge.jwebunit.junit.WebTester webTester, BlogPost blogPost)
public static ViewContentBean viewPage(net.sourceforge.jwebunit.junit.WebTester webTester, long contentId)
public static ViewContentBean viewPage(net.sourceforge.jwebunit.junit.WebTester webTester, String spaceKey)
public static ViewContentBean viewPage(net.sourceforge.jwebunit.junit.WebTester webTester, Space space, String pageTitle)
public static ViewContentBean viewPage(net.sourceforge.jwebunit.junit.WebTester webTester, String spaceKey, String pageTitle)
public static ViewContentBean viewPage(net.sourceforge.jwebunit.junit.WebTester webTester, Page page)
public static ViewContentBean viewPageWithNoDecorators(net.sourceforge.jwebunit.junit.WebTester webTester, Page page)
public static ViewContentBean viewPage(net.sourceforge.jwebunit.junit.WebTester tester, Space space)
tester
- needs to be logged in as a user with permission to see the spacespace
- of which the home page will be visited
ViewContentBean
viewing the home page of the space.public static ViewContentBean viewPage(net.sourceforge.jwebunit.junit.WebTester webTester, String spaceKey, String pageTitle, boolean commentsOn)
commentsOn
- specifies value of the showComments parameterpublic static ViewContentBean viewPersonalSpace(net.sourceforge.jwebunit.junit.WebTester webTester, String username)
public String getTitle()
public String getContent()
public EditContentBean createPage()
public EditContentBean createBlogPost()
public EditContentBean edit()
public EditContentBean editBlogPost()
public void remove()
public ViewContentBean addTextComment(String comment)
public EditContentBean addComment()
public List<CommentBean> getComments()
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()
public void viewWikiMarkup()
public long getPageId()
public void toggleWatch()
public void viewWatchingSpace()
public boolean isWatching()
junit.framework.AssertionFailedError
- if neither link is present (eg if space is watched).public boolean isWatchingSpace()
public boolean isFavourite()
junit.framework.AssertionFailedError
- if neither link is present.public boolean isRestricted()
public boolean canAddPage()
public boolean canAddBlogPost()
public boolean canAddComment()
public boolean canRemoveComment(String commentId)
public boolean pageNotFound()
public Date getRequestTime()
public CommentBean getFocusedComment()
public boolean isViewable()
public boolean containsLinkTo(String spaceKey, String pageTitle)
public boolean hasLabel(String label)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |