org.opensubsystems.inventory.application
Class CategoryDialogPersistor

java.lang.Object
  extended by org.opensubsystems.inventory.application.CategoryDialogPersistor
All Implemented Interfaces:
CategoryDialogListener

public class CategoryDialogPersistor
extends java.lang.Object
implements CategoryDialogListener

Dialog listener implementation, which persists the data from the dialog.

Version:
$Id: CategoryDialogPersistor.java,v 1.5 2007/01/07 06:13:57 bastafidli Exp $
Author:
Miro Halas
Code reviewer:
Miro Halas
Code reviewed:
1.1 2006/04/05 05:07:24 bastafidli

Field Summary
protected  CategoryDialog m_dialog
          Dialog which is being persisted by this class.
protected  Category m_updatedCategory
          Category which was successfully updated by this persistor.
 
Constructor Summary
CategoryDialogPersistor(CategoryDialog dialog)
          Constructor
 
Method Summary
protected  CategoryController getCategoryController()
          Get controller to invoke business logic.
protected  Category getResults()
           
 boolean takeAction(boolean bModify, Category data)
          This method is called when action button of the dialog is clicked.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_dialog

protected CategoryDialog m_dialog
Dialog which is being persisted by this class.


m_updatedCategory

protected Category m_updatedCategory
Category which was successfully updated by this persistor.

Constructor Detail

CategoryDialogPersistor

public CategoryDialogPersistor(CategoryDialog dialog)
Constructor

Parameters:
dialog - - dialog being persisted
Method Detail

getResults

protected Category getResults()
Returns:
Category - category updated by this persistor or null if nothing was done or an error has occured.

takeAction

public boolean takeAction(boolean bModify,
                          Category data)
This method is called when action button of the dialog is clicked. This means that user is finished with the changes and want to take some action with those changes. This method is NOT called when user wants to cancel the changes which he has done.

Specified by:
takeAction in interface CategoryDialogListener
Parameters:
bModify - - if this flag is true, then the data should be modified otherwise they should be created
data - - data to be created or one which was modified
Returns:
boolean - if true is returned the dialog can be closed, otherwise the dialog remains on the screen

getCategoryController

protected CategoryController getCategoryController()
                                            throws org.opensubsystems.core.error.OSSException
Get controller to invoke business logic.

Returns:
CategoryController
Throws:
org.opensubsystems.core.error.OSSException - - an error has occured


Copyright © 2003 - 2006 OpenSubsystems s.r.o.