org.salespointframework.web.movestrategies
Class CSSStrategy

java.lang.Object
  extended by org.salespointframework.desktop.strategies.FormSheetStrategy
      extended by org.salespointframework.desktop.strategies.dataexchangeformsheet.MoveStrategy
          extended by org.salespointframework.desktop.strategies.dataexchangeformsheet.CSSStrategy
              extended by org.salespointframework.web.movestrategies.CSSStrategy
All Implemented Interfaces:
ProcessErrorCodes, MoveStrategy

public abstract class CSSStrategy
extends CSSStrategy
implements MoveStrategy

MoveStategy moving items from a Catalog to a StoringStock

Author:
Lars Kreisz, Uwe Schmidt

Nested Class Summary
 
Nested classes/interfaces inherited from class org.salespointframework.desktop.strategies.FormSheetStrategy
FormSheetStrategy.ErrorHandler
 
Field Summary
 
Fields inherited from class org.salespointframework.desktop.strategies.FormSheetStrategy
DEFAULT_ERROR_HANDLER, m_ehErrHandler, MSG_POPUP_ERROR_HANDLER
 
Fields inherited from interface org.salespointframework.core.exceptions.ProcessErrorCodes
DATABASKET_CONFLICT_ERROR, DUPLICATE_KEY_EXCEPTION, ERR_FORCED_SHUTDOWN, ERR_INTERNAL, ERR_LOWERBOUND, ERR_NOERROR, ERR_UPPERBOUND, NOT_ENOUGH_ELEMENTS_ERROR, REMOVE_VETO_EXCEPTION
 
Constructor Summary
CSSStrategy()
           
 
Method Summary
protected abstract  StockItem createStockItem(CatalogItem ci)
           
protected  StockItem createStockItem(SaleProcess p, SalesPoint sp, Catalog cSource, StoringStock ssDest, DataBasket db, CatalogItem ci)
          Create a fresh StockItem following the specifications given.
 boolean moveToDestination(java.lang.Object source, java.lang.Object destination, java.lang.String itemName, DataBasket db, int count)
          moves the item with the given name from source to destination
 boolean moveToSource(java.lang.Object source, java.lang.Object destination, java.lang.String itemName, DataBasket db, int count)
          moves the item with the given name from destination to source
 
Methods inherited from class org.salespointframework.desktop.strategies.dataexchangeformsheet.CSSStrategy
checkMoveToDest, checkMoveToSource, getCheckMoveToDestGate, getCheckMoveToSourceGate, getMoveToDestProcess, getMoveToSourceProcess, moveToDest, moveToSource
 
Methods inherited from class org.salespointframework.desktop.strategies.dataexchangeformsheet.MoveStrategy
canMoveToDest, canMoveToSource
 
Methods inherited from class org.salespointframework.desktop.strategies.FormSheetStrategy
error, setErrorHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CSSStrategy

public CSSStrategy()
Method Detail

moveToDestination

public boolean moveToDestination(java.lang.Object source,
                                 java.lang.Object destination,
                                 java.lang.String itemName,
                                 DataBasket db,
                                 int count)
Description copied from interface: MoveStrategy
moves the item with the given name from source to destination

Specified by:
moveToDestination in interface MoveStrategy
Parameters:
source - source aggregate
destination - destination aggregate
itemName - name of item that should be moved
db - databasket used for movement
count - number of items that should be moved
Returns:
false, if to many items should have been moved

moveToSource

public boolean moveToSource(java.lang.Object source,
                            java.lang.Object destination,
                            java.lang.String itemName,
                            DataBasket db,
                            int count)
Description copied from interface: MoveStrategy
moves the item with the given name from destination to source

Specified by:
moveToSource in interface MoveStrategy
Parameters:
source - source aggregate
destination - destination aggregate
itemName - name of item that should be moved
db - databasket used for movement
count - number of items that should be moved
Returns:
false, if to many items should have been moved

createStockItem

protected final StockItem createStockItem(SaleProcess p,
                                          SalesPoint sp,
                                          Catalog cSource,
                                          StoringStock ssDest,
                                          DataBasket db,
                                          CatalogItem ci)
                                   throws java.lang.InterruptedException
Description copied from class: CSSStrategy
Create a fresh StockItem following the specifications given. You can assume that you are at a Gate.

Specified by:
createStockItem in class CSSStrategy
Parameters:
p - the process into which the sub-process wil be embedded.
sp - the SalesPoint, if any, at which the FormSheet is being displayed.
cSource - the source Catalog.
ssDest - the destination StoringStock.
db - the DataBasket relative to which to perform the operation.
ci - the CatalogItem that is selected in the source.
Throws:
java.lang.InterruptedException

createStockItem

protected abstract StockItem createStockItem(CatalogItem ci)