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 classEditContentBean.CreateByUrlBuilder 
- 
Field Summary
Fields Modifier and Type Field Description static StringCREATE_BLOGPOST_TITLE_TEXTstatic StringCREATE_BUTTON_LINK_IDstatic StringCREATE_PAGE_FORM_IDstatic StringCREATE_PAGE_TITLE_TEXTstatic StringEDIT_PAGE_FORM_IDstatic StringEDIT_PAGE_LINK_ID 
- 
Constructor Summary
Constructors Modifier Constructor Description protectedEditContentBean(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 EditContentBeanaddComment()static EditContentBeanaddComment(net.sourceforge.jwebunit.junit.WebTester webTester)ViewContentBeancancel()static EditContentBeancreateBlogPost(String spaceKey)Deprecated.since 5.9.0 usecreateByUrlBuilder(Space, WebTester)instead.static EditContentBeancreateBlogPost(net.sourceforge.jwebunit.junit.WebTester webTester)Deprecated.since 5.9.0 usecreateByUrlBuilder(Space, WebTester)instead.static EditContentBean.CreateByUrlBuildercreateByUrlBuilder(Space space, net.sourceforge.jwebunit.junit.WebTester webTester)static EditContentBeancreateChildPage(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 EditContentBeancreateChildPage(String spaceKey, String parentPageTitle, net.sourceforge.jwebunit.junit.WebTester webTester)static EditContentBeancreatePage(Space space)Deprecated.since 5.9.0 usecreateByUrlBuilder(Space, WebTester)instead.static EditContentBeancreatePage(String spaceKey)Deprecated.since 5.9.0 usecreateByUrlBuilder(Space, WebTester)instead.static EditContentBeancreatePage(net.sourceforge.jwebunit.junit.WebTester webTester)Deprecated.since 5.9.0 usecreateByUrlBuilder(Space, WebTester)instead.static EditContentBeaneditBlogPost()static EditContentBeaneditBlogPost(long blogPostId)static EditContentBeaneditBlogPost(long blogPostId, net.sourceforge.jwebunit.junit.WebTester webTester)static EditContentBeaneditBlogPost(BlogPost blogPost)static EditContentBeaneditBlogPost(BlogPost blogPost, net.sourceforge.jwebunit.junit.WebTester webTester)static EditContentBeaneditBlogPost(net.sourceforge.jwebunit.junit.WebTester webTester)static EditContentBeaneditComment(String commentId)static EditContentBeaneditComment(String commentId, net.sourceforge.jwebunit.junit.WebTester webTester)static EditContentBeaneditDraftWithExtraParameters(long draftId, String spaceKey, String extraParams)static EditContentBeaneditPage()Returns a page edit bean from the current location of the web tester, by clicking on the 'Edit' link on the page.static EditContentBeaneditPage(Page page)static EditContentBeaneditPage(Page page, net.sourceforge.jwebunit.junit.WebTester webTester)static EditContentBeaneditPage(String spaceKey, String pageTitle)Returns a page edit bean of the passed space and page title, by going direct to a constructed URL.static EditContentBeaneditPage(String spaceKey, String pageTitle, net.sourceforge.jwebunit.junit.WebTester webTester)static EditContentBeaneditPage(net.sourceforge.jwebunit.junit.WebTester webTester)StringgetContent()longgetDraftId()static StringgetEditBlogPostUrl(String id)static StringgetEditPageTitle(String pageTitle)static StringgetEditPageUrl(String spaceKey, String pageTitle)StringgetFirstActionError()Retrieve the first action error if it exists or else fail.StringgetOriginalQueryString()longgetPageId()StringgetParentPageTitle()booleanisNotifyWatchersChecked()booleanisRestrictionsButtonPresent()booleanisWatchPageCheckboxChecked()booleanisWatchPageCheckboxVisible()static EditContentBeanreplyToComment(String commentId)static EditContentBeanreplyToComment(String commentId, net.sourceforge.jwebunit.junit.WebTester webTester)static EditContentBeanresumeDraft(long draftId)static EditContentBeanresumeDraft(long draftId, net.sourceforge.jwebunit.junit.WebTester webTester)ViewContentBeansave()ViewContentBeansaveMergeContent()voidsetCaptchaField(String captchaResponse)EditContentBeansetComment(String comment)Set the version comment for this change.EditContentBeansetContent(String content)EditContentBeansetLocation(Space space)Sets the location to a new space, in the top root level.EditContentBeansetMoveHierarchy(boolean movePageHierarchy)Note that this currently gets set by default whenever a page location is set in the UI.EditContentBeansetNewSpaceKey(String spaceKey)EditContentBeansetNotifyWatchers(boolean check)EditContentBeansetParentPageString(String parentPageString)EditContentBeansetPosition(String position)EditContentBeansetPostingDay(String postingDay)EditContentBeansetPostingTime(String postingTime)EditContentBeansetTargetId(String targetId)EditContentBeansetTitle(String title)voidsetWatchPage(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()
 
- 
getPageId
public long getPageId()
 
- 
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)
 
- 
setPostingTime
public EditContentBean setPostingTime(String postingTime)
 
- 
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)
 
 - 
 
 -