org.opensubsystems.inventory.logic
Interface UnitController

All Superinterfaces:
org.opensubsystems.core.logic.BasicDataController, org.opensubsystems.core.logic.DataController, org.opensubsystems.core.logic.ModifiableDataController, org.opensubsystems.security.logic.SecureController, org.opensubsystems.core.logic.StatelessController
All Known Implementing Classes:
UnitControllerImpl

public interface UnitController
extends org.opensubsystems.core.logic.ModifiableDataController, org.opensubsystems.security.logic.SecureController

Business logic related to managing units.

Version:
$Id: UnitController.java,v 1.3 2007/01/07 06:15:08 bastafidli Exp $
Author:
Peter Satury
Code reviewer:
TODO: Review this code
Code reviewed:

Method Summary
 Unit adjustUnit(int iUnitId, java.sql.Timestamp modificationDate, int iNewAvailableItemCount)
          Change the available count for given unit to a given value.
 
Methods inherited from interface org.opensubsystems.core.logic.ModifiableDataController
save
 
Methods inherited from interface org.opensubsystems.core.logic.BasicDataController
create, delete
 
Methods inherited from interface org.opensubsystems.core.logic.DataController
get
 
Methods inherited from interface org.opensubsystems.core.logic.StatelessController
constructor
 
Methods inherited from interface org.opensubsystems.security.logic.SecureController
getSecurityDefinitions
 

Method Detail

adjustUnit

Unit adjustUnit(int iUnitId,
                java.sql.Timestamp modificationDate,
                int iNewAvailableItemCount)
                throws org.opensubsystems.core.error.OSSException,
                       java.rmi.RemoteException
Change the available count for given unit to a given value. Note that this is not changing the available count BY a value, but TO a value. TODO: Improve: This method assumes that when the available count in inventory is adjusted items were either found or lost. In future extend this with flag representing action since items could have been transfered from or to inventory or rented andreturned. TODO: For Miro: Review this method, it may not be correct, since the counts are cached in the item by having method which suggest that the amounts are changed in unit it may not change them in item.

Parameters:
iUnitId - - unit id to change the available count
modificationDate - - modification date of the unit
iNewAvailableItemCount - - new available count, the available count
Returns:
InventoryItem - modified unit or null if there was a problem
Throws:
org.opensubsystems.core.error.OSSException - - an error has occured
java.rmi.RemoteException - - required since this method can be called remotely


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