com.atlassian.confluence.it.content
Class EditContentBean

java.lang.Object
  extended by com.atlassian.confluence.it.content.EditContentBean

public class EditContentBean
extends java.lang.Object


Nested Class Summary
static class EditContentBean.CreateByUrlBuilder
           
 
Field Summary
static java.lang.String CREATE_BLOGPOST_LINK_ID
           
static java.lang.String CREATE_BLOGPOST_LINK_TEXT
           
static java.lang.String CREATE_BLOGPOST_TITLE_TEXT
           
static java.lang.String CREATE_BUTTON_LINK_ID
           
static java.lang.String CREATE_COMMENT_LINK_ID
           
static java.lang.String CREATE_PAGE_FORM_ID
           
static java.lang.String CREATE_PAGE_LINK_ID
           
static java.lang.String CREATE_PAGE_LINK_TEXT
           
static java.lang.String CREATE_PAGE_TITLE_TEXT
           
static java.lang.String EDIT_PAGE_FORM_ID
           
static java.lang.String EDIT_PAGE_LINK_ID
           
 
Constructor Summary
protected EditContentBean(java.lang.String formId, net.sourceforge.jwebunit.junit.WebTester webTester)
           
 
Method Summary
static EditContentBean addComment()
           
static EditContentBean addComment(net.sourceforge.jwebunit.junit.WebTester webTester)
           
 ViewContentBean cancel()
           
static EditContentBean createBlogPost()
          Returns a blog post creation bean from the current location of the web tester, by clicking on the 'Add News' link on the page.
static EditContentBean createBlogPost(java.lang.String spaceKey)
          Returns a blog post creation bean by going to the dashboard, clicking on the space name, then on the space home page, clicking on the 'Add News' link on the page.
static EditContentBean createBlogPost(java.lang.String spaceKey, net.sourceforge.jwebunit.junit.WebTester webTester)
           
static EditContentBean createBlogPost(net.sourceforge.jwebunit.junit.WebTester webTester)
           
static EditContentBean.CreateByUrlBuilder createByUrlBuilder(Space space, net.sourceforge.jwebunit.junit.WebTester webTester)
           
static EditContentBean createChildPage(java.lang.String spaceKey, java.lang.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(java.lang.String spaceKey, java.lang.String parentPageTitle, net.sourceforge.jwebunit.junit.WebTester webTester)
           
static EditContentBean createPage()
          Returns a page creation bean from the current location of the web tester, by clicking on the 'Add Page' link on the page.
static EditContentBean createPage(Space space)
          Returns a page creation bean by going to view the space and clicking on the 'Add Page' link on the page.
static EditContentBean createPage(Space space, net.sourceforge.jwebunit.junit.WebTester webTester)
           
static EditContentBean createPage(java.lang.String spaceKey)
          Returns a page creation bean by going to view the space and clicking on the 'Add Page' link on the page.
static EditContentBean createPage(java.lang.String spaceKey, net.sourceforge.jwebunit.junit.WebTester webTester)
           
static EditContentBean createPage(net.sourceforge.jwebunit.junit.WebTester webTester)
           
static EditContentBean createPageViaUrl(Space space)
          Deprecated. since 5.4 use EditContentBean.CreateByUrlBuilder instead.
static EditContentBean createPageViaUrl(Space space, net.sourceforge.jwebunit.junit.WebTester tester)
          Deprecated. since 5.4 use EditContentBean.CreateByUrlBuilder instead.
static EditContentBean editBlogPost()
           
static EditContentBean editBlogPost(BlogPost blogPost)
           
static EditContentBean editBlogPost(BlogPost blogPost, net.sourceforge.jwebunit.junit.WebTester webTester)
           
static EditContentBean editBlogPost(long blogPostId)
           
static EditContentBean editBlogPost(long blogPostId, net.sourceforge.jwebunit.junit.WebTester webTester)
           
static EditContentBean editBlogPost(net.sourceforge.jwebunit.junit.WebTester webTester)
           
static EditContentBean editComment(java.lang.String commentId)
           
static EditContentBean editComment(java.lang.String commentId, net.sourceforge.jwebunit.junit.WebTester webTester)
           
static EditContentBean editDraftWithExtraParameters(long draftId, java.lang.String spaceKey, java.lang.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(java.lang.String spaceKey, java.lang.String pageTitle)
          Returns a page edit bean of the passed space and page title, by going direct to a constructed URL.
static EditContentBean editPage(java.lang.String spaceKey, java.lang.String pageTitle, net.sourceforge.jwebunit.junit.WebTester webTester)
           
static EditContentBean editPage(net.sourceforge.jwebunit.junit.WebTester webTester)
           
 java.lang.String getContent()
           
 long getDraftId()
           
static java.lang.String getEditBlogPostUrl(java.lang.String id)
           
static java.lang.String getEditPageTitle(java.lang.String pageTitle)
           
static java.lang.String getEditPageUrl(java.lang.String spaceKey, java.lang.String pageTitle)
           
 java.lang.String getFirstActionError()
          Retrieve the first action error if it exists or else fail.
 java.lang.String getOriginalQueryString()
           
 java.lang.String getParentPageTitle()
           
 boolean isNotifyWatchersChecked()
           
 boolean isRestrictionsButtonPresent()
           
 boolean isWatchPageCheckboxChecked()
           
 boolean isWatchPageCheckboxVisible()
           
static EditContentBean replyToComment(java.lang.String commentId)
           
static EditContentBean replyToComment(java.lang.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(java.lang.String captchaResponse)
           
 EditContentBean setComment(java.lang.String comment)
          Set the version comment for this change.
 EditContentBean setContent(java.lang.String content)
           
 EditContentBean setEditPermissionsGroups(Group... groups)
           
 EditContentBean setEditPermissionsGroups(java.lang.String group)
           
 EditContentBean setEditPermissionsUsers(java.lang.String users)
           
 EditContentBean setEditPermissionsUsers(User... users)
           
 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(java.lang.String spaceKey)
           
 EditContentBean setNotifyWatchers(boolean check)
           
 EditContentBean setParentPageString(java.lang.String parentPageString)
           
 EditContentBean setPosition(java.lang.String position)
           
 EditContentBean setPostingDay(java.lang.String postingDay)
           
 EditContentBean setTargetId(java.lang.String targetId)
           
 EditContentBean setTitle(java.lang.String title)
           
 EditContentBean setViewPermissionsGroups(Group... groups)
           
 EditContentBean setViewPermissionsGroups(java.lang.String viewPermissionsGroups)
           
 EditContentBean setViewPermissionsUsers(java.lang.String viewPermissionsUsers)
           
 EditContentBean setViewPermissionsUsers(User... users)
           
 void setWatchPage(boolean watchPage)
          Set the watch page checkbox (currently on the comment form only).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CREATE_PAGE_LINK_TEXT

public static final java.lang.String CREATE_PAGE_LINK_TEXT
See Also:
Constant Field Values

CREATE_PAGE_TITLE_TEXT

public static final java.lang.String CREATE_PAGE_TITLE_TEXT
See Also:
Constant Field Values

CREATE_BLOGPOST_LINK_TEXT

public static final java.lang.String CREATE_BLOGPOST_LINK_TEXT
See Also:
Constant Field Values

CREATE_BLOGPOST_TITLE_TEXT

public static final java.lang.String CREATE_BLOGPOST_TITLE_TEXT
See Also:
Constant Field Values

CREATE_BUTTON_LINK_ID

public static final java.lang.String CREATE_BUTTON_LINK_ID
See Also:
Constant Field Values

CREATE_PAGE_LINK_ID

public static final java.lang.String CREATE_PAGE_LINK_ID
See Also:
Constant Field Values

CREATE_BLOGPOST_LINK_ID

public static final java.lang.String CREATE_BLOGPOST_LINK_ID
See Also:
Constant Field Values

CREATE_COMMENT_LINK_ID

public static final java.lang.String CREATE_COMMENT_LINK_ID
See Also:
Constant Field Values

EDIT_PAGE_LINK_ID

public static final java.lang.String EDIT_PAGE_LINK_ID
See Also:
Constant Field Values

CREATE_PAGE_FORM_ID

public static final java.lang.String CREATE_PAGE_FORM_ID
See Also:
Constant Field Values

EDIT_PAGE_FORM_ID

public static final java.lang.String EDIT_PAGE_FORM_ID
See Also:
Constant Field Values
Constructor Detail

EditContentBean

protected EditContentBean(java.lang.String formId,
                          net.sourceforge.jwebunit.junit.WebTester webTester)
Method Detail

createPage

public static EditContentBean createPage()
Returns a page creation bean from the current location of the web tester, by clicking on the 'Add Page' link on the page. Usually, you'll invoke this via ViewContentBean.createPage().


createPage

public static EditContentBean createPage(net.sourceforge.jwebunit.junit.WebTester webTester)

createPage

public static EditContentBean createPage(java.lang.String spaceKey)
Returns a page creation bean by going to view the space and clicking on the 'Add Page' link on the page.


createPage

public static EditContentBean createPage(java.lang.String spaceKey,
                                         net.sourceforge.jwebunit.junit.WebTester webTester)

createPage

public static EditContentBean createPage(Space space)
Returns a page creation bean by going to view the space and clicking on the 'Add Page' link on the page.


createPage

public static EditContentBean createPage(Space space,
                                         net.sourceforge.jwebunit.junit.WebTester webTester)

createPageViaUrl

public static EditContentBean createPageViaUrl(Space space)
Deprecated. since 5.4 use EditContentBean.CreateByUrlBuilder instead.

Returns a EditContentBean by going directly to the create page url and bypassing the UI.


createPageViaUrl

public static EditContentBean createPageViaUrl(Space space,
                                               net.sourceforge.jwebunit.junit.WebTester tester)
Deprecated. since 5.4 use EditContentBean.CreateByUrlBuilder instead.


createByUrlBuilder

public static EditContentBean.CreateByUrlBuilder createByUrlBuilder(Space space,
                                                                    net.sourceforge.jwebunit.junit.WebTester webTester)

createChildPage

public static EditContentBean createChildPage(java.lang.String spaceKey,
                                              java.lang.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(java.lang.String spaceKey,
                                              java.lang.String parentPageTitle,
                                              net.sourceforge.jwebunit.junit.WebTester webTester)

createBlogPost

public static EditContentBean createBlogPost()
Returns a blog post creation bean from the current location of the web tester, by clicking on the 'Add News' link on the page.


createBlogPost

public static EditContentBean createBlogPost(net.sourceforge.jwebunit.junit.WebTester webTester)

createBlogPost

public static EditContentBean createBlogPost(java.lang.String spaceKey)
Returns a blog post creation bean by going to the dashboard, clicking on the space name, then on the space home page, clicking on the 'Add News' link on the page.


createBlogPost

public static EditContentBean createBlogPost(java.lang.String spaceKey,
                                             net.sourceforge.jwebunit.junit.WebTester webTester)

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,
                                                           java.lang.String spaceKey,
                                                           java.lang.String extraParams)

getEditPageUrl

public static java.lang.String getEditPageUrl(java.lang.String spaceKey,
                                              java.lang.String pageTitle)

getEditBlogPostUrl

public static java.lang.String getEditBlogPostUrl(java.lang.String id)

getEditPageTitle

public static java.lang.String getEditPageTitle(java.lang.String pageTitle)

editPage

public static EditContentBean editPage(java.lang.String spaceKey,
                                       java.lang.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(java.lang.String spaceKey,
                                       java.lang.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(java.lang.String commentId)

replyToComment

public static EditContentBean replyToComment(java.lang.String commentId,
                                             net.sourceforge.jwebunit.junit.WebTester webTester)

editComment

public static EditContentBean editComment(java.lang.String commentId)

editComment

public static EditContentBean editComment(java.lang.String commentId,
                                          net.sourceforge.jwebunit.junit.WebTester webTester)

getDraftId

public long getDraftId()

getFirstActionError

public java.lang.String getFirstActionError()
Retrieve the first action error if it exists or else fail.

Throws:
java.lang.AssertionError - if there is no action errors exist

setTitle

public EditContentBean setTitle(java.lang.String title)

setContent

public EditContentBean setContent(java.lang.String content)

getContent

public java.lang.String getContent()

getParentPageTitle

public java.lang.String getParentPageTitle()

getOriginalQueryString

public java.lang.String getOriginalQueryString()

setComment

public EditContentBean setComment(java.lang.String comment)
Set the version comment for this change. Only applies to pages.


setViewPermissionsUsers

public EditContentBean setViewPermissionsUsers(User... users)

setViewPermissionsUsers

public EditContentBean setViewPermissionsUsers(java.lang.String viewPermissionsUsers)

setViewPermissionsGroups

public EditContentBean setViewPermissionsGroups(Group... groups)

setViewPermissionsGroups

public EditContentBean setViewPermissionsGroups(java.lang.String viewPermissionsGroups)

setEditPermissionsUsers

public EditContentBean setEditPermissionsUsers(User... users)

setEditPermissionsUsers

public EditContentBean setEditPermissionsUsers(java.lang.String users)

setEditPermissionsGroups

public EditContentBean setEditPermissionsGroups(Group... groups)

setEditPermissionsGroups

public EditContentBean setEditPermissionsGroups(java.lang.String group)

setLocation

public EditContentBean setLocation(Space space)
Sets the location to a new space, in the top root level.


setNewSpaceKey

public EditContentBean setNewSpaceKey(java.lang.String spaceKey)

setPosition

public EditContentBean setPosition(java.lang.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(java.lang.String targetId)

setParentPageString

public EditContentBean setParentPageString(java.lang.String parentPageString)

setPostingDay

public EditContentBean setPostingDay(java.lang.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(java.lang.String captchaResponse)


Copyright © 2003-2013 Atlassian. All Rights Reserved.