Class AbstractCmsEditor<T>

java.lang.Object
org.hippoecm.frontend.editor.AbstractCmsEditor<T>
All Implemented Interfaces:
Serializable, org.apache.wicket.model.IDetachable, org.apache.wicket.util.io.IClusterable, IRefreshable, IEditor<T>

public abstract class AbstractCmsEditor<T> extends Object implements IEditor<T>, org.apache.wicket.model.IDetachable, IRefreshable
See Also:
  • Constructor Details

  • Method Details

    • getMode

      public IEditor.Mode getMode()
      Specified by:
      getMode in interface IEditor<T>
    • setMode

      public void setMode(IEditor.Mode mode) throws EditorException
      Specified by:
      setMode in interface IEditor<T>
      Throws:
      EditorException
    • getModel

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

      public boolean isModified() throws EditorException
      Specified by:
      isModified in interface IEditor<T>
      Throws:
      EditorException
    • isValid

      public boolean isValid() throws EditorException
      Specified by:
      isValid in interface IEditor<T>
      Throws:
      EditorException
    • save

      public void save() throws EditorException
      Default implementation that does nothing. Subclasses are expected to override this behaviour.
      Specified by:
      save in interface IEditor<T>
      Throws:
      EditorException
    • saveDraft

      public void saveDraft() throws EditorException
      Specified by:
      saveDraft in interface IEditor<T>
      Throws:
      EditorException
    • done

      public void done() throws EditorException
      Default implementation that does nothing. Subclasses are expected to override this behaviour.
      Specified by:
      done in interface IEditor<T>
      Throws:
      EditorException
    • revert

      public void revert() throws EditorException
      Default implementation that does nothing. Subclasses are expected to override this behaviour.
      Specified by:
      revert in interface IEditor<T>
      Throws:
      EditorException
    • discard

      public void discard() throws EditorException
      Default implementation that does nothing. Subclasses are expected to override this behaviour.
      Specified by:
      discard in interface IEditor<T>
      Throws:
      EditorException
    • close

      public void close() throws EditorException
      Description copied from interface: IEditor
      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.
      Specified by:
      close in interface IEditor<T>
      Throws:
      EditorException - when the editor is in a state where it cannot be closed.
    • onActivated

      protected void onActivated()
      Hook called when an editor is activated, i.e. transitions from inactive to active state. When overiding, make sure to call super.onActivated() in order to keep the usage statistics working.
    • onDeactivated

      protected void onDeactivated()
      Hook called when an editor is deactivate, i.e. transitions from active to inactive state. When overriding, make sure to call super.onDeactivated().
    • publishEvent

      protected void publishEvent(String name)
    • createUsageEvent

      protected UsageEvent createUsageEvent(String name)
    • createUsageEvent

      protected UsageEvent createUsageEvent(String name, org.apache.wicket.model.IModel<T> model)
    • preClose

      protected Map<IEditorFilter,Object> preClose() throws EditorException
      Throws:
      EditorException
    • postClose

      protected void postClose(Map<IEditorFilter,Object> contexts)
    • getPluginContext

      protected IPluginContext getPluginContext()
    • getEditorModel

      protected org.apache.wicket.model.IModel<T> getEditorModel() throws EditorException
      Throws:
      EditorException
    • getBaseModel

      protected org.apache.wicket.model.IModel<T> getBaseModel() throws EditorException
      Throws:
      EditorException
    • getClusterConfig

      protected IClusterConfig getClusterConfig()
    • start

      public void start() throws EditorException
      Throws:
      EditorException
    • stop

      public void stop()
    • getRendererServiceId

      protected String getRendererServiceId()
    • getForm

      public org.apache.wicket.markup.html.form.Form getForm()
      Description copied from interface: IEditor
      The Form that wraps the editor.
      Specified by:
      getForm in interface IEditor<T>
    • onClose

      protected void onClose()
    • refresh

      public void refresh()
      Specified by:
      refresh in interface IRefreshable
    • focus

      public void focus()
      Description copied from interface: IEditor
      Requests focus on the editor.
      Specified by:
      focus in interface IEditor<T>
    • detach

      public void detach()
      Specified by:
      detach in interface org.apache.wicket.model.IDetachable
    • isTransferable

      public boolean isTransferable() throws EditorException
      Description copied from interface: IEditor
      If a document has been saved as draft the document is marked as "transferable".
      Specified by:
      isTransferable in interface IEditor<T>
      Returns:
      true if the document has been saved as draft, otherwise false
      Throws:
      EditorException
    • isParentOfFrozenNode

      protected boolean isParentOfFrozenNode(Node node) throws RepositoryException
      Throws:
      RepositoryException