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.Mode
           
 
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_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
           
 
Constructor Summary
protected EditContentBean(net.sourceforge.jwebunit.junit.WebTester webTester, java.lang.String formId)
           
protected EditContentBean(net.sourceforge.jwebunit.junit.WebTester webTester, java.lang.String formId, boolean isCreate)
           
 
Method Summary
static EditContentBean addComment(net.sourceforge.jwebunit.junit.WebTester webTester)
           
 ViewContentBean cancel()
           
 void checkMinorEdit()
           
 void checkParentPageId(java.lang.String parentPageId)
          Check that the parentPageId in the edit form is set to a particular value.
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, 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 createChildPage(net.sourceforge.jwebunit.junit.WebTester webTester, 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 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, java.lang.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, java.lang.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, 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 consrtructed URL.
 java.lang.String getContent()
           
 long getContentId()
           
 long getDraftId()
           
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.
 boolean isWatchPageCheckboxVisible()
           
static EditContentBean replyToComment(net.sourceforge.jwebunit.junit.WebTester webTester, java.lang.String commentId)
           
static EditContentBean resumeDraft(net.sourceforge.jwebunit.junit.WebTester webTester, long draftId)
           
 ViewContentBean save()
           
 ViewContentBean saveMergeContent()
           
 void setComment(java.lang.String comment)
          Set the version comment for this change.
 EditContentBean setContent(java.lang.String content)
           
 void setMode(EditContentBean.Mode mode)
           
 void setNewSpaceKey(java.lang.String spaceKey)
           
 void setParentPageString(java.lang.String parentPageString)
           
 void setPosition(java.lang.String position)
           
 void setPostingDay(java.lang.String postingDay)
           
 void setTargetId(java.lang.String targetId)
           
 void setTitle(java.lang.String title)
           
 void setViewPermissionsGroups(java.lang.String viewPermissionsGroups)
           
 void setViewPermissionsUsers(java.lang.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 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_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

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(net.sourceforge.jwebunit.junit.WebTester webTester,
                          java.lang.String formId)

EditContentBean

protected EditContentBean(net.sourceforge.jwebunit.junit.WebTester webTester,
                          java.lang.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,
                                         java.lang.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,
                                              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.


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,
                                             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.


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 java.lang.String getEditPageUrl(java.lang.String spaceKey,
                                              java.lang.String pageTitle)

editPage

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

editComment

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

getContentId

public long getContentId()

getDraftId

public long getDraftId()

getFirstActionError

public java.lang.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(java.lang.String title)

setContent

public EditContentBean setContent(java.lang.String content)

getContent

public java.lang.String getContent()

setComment

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


setViewPermissionsUsers

public void setViewPermissionsUsers(java.lang.String viewPermissionsUsers)

setViewPermissionsGroups

public void setViewPermissionsGroups(java.lang.String viewPermissionsGroups)

setNewSpaceKey

public void setNewSpaceKey(java.lang.String spaceKey)

setPosition

public void setPosition(java.lang.String position)

setTargetId

public void setTargetId(java.lang.String targetId)

setParentPageString

public void setParentPageString(java.lang.String parentPageString)

setPostingDay

public void setPostingDay(java.lang.String postingDay)

setMode

public void setMode(EditContentBean.Mode mode)

checkMinorEdit

public void checkMinorEdit()

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

saveMergeContent

public ViewContentBean saveMergeContent()

checkParentPageId

public void checkParentPageId(java.lang.String parentPageId)
Check that the parentPageId in the edit form is set to a particular value.

Parameters:
parentPageId - the value of the parent page ID (use "" for no value)


Copyright © 2003-2011 Atlassian. All Rights Reserved.