org.opensubsystems.inventory.application
Class ItemDialogPersistor

java.lang.Object
  extended by org.opensubsystems.inventory.application.ItemDialogPersistor
All Implemented Interfaces:
ItemDialogListener

public class ItemDialogPersistor
extends java.lang.Object
implements ItemDialogListener

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

Version:
$Id: ItemDialogPersistor.java,v 1.4 2007/01/07 06:13:57 bastafidli Exp $
Author:
Miro Halas
Code reviewer:
Miro Halas
Code reviewed:
1.1 2006/04/05 05:12:00 bastafidli

Field Summary
protected  ItemDialog m_dialog
          Dialog which is being persisted by this class.
 
Constructor Summary
ItemDialogPersistor(ItemDialog dialog)
          Constructor
 
Method Summary
protected  ItemController getItemController()
          Get controller to invoke business logic.
 boolean takeAction(Item itemData, int iRootCategoryId, int[] subcategoryIds, java.lang.String strInternalNumber, java.util.List lstIdentifications, java.util.List lstUnits)
          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 ItemDialog m_dialog
Dialog which is being persisted by this class.

Constructor Detail

ItemDialogPersistor

public ItemDialogPersistor(ItemDialog dialog)
Constructor

Parameters:
dialog - - dialog being persisted
Method Detail

takeAction

public boolean takeAction(Item itemData,
                          int iRootCategoryId,
                          int[] subcategoryIds,
                          java.lang.String strInternalNumber,
                          java.util.List lstIdentifications,
                          java.util.List lstUnits)
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 ItemDialogListener
Parameters:
itemData - - item to be created or edited, but never null
iRootCategoryId - - root category this item should exist in
subcategoryIds - - subcategories this item should exist in
strInternalNumber - - internal identification number it this is a non uniquely tracked item or if the item is not uniquely tracked, can be null
lstIdentifications - - identifications for unique items if this item can be uniquely identified
lstUnits - - units for this item if this item cannot be uniquely identified
Returns:
boolean - if true is returned the dialog can be closed, otherwise the dialog remains on the screen

getItemController

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

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


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