Class AbstractOnSaveAction

java.lang.Object
net.sf.basedb.clients.web.extensions.edit.AbstractOnSaveAction
All Implemented Interfaces:
OnSaveAction, Action
Direct Known Subclasses:
DebugOnSaveActionFactory.DebugOnSaveAction

public abstract class AbstractOnSaveAction extends Object implements OnSaveAction
Abstract base implementation of the OnSaveAction interface. This contains empty method stubs for all interface methods. It is recommended for subclasses to extend this class to avoid problems in the future if new methods are added to the interface.
Since:
2.17
Author:
Nicklas
Last modified
$Date: 2010-11-15 13:53:05 +0100 (må, 15 nov 2010) $
  • Field Details

  • Constructor Details

    • AbstractOnSaveAction

      protected AbstractOnSaveAction()
      Create a on-save action without a context
    • AbstractOnSaveAction

      protected AbstractOnSaveAction(JspContext jspContext)
      Create a on-save action with a jsp context.
  • Method Details

    • onSave

      public void onSave()
      Description copied from interface: OnSaveAction
      This event is fired first to let the action do something with the current item. Implementors may throw an exception from this method to indicate that something went wrong. If so, any remaining extensions will be unprocessed and the OnSaveAction.onRollback(Exception) is called.
      Specified by:
      onSave in interface OnSaveAction
    • onCommit

      public void onCommit()
      Description copied from interface: OnSaveAction
      This event is fired after a successful commit. Implementors should not throw any exceptions from this method since it may confuse users to see error messages and may cause other extensions to not be called.
      Specified by:
      onCommit in interface OnSaveAction
    • onRollback

      public void onRollback(Exception ex)
      Description copied from interface: OnSaveAction
      This event is fired after an error that caused the save action to rollback. Implementors should not throw any exceptions from this method since it may hide original exception and may cause other extensions to not be called.
      Specified by:
      onRollback in interface OnSaveAction
      Parameters:
      ex - The exception that caused the transaction to rollback
    • setJspContext

      protected void setJspContext(JspContext jspContext)
      Get the JSP context of the current invokation. Can be null if no context has been set in the constructor or the setter method.
    • getJspContext

      protected JspContext getJspContext()
      Set the JSP context of the current invokation.