org.opensubsystems.inventory.application
Class InventoryModule

java.lang.Object
  extended by org.opensubsystems.core.application.ThickClientModuleImpl
      extended by org.opensubsystems.inventory.application.InventoryModule
All Implemented Interfaces:
org.opensubsystems.core.application.ThickClientModule
Direct Known Subclasses:
SWTInventoryModule

public class InventoryModule
extends org.opensubsystems.core.application.ThickClientModuleImpl

The module responsible for presenting inventory related information.

Version:
$Id: InventoryModule.java,v 1.14 2007/01/07 06:13:57 bastafidli Exp $
Author:
Miro Halas
Code reviewer:
Miro Halas
Code reviewed:
1.11 2006/04/05 05:15:01 bastafidli

Field Summary
protected  Inventory m_inventory
          Inventory, which is currently used.
protected  java.util.Map m_selectedCategories
          What categories are selected in the list of items.
protected  java.util.Map m_selectedSubCategories
          What sub categories are selected in the list of items.
 
Fields inherited from class org.opensubsystems.core.application.ThickClientModuleImpl
m_bInitialized, m_client
 
Constructor Summary
InventoryModule()
           
 
Method Summary
 Item changeAvailableCount(int iId, java.lang.String strText)
          Change the available count for a specified item.
 void displayCreateCategoryDialog(int iParentId)
          Display dialog to create category or subcategory.
 void displayCreateItemDialog(int iCurrentCategoryId, int iCurrentSubcategoryId)
          Display dialog to create item.
 void displayModifyCategoryDialog(Category data)
          Display dialog to modify user.
 void displayModifyItemDialog(int iId)
          Display dialog to modify item.
protected  CategoryController getCategoryController()
          Get controller to invoke business logic.
protected  ItemController getItemController()
          Get controller to invoke business logic.
 java.lang.String getName()
          
 int getOutCount(int iId)
          For a specified item get number of items which are not in the inventory.
 void init(org.opensubsystems.core.application.ThickClient client)
          
 
Methods inherited from class org.opensubsystems.core.application.ThickClientModuleImpl
activate, destroy, displayMessage, getClient, pasivate, refresh
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_inventory

protected Inventory m_inventory
Inventory, which is currently used.


m_selectedCategories

protected java.util.Map m_selectedCategories
What categories are selected in the list of items. Key is the id, category is the value.


m_selectedSubCategories

protected java.util.Map m_selectedSubCategories
What sub categories are selected in the list of items. Key is the id, category is the value.

Constructor Detail

InventoryModule

public InventoryModule()
Method Detail

init

public void init(org.opensubsystems.core.application.ThickClient client)
          throws org.opensubsystems.core.error.OSSException

Specified by:
init in interface org.opensubsystems.core.application.ThickClientModule
Overrides:
init in class org.opensubsystems.core.application.ThickClientModuleImpl
Throws:
org.opensubsystems.core.error.OSSException

getName

public java.lang.String getName()


displayCreateCategoryDialog

public void displayCreateCategoryDialog(int iParentId)
Display dialog to create category or subcategory.

Parameters:
iParentId - - Id of the parent category. If this is DataObject.NEW_ID then this is a top level category otherwise it is a subcategory of the specified parent.

displayModifyCategoryDialog

public void displayModifyCategoryDialog(Category data)
Display dialog to modify user.

Parameters:
data - - data for the category which should be modified.

changeAvailableCount

public Item changeAvailableCount(int iId,
                                 java.lang.String strText)
Change the available count for a specified item.

Parameters:
iId - - id of the item to change the count for
strText - - text representing the available count
Returns:
Item - modified item if everything was ok or null if there was an error

getOutCount

public int getOutCount(int iId)
For a specified item get number of items which are not in the inventory.

Parameters:
iId - - id of the item to get the count for
Returns:
int - number of items not present in the inventory

displayCreateItemDialog

public void displayCreateItemDialog(int iCurrentCategoryId,
                                    int iCurrentSubcategoryId)
Display dialog to create item.

Parameters:
iCurrentCategoryId - - currently selected category in which the item can be created
iCurrentSubcategoryId - - currently selected subcategory in which the item can be created

displayModifyItemDialog

public void displayModifyItemDialog(int iId)
Display dialog to modify item.

Parameters:
iId - - id of the item to display the modify dialog for

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

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.