com.atlassian.confluence.it.content
Class EditContentBean

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

public class EditContentBean
extends Object


Field Summary
static String CREATE_BLOGPOST_LINK_ID
           
static String CREATE_BLOGPOST_LINK_TEXT
           
static String CREATE_BLOGPOST_TITLE_TEXT
           
static String CREATE_COMMENT_LINK_ID
           
static String CREATE_PAGE_FORM_ID
           
static String CREATE_PAGE_LINK_ID
           
static String CREATE_PAGE_LINK_TEXT
           
static String CREATE_PAGE_TITLE_TEXT
           
static String EDIT_PAGE_FORM_ID
           
static String EDIT_PAGE_LINK_ID
           
 
Constructor Summary
protected EditContentBean(net.sourceforge.jwebunit.junit.WebTester webTester, String formId)
           
protected EditContentBean(net.sourceforge.jwebunit.junit.WebTester webTester, String formId, boolean isCreate)
           
 
Method Summary
static EditContentBean addComment(net.sourceforge.jwebunit.junit.WebTester webTester)
           
 ViewContentBean cancel()
           
static EditContentBean createBlogPost(net.sourceforge.jwebunit.junit.WebTester webTester)
          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(net.sourceforge.jwebunit.junit.WebTester webTester, 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 createChildPage(net.sourceforge.jwebunit.junit.WebTester webTester, 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 createPage(net.sourceforge.jwebunit.junit.WebTester webTester)
          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(net.sourceforge.jwebunit.junit.WebTester webTester, Space space)
          Returns a page creation bean by going to the dashboard, clicking on the space name, then on the space home page, clicking on the 'Add Page' link on the page.
static EditContentBean createPage(net.sourceforge.jwebunit.junit.WebTester webTester, String spaceKey)
          Returns a page creation bean by going to the dashboard, clicking on the space name, then on the space home page, clicking on the 'Add Page' link on the page.
static EditContentBean editBlogPost(net.sourceforge.jwebunit.junit.WebTester webTester)
           
static EditContentBean editBlogPost(net.sourceforge.jwebunit.junit.WebTester webTester, BlogPost blogPost)
           
static EditContentBean editBlogPost(net.sourceforge.jwebunit.junit.WebTester webTester, long blogPostId)
           
static EditContentBean editComment(net.sourceforge.jwebunit.junit.WebTester webTester, String commentId)
           
static EditContentBean editPage(net.sourceforge.jwebunit.junit.WebTester webTester)
          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(net.sourceforge.jwebunit.junit.WebTester webTester, Page page)
           
static EditContentBean editPage(net.sourceforge.jwebunit.junit.WebTester webTester, String spaceKey, String pageTitle)
          Returns a page edit bean of the passed space and page title, by going direct to a consrtructed URL.
 String getContent()
           
 long getDraftId()
           
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.
 boolean isNotifyWatchersChecked()
           
 boolean isWatchPageCheckboxChecked()
           
 boolean isWatchPageCheckboxVisible()
           
static EditContentBean replyToComment(net.sourceforge.jwebunit.junit.WebTester webTester, String commentId)
           
static EditContentBean resumeDraft(net.sourceforge.jwebunit.junit.WebTester webTester, long draftId)
           
 ViewContentBean save()
           
 ViewContentBean saveMergeContent()
           
 void setCaptchaField(String captchaResponse)
           
 void setComment(String comment)
          Set the version comment for this change.
 EditContentBean setContent(String content)
           
 void setNewSpaceKey(String spaceKey)
           
 void setNotifyWatchers(boolean check)
           
 void setParentPageString(String parentPageString)
           
 void setPosition(String position)
           
 void setPostingDay(String postingDay)
           
 void setTargetId(String targetId)
           
 void setTitle(String title)
           
 void setViewPermissionsGroups(String viewPermissionsGroups)
           
 void setViewPermissionsUsers(String viewPermissionsUsers)
           
 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 String CREATE_PAGE_LINK_TEXT
See Also:
Constant Field Values

CREATE_PAGE_TITLE_TEXT

public static final String CREATE_PAGE_TITLE_TEXT
See Also:
Constant Field Values

CREATE_BLOGPOST_LINK_TEXT

public static final String CREATE_BLOGPOST_LINK_TEXT
See Also:
Constant Field Values

CREATE_BLOGPOST_TITLE_TEXT

public static final String CREATE_BLOGPOST_TITLE_TEXT
See Also:
Constant Field Values

CREATE_PAGE_LINK_ID

public static final String CREATE_PAGE_LINK_ID
See Also:
Constant Field Values

CREATE_BLOGPOST_LINK_ID

public static final String CREATE_BLOGPOST_LINK_ID
See Also:
Constant Field Values

CREATE_COMMENT_LINK_ID

public static final String CREATE_COMMENT_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(net.sourceforge.jwebunit.junit.WebTester webTester,
                          String formId)

EditContentBean

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

createPage

public static EditContentBean createPage(net.sourceforge.jwebunit.junit.WebTester webTester)
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,
                                         String spaceKey)
Returns a page creation bean by going to the dashboard, clicking on the space name, then on the space home page, clicking on the 'Add Page' link on the page.


createPage

public static EditContentBean createPage(net.sourceforge.jwebunit.junit.WebTester webTester,
                                         Space space)
Returns a page creation bean by going to the dashboard, clicking on the space name, then on the space home page, clicking on the 'Add Page' link on the page.


createChildPage

public static EditContentBean createChildPage(net.sourceforge.jwebunit.junit.WebTester webTester,
                                              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.


createBlogPost

public static EditContentBean createBlogPost(net.sourceforge.jwebunit.junit.WebTester webTester)
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,
                                             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.


editPage

public static EditContentBean editPage(net.sourceforge.jwebunit.junit.WebTester webTester)
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().


editBlogPost

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

editBlogPost

public static EditContentBean editBlogPost(net.sourceforge.jwebunit.junit.WebTester webTester,
                                           long blogPostId)

editBlogPost

public static EditContentBean editBlogPost(net.sourceforge.jwebunit.junit.WebTester webTester,
                                           BlogPost blogPost)

resumeDraft

public static EditContentBean resumeDraft(net.sourceforge.jwebunit.junit.WebTester webTester,
                                          long draftId)

getEditPageUrl

public static String getEditPageUrl(String spaceKey,
                                    String pageTitle)

getEditPageTitle

public static String getEditPageTitle(String pageTitle)

editPage

public static EditContentBean editPage(net.sourceforge.jwebunit.junit.WebTester webTester,
                                       String spaceKey,
                                       String pageTitle)
Returns a page edit bean of the passed space and page title, by going direct to a consrtructed URL. Assumes that the page already exists.


editPage

public static EditContentBean editPage(net.sourceforge.jwebunit.junit.WebTester webTester,
                                       Page page)

addComment

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

replyToComment

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

editComment

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

getDraftId

public long getDraftId()

getFirstActionError

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

Throws:
junit.framework.AssertionFailedError - if there is no action errors exist

setTitle

public void setTitle(String title)

setContent

public EditContentBean setContent(String content)

getContent

public String getContent()

setComment

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


setViewPermissionsUsers

public void setViewPermissionsUsers(String viewPermissionsUsers)

setViewPermissionsGroups

public void setViewPermissionsGroups(String viewPermissionsGroups)

setNewSpaceKey

public void setNewSpaceKey(String spaceKey)

setPosition

public void setPosition(String position)

setTargetId

public void setTargetId(String targetId)

setParentPageString

public void setParentPageString(String parentPageString)

setPostingDay

public void setPostingDay(String postingDay)

setNotifyWatchers

public void 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()

isWatchPageCheckboxChecked

public boolean isWatchPageCheckboxChecked()

saveMergeContent

public ViewContentBean saveMergeContent()

setCaptchaField

public void setCaptchaField(String captchaResponse)


Copyright © 2003-2012 Atlassian. All Rights Reserved.