2.17.2: 2011-06-17

net.sf.basedb.clients.web.extensions.edit
Class AbstractOnSaveAction

java.lang.Object
  extended by 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 (Mon, 15 Nov 2010) $

Field Summary
private  JspContext jspContext
           
 
Constructor Summary
protected AbstractOnSaveAction()
          Create a on-save action without a context
protected AbstractOnSaveAction(JspContext jspContext)
          Create a on-save action with a jsp context.
 
Method Summary
protected  JspContext getJspContext()
          Set the JSP context of the current invokation.
 void onCommit()
          This event is fired after a successful commit.
 void onRollback(Exception ex)
          This event is fired after an error that caused the save action to rollback.
 void onSave()
          This event is fired first to let the action do something with the current item.
protected  void setJspContext(JspContext jspContext)
          Get the JSP context of the current invokation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jspContext

private JspContext jspContext
Constructor Detail

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 Detail

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.


2.17.2: 2011-06-17