Package org.apache.wiki.pages.haddock

# Class EditWikiPage

java.lang.Object
org.apache.wiki.pages.haddock.EditWikiPage

All Implemented Interfaces:
  `HaddockPage`, `Page`

public class EditWikiPage extends Object implements HaddockPage
Actions available on the Edit page.

## Constructor Summary

Constructors
Constructor
Description
`EditWikiPage()`

## Method Summary

Modifier and Type
Method
Description
`ViewWikiPage`
`cancel()`
Press the cancel button and disacrd page Edit.
`static EditWikiPage`
`open(String pageName)`
Open a given page for edition.
`ViewWikiPage`
`saveText(String text)`
Edits the page with the given text.
`ViewWikiPage`
`saveText(String text, String preview)`
Edits the page with the given text.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.apache.wiki.pages.haddock.HaddockPage

`wikiPageContent, wikiTitle`

### Methods inherited from interface org.apache.wiki.pages.Page

`title, url`

## Constructor Details

### EditWikiPage

public EditWikiPage()

## Method Details

### open

public static EditWikiPage open(String pageName)
Open a given page for edition.

Parameters:
  `pageName` - Wiki page name to Edit.
Returns:
  `EditWikiPage` instance, to allow chaining of actions.

### cancel

public ViewWikiPage cancel()
Press the cancel button and disacrd page Edit.

Returns:
  `ViewWikiPage` instance, to allow chaining of actions.

### saveText

public ViewWikiPage saveText(String text)
Edits the page with the given text. Ensures edition is complete by ensuring the preview pane shows the edited text.

Parameters:
  `text` - text to edit.
Returns:
  `ViewWikiPage` instance, to allow chaining of actions.

### saveText

public ViewWikiPage saveText(String text, String preview)
Edits the page with the given text. Ensures edition is complete by ensuring the preview pane shows the preview text.

Parameters:
  `text` - text text to edit.
  `preview` - expected text to hsow up on the preview pane (i.e., page directives on edit pane shouldn't show up here).
Returns:
  `ViewWikiPage` instance, to allow chaining of actions.