Interface IEditor<T>

All Superinterfaces:
org.apache.wicket.util.io.IClusterable, Serializable
All Known Implementing Classes:
AbstractCmsEditor

public interface IEditor<T> extends org.apache.wicket.util.io.IClusterable
Interface that represents an editor for a particular document. Can be used by e.g. workflow plugins to change the visual representation of a "document". This can be achieved by using the edit mode or setting a different (node) model.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Requests that the editor be closed.
    void
    Discards all changes to the document and switches the editor to VIEW mode.
    void
    Saves the document, and switches the editor to VIEW mode.
    void
    Requests focus on the editor.
    org.apache.wicket.markup.html.form.Form
    The Form that wraps the editor.
     
    org.apache.wicket.model.IModel<T>
    Model of the Editor.
    boolean
     
    boolean
    If a document has been saved as draft the document is marked as "transferable".
    boolean
     
    void
    Reverts the current document to last saved state and should keep the editor in its current mode (EDIT).
    void
    Saves the document, and keeps the editor in its current mode (EDIT).
    void
     
    void
     
  • Field Details

  • Method Details

    • getMode

      IEditor.Mode getMode()
    • setMode

      void setMode(IEditor.Mode mode) throws EditorException
      Throws:
      EditorException
    • focus

      void focus()
      Requests focus on the editor.
    • getModel

      org.apache.wicket.model.IModel<T> getModel()
      Model of the Editor.
      Returns:
      The model that can be used to identify the editor. For publishable documents, this is the parent handle.
    • isModified

      boolean isModified() throws EditorException
      Throws:
      EditorException
    • isValid

      boolean isValid() throws EditorException
      Throws:
      EditorException
    • isTransferable

      boolean isTransferable() throws EditorException
      If a document has been saved as draft the document is marked as "transferable".
      Returns:
      true if the document has been saved as draft, otherwise false
      Throws:
      EditorException
    • getForm

      org.apache.wicket.markup.html.form.Form getForm()
      The Form that wraps the editor.
    • save

      void save() throws EditorException
      Saves the document, and keeps the editor in its current mode (EDIT).
      Throws:
      EditorException - should be thrown in case of the editor is unable to save the document or the document is not in Edit mode.
    • saveDraft

      void saveDraft() throws EditorException
      Throws:
      EditorException
    • done

      void done() throws EditorException
      Saves the document, and switches the editor to VIEW mode.
      Throws:
      EditorException - should be thrown in case of the editor is unable to save the document or the document is not in Edit mode.
    • revert

      void revert() throws EditorException
      Reverts the current document to last saved state and should keep the editor in its current mode (EDIT).
      Throws:
      EditorException - should be thrown in case of the editor is unable to revert the document or the document is not in Edit mode.
    • discard

      void discard() throws EditorException
      Discards all changes to the document and switches the editor to VIEW mode.
      Throws:
      EditorException - should be thrown in case of the editor is unable to revert the document or the document is not in Edit mode.
    • close

      void close() throws EditorException
      Requests that the editor be closed. In case the editor contains modified document, the implementation should ask the user what to be done with the changes to the document.
      Throws:
      EditorException - when the editor is in a state where it cannot be closed.