Package org.hippoecm.frontend.service
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
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Requests that the editor be closed.void
discard()
Discards all changes to the document and switches the editor to VIEW mode.void
done()
Saves the document, and switches the editor to VIEW mode.void
focus()
Requests focus on the editor.org.apache.wicket.markup.html.form.Form
getForm()
TheForm
that wraps the editor.getMode()
org.apache.wicket.model.IModel<T>
getModel()
Model of the Editor.boolean
boolean
If a document has been saved as draft the document is marked as "transferable".boolean
isValid()
void
revert()
Reverts the current document to last saved state and should keep the editor in its current mode (EDIT).void
save()
Saves the document, and keeps the editor in its current mode (EDIT).void
void
setMode
(IEditor.Mode mode)
-
Field Details
-
MODE
- See Also:
-
-
Method Details
-
getMode
IEditor.Mode getMode() -
setMode
- 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
- Throws:
EditorException
-
isValid
- Throws:
EditorException
-
isTransferable
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()TheForm
that wraps the editor. -
save
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
- Throws:
EditorException
-
done
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
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
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
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.
-