Class EditContentBean
- java.lang.Object
-
- com.atlassian.confluence.it.content.EditContentBean
-
public class EditContentBean extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EditContentBean.CreateByUrlBuilder
-
Field Summary
Fields Modifier and Type Field Description static String
CREATE_BLOGPOST_TITLE_TEXT
static String
CREATE_BUTTON_LINK_ID
static String
CREATE_PAGE_FORM_ID
static String
CREATE_PAGE_TITLE_TEXT
static String
EDIT_PAGE_FORM_ID
static String
EDIT_PAGE_LINK_ID
-
Constructor Summary
Constructors Modifier Constructor Description protected
EditContentBean(String formId, net.sourceforge.jwebunit.junit.WebTester webTester)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static EditContentBean
addComment()
static EditContentBean
addComment(net.sourceforge.jwebunit.junit.WebTester webTester)
ViewContentBean
cancel()
static EditContentBean
createBlogPost(String spaceKey)
Deprecated.since 5.9.0 usecreateByUrlBuilder(Space, WebTester)
instead.static EditContentBean
createBlogPost(net.sourceforge.jwebunit.junit.WebTester webTester)
Deprecated.since 5.9.0 usecreateByUrlBuilder(Space, WebTester)
instead.static EditContentBean.CreateByUrlBuilder
createByUrlBuilder(Space space, net.sourceforge.jwebunit.junit.WebTester webTester)
static EditContentBean
createChildPage(String spaceKey, String parentPageTitle)
Returns a page creation bean by going directly to the URL of a page, then clicking on the 'Add Page' link on the page.static EditContentBean
createChildPage(String spaceKey, String parentPageTitle, net.sourceforge.jwebunit.junit.WebTester webTester)
static EditContentBean
createPage(Space space)
Deprecated.since 5.9.0 usecreateByUrlBuilder(Space, WebTester)
instead.static EditContentBean
createPage(String spaceKey)
Deprecated.since 5.9.0 usecreateByUrlBuilder(Space, WebTester)
instead.static EditContentBean
createPage(net.sourceforge.jwebunit.junit.WebTester webTester)
Deprecated.since 5.9.0 usecreateByUrlBuilder(Space, WebTester)
instead.static EditContentBean
editBlogPost()
static EditContentBean
editBlogPost(long blogPostId)
static EditContentBean
editBlogPost(long blogPostId, net.sourceforge.jwebunit.junit.WebTester webTester)
static EditContentBean
editBlogPost(BlogPost blogPost)
static EditContentBean
editBlogPost(BlogPost blogPost, net.sourceforge.jwebunit.junit.WebTester webTester)
static EditContentBean
editBlogPost(net.sourceforge.jwebunit.junit.WebTester webTester)
static EditContentBean
editComment(String commentId)
static EditContentBean
editComment(String commentId, net.sourceforge.jwebunit.junit.WebTester webTester)
static EditContentBean
editDraftWithExtraParameters(long draftId, String spaceKey, String extraParams)
static EditContentBean
editPage()
Returns a page edit bean from the current location of the web tester, by clicking on the 'Edit' link on the page.static EditContentBean
editPage(Page page)
static EditContentBean
editPage(Page page, net.sourceforge.jwebunit.junit.WebTester webTester)
static EditContentBean
editPage(String spaceKey, String pageTitle)
Returns a page edit bean of the passed space and page title, by going direct to a constructed URL.static EditContentBean
editPage(String spaceKey, String pageTitle, net.sourceforge.jwebunit.junit.WebTester webTester)
static EditContentBean
editPage(net.sourceforge.jwebunit.junit.WebTester webTester)
String
getContent()
long
getDraftId()
static String
getEditBlogPostUrl(String id)
static String
getEditPageTitle(String pageTitle)
static String
getEditPageUrl(String spaceKey, String pageTitle)
String
getFirstActionError()
Retrieve the first action error if it exists or else fail.String
getOriginalQueryString()
String
getParentPageTitle()
boolean
isNotifyWatchersChecked()
boolean
isRestrictionsButtonPresent()
boolean
isWatchPageCheckboxChecked()
boolean
isWatchPageCheckboxVisible()
static EditContentBean
replyToComment(String commentId)
static EditContentBean
replyToComment(String commentId, net.sourceforge.jwebunit.junit.WebTester webTester)
static EditContentBean
resumeDraft(long draftId)
static EditContentBean
resumeDraft(long draftId, net.sourceforge.jwebunit.junit.WebTester webTester)
ViewContentBean
save()
ViewContentBean
saveMergeContent()
void
setCaptchaField(String captchaResponse)
EditContentBean
setComment(String comment)
Set the version comment for this change.EditContentBean
setContent(String content)
EditContentBean
setLocation(Space space)
Sets the location to a new space, in the top root level.EditContentBean
setMoveHierarchy(boolean movePageHierarchy)
Note that this currently gets set by default whenever a page location is set in the UI.EditContentBean
setNewSpaceKey(String spaceKey)
EditContentBean
setNotifyWatchers(boolean check)
EditContentBean
setParentPageString(String parentPageString)
EditContentBean
setPosition(String position)
EditContentBean
setPostingDay(String postingDay)
EditContentBean
setTargetId(String targetId)
EditContentBean
setTitle(String title)
void
setWatchPage(boolean watchPage)
Set the watch page checkbox (currently on the comment form only).
-
-
-
Field Detail
-
CREATE_PAGE_TITLE_TEXT
public static final String CREATE_PAGE_TITLE_TEXT
- See Also:
- Constant Field Values
-
CREATE_BLOGPOST_TITLE_TEXT
public static final String CREATE_BLOGPOST_TITLE_TEXT
- See Also:
- Constant Field Values
-
CREATE_BUTTON_LINK_ID
public static final String CREATE_BUTTON_LINK_ID
- See Also:
- Constant Field Values
-
EDIT_PAGE_LINK_ID
public static final String EDIT_PAGE_LINK_ID
- See Also:
- Constant Field Values
-
CREATE_PAGE_FORM_ID
public static final String CREATE_PAGE_FORM_ID
- See Also:
- Constant Field Values
-
EDIT_PAGE_FORM_ID
public static final String EDIT_PAGE_FORM_ID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EditContentBean
protected EditContentBean(String formId, net.sourceforge.jwebunit.junit.WebTester webTester)
-
-
Method Detail
-
createPage
@Deprecated public static EditContentBean createPage(net.sourceforge.jwebunit.junit.WebTester webTester)
Deprecated.since 5.9.0 usecreateByUrlBuilder(Space, WebTester)
instead.
-
createPage
@Deprecated public static EditContentBean createPage(String spaceKey)
Deprecated.since 5.9.0 usecreateByUrlBuilder(Space, WebTester)
instead.
-
createPage
@Deprecated public static EditContentBean createPage(Space space)
Deprecated.since 5.9.0 usecreateByUrlBuilder(Space, WebTester)
instead.
-
createByUrlBuilder
public static EditContentBean.CreateByUrlBuilder createByUrlBuilder(Space space, net.sourceforge.jwebunit.junit.WebTester webTester)
-
createChildPage
public static EditContentBean createChildPage(String spaceKey, String parentPageTitle)
Returns a page creation bean by going directly to the URL of a page, then clicking on the 'Add Page' link on the page.
-
createChildPage
public static EditContentBean createChildPage(String spaceKey, String parentPageTitle, net.sourceforge.jwebunit.junit.WebTester webTester)
-
createBlogPost
public static EditContentBean createBlogPost(net.sourceforge.jwebunit.junit.WebTester webTester)
Deprecated.since 5.9.0 usecreateByUrlBuilder(Space, WebTester)
instead.
-
createBlogPost
public static EditContentBean createBlogPost(String spaceKey)
Deprecated.since 5.9.0 usecreateByUrlBuilder(Space, WebTester)
instead.
-
editPage
public static EditContentBean editPage()
Returns a page edit bean from the current location of the web tester, by clicking on the 'Edit' link on the page.Usually, you'll invoke this via
ViewContentBean.edit()
.
-
editPage
public static EditContentBean editPage(net.sourceforge.jwebunit.junit.WebTester webTester)
-
editBlogPost
public static EditContentBean editBlogPost()
-
editBlogPost
public static EditContentBean editBlogPost(net.sourceforge.jwebunit.junit.WebTester webTester)
-
editBlogPost
public static EditContentBean editBlogPost(long blogPostId)
-
editBlogPost
public static EditContentBean editBlogPost(long blogPostId, net.sourceforge.jwebunit.junit.WebTester webTester)
-
editBlogPost
public static EditContentBean editBlogPost(BlogPost blogPost)
-
editBlogPost
public static EditContentBean editBlogPost(BlogPost blogPost, net.sourceforge.jwebunit.junit.WebTester webTester)
-
resumeDraft
public static EditContentBean resumeDraft(long draftId)
-
resumeDraft
public static EditContentBean resumeDraft(long draftId, net.sourceforge.jwebunit.junit.WebTester webTester)
-
editDraftWithExtraParameters
public static EditContentBean editDraftWithExtraParameters(long draftId, String spaceKey, String extraParams)
-
editPage
public static EditContentBean editPage(String spaceKey, String pageTitle)
Returns a page edit bean of the passed space and page title, by going direct to a constructed URL. Assumes that the page already exists.
-
editPage
public static EditContentBean editPage(String spaceKey, String pageTitle, net.sourceforge.jwebunit.junit.WebTester webTester)
-
editPage
public static EditContentBean editPage(Page page)
-
editPage
public static EditContentBean editPage(Page page, net.sourceforge.jwebunit.junit.WebTester webTester)
-
addComment
public static EditContentBean addComment()
-
addComment
public static EditContentBean addComment(net.sourceforge.jwebunit.junit.WebTester webTester)
-
replyToComment
public static EditContentBean replyToComment(String commentId)
-
replyToComment
public static EditContentBean replyToComment(String commentId, net.sourceforge.jwebunit.junit.WebTester webTester)
-
editComment
public static EditContentBean editComment(String commentId)
-
editComment
public static EditContentBean editComment(String commentId, net.sourceforge.jwebunit.junit.WebTester webTester)
-
getDraftId
public long getDraftId()
-
getFirstActionError
public String getFirstActionError()
Retrieve the first action error if it exists or else fail.- Throws:
AssertionError
- if there is no action errors exist
-
setTitle
public EditContentBean setTitle(String title)
-
setContent
public EditContentBean setContent(String content)
-
getContent
public String getContent()
-
getParentPageTitle
public String getParentPageTitle()
-
getOriginalQueryString
public String getOriginalQueryString()
-
setComment
public EditContentBean setComment(String comment)
Set the version comment for this change. Only applies to pages.
-
setLocation
public EditContentBean setLocation(Space space)
Sets the location to a new space, in the top root level.
-
setNewSpaceKey
public EditContentBean setNewSpaceKey(String spaceKey)
-
setPosition
public EditContentBean setPosition(String position)
-
setMoveHierarchy
public EditContentBean setMoveHierarchy(boolean movePageHierarchy)
Note that this currently gets set by default whenever a page location is set in the UI.
-
setTargetId
public EditContentBean setTargetId(String targetId)
-
setParentPageString
public EditContentBean setParentPageString(String parentPageString)
-
setPostingDay
public EditContentBean setPostingDay(String postingDay)
-
setNotifyWatchers
public EditContentBean setNotifyWatchers(boolean check)
-
isNotifyWatchersChecked
public boolean isNotifyWatchersChecked()
-
save
public ViewContentBean save()
-
cancel
public ViewContentBean cancel()
-
setWatchPage
public void setWatchPage(boolean watchPage)
Set the watch page checkbox (currently on the comment form only).
-
isWatchPageCheckboxVisible
public boolean isWatchPageCheckboxVisible()
-
isRestrictionsButtonPresent
public boolean isRestrictionsButtonPresent()
-
isWatchPageCheckboxChecked
public boolean isWatchPageCheckboxChecked()
-
saveMergeContent
public ViewContentBean saveMergeContent()
-
setCaptchaField
public void setCaptchaField(String captchaResponse)
-
-