data.stdforms.twotableformsheet
Class SSSSStrategy
java.lang.Object
|
+--sale.stdforms.FormSheetStrategy
|
+--data.stdforms.twotableformsheet.MoveStrategy
|
+--data.stdforms.twotableformsheet.SSSSStrategy
- public class SSSSStrategy
- extends MoveStrategy
MoveStrategy for a StoringStock source and destination.
- Since:
- v2.0
- Version:
- 2.0 20/08/1999
- Author:
- Steffen Zschaler
- See Also:
- Serialized Form
Method Summary |
protected int |
checkMove(SaleProcess p,
SalesPoint sp,
StoringStock ssSource,
StoringStock ssDest,
DataBasket db,
StockItem si)
Check whether the indicated move is allowable. |
protected Gate |
getCheckMoveGate(SaleProcess p,
SalesPoint sp,
StoringStock ssSource,
StoringStock ssDest,
DataBasket db,
StockItem si,
TwoTableFormSheet ttfs)
Get the first gate of a sub-process that will move items from one Stock into another. |
protected Gate |
getCheckMoveToDestGate(SaleProcess p,
SalesPoint sp,
StoringStock ssSource,
StoringStock ssDest,
DataBasket db,
StockItem si,
TwoTableFormSheet ttfs)
Get the first gate of the sub-process that will move items from the source to the destination. |
protected Gate |
getCheckMoveToSourceGate(SaleProcess p,
SalesPoint sp,
StoringStock ssSource,
StoringStock ssDest,
DataBasket db,
StockItem si,
TwoTableFormSheet ttfs)
Get the first gate of the sub-process that will move items from the destination to the source. |
Transition |
getMoveToDestProcess(SaleProcess p,
SalesPoint sp,
StoringStock ssSource,
StoringStock ssDest,
DataBasket db,
StockItem si,
TwoTableFormSheet ttfs)
Get the sub-process that will move items from the source to the destination. |
Transition |
getMoveToSourceProcess(SaleProcess p,
SalesPoint sp,
StoringStock ssSource,
StoringStock ssDest,
DataBasket db,
StockItem si,
TwoTableFormSheet ttfs)
Get the sub-process that will move items from the destination to the source. |
protected void |
moveImpl(SaleProcess p,
SalesPoint sp,
StoringStock ssSource,
StoringStock ssDest,
DataBasket db,
StockItem si)
Move the indicated item from the source StoringStock into the destination StoringStock. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
SSSSStrategy
public SSSSStrategy()
getMoveToDestProcess
public Transition getMoveToDestProcess(SaleProcess p,
SalesPoint sp,
StoringStock ssSource,
StoringStock ssDest,
DataBasket db,
StockItem si,
TwoTableFormSheet ttfs)
- Get the sub-process that will move items from the source to the destination.
- Override:
- Never.
- Parameters:
p
- the process into which the sub-process wil be embedded.sp
- the SalesPoint, if any, at which the FormSheet is being displayed.ssSource
- the source StoringStock.ssDest
- the destination StoringStock.db
- the DataBasket relative to which to perform the operation.si
- the StockItem that is selected in the source.ttfs
- the FormSheet that triggers the process.
getCheckMoveToDestGate
protected Gate getCheckMoveToDestGate(SaleProcess p,
SalesPoint sp,
StoringStock ssSource,
StoringStock ssDest,
DataBasket db,
StockItem si,
TwoTableFormSheet ttfs)
- Get the first gate of the sub-process that will move items from the source to the destination.
This Gate will check whether the move is allowable, and if so, will trigger a Transition that
performs it.
- Override:
- Never.
- Instead, override
checkMove(sale.SaleProcess, sale.SalesPoint, data.StoringStock, data.StoringStock, data.DataBasket, data.StockItem)
and/or moveImpl(sale.SaleProcess, sale.SalesPoint, data.StoringStock, data.StoringStock, data.DataBasket, data.StockItem)
. - Parameters:
p
- the process into which the sub-process wil be embedded.sp
- the SalesPoint, if any, at which the FormSheet is being displayed.ssSource
- the source StoringStock.ssDest
- the destination StoringStock.db
- the DataBasket relative to which to perform the operation.si
- the StockItem that is selected in the source.ttfs
- the FormSheet that triggers the process.- Returns:
getCheckMoveGate(sale.SaleProcess, sale.SalesPoint, data.StoringStock, data.StoringStock, data.DataBasket, data.StockItem, data.stdforms.TwoTableFormSheet)
.
getMoveToSourceProcess
public Transition getMoveToSourceProcess(SaleProcess p,
SalesPoint sp,
StoringStock ssSource,
StoringStock ssDest,
DataBasket db,
StockItem si,
TwoTableFormSheet ttfs)
- Get the sub-process that will move items from the destination to the source.
- Override:
- Never.
- Parameters:
p
- the process into which the sub-process wil be embedded.sp
- the SalesPoint, if any, at which the FormSheet is being displayed.ssSource
- the source StoringStock.ssDest
- the destination StoringStock.db
- the DataBasket relative to which to perform the operation.si
- the StockItem that is selected in the destination.ttfs
- the FormSheet that triggers the process.
getCheckMoveToSourceGate
protected Gate getCheckMoveToSourceGate(SaleProcess p,
SalesPoint sp,
StoringStock ssSource,
StoringStock ssDest,
DataBasket db,
StockItem si,
TwoTableFormSheet ttfs)
- Get the first gate of the sub-process that will move items from the destination to the source.
This Gate will check whether the move is allowable, and if so, will trigger a Transition that
performs it.
- Override:
- Never.
- Instead, override
checkMove(sale.SaleProcess, sale.SalesPoint, data.StoringStock, data.StoringStock, data.DataBasket, data.StockItem)
and/or moveImpl(sale.SaleProcess, sale.SalesPoint, data.StoringStock, data.StoringStock, data.DataBasket, data.StockItem)
. - Parameters:
p
- the process into which the sub-process wil be embedded.sp
- the SalesPoint, if any, at which the FormSheet is being displayed.ssSource
- the source StoringStock.ssDest
- the destination StoringStock.db
- the DataBasket relative to which to perform the operation.si
- the StockItem that is selected in the destination.ttfs
- the FormSheet that triggers the process.- Returns:
getCheckMoveGate(sale.SaleProcess, sale.SalesPoint, data.StoringStock, data.StoringStock, data.DataBasket, data.StockItem, data.stdforms.TwoTableFormSheet)
.
getCheckMoveGate
protected Gate getCheckMoveGate(SaleProcess p,
SalesPoint sp,
StoringStock ssSource,
StoringStock ssDest,
DataBasket db,
StockItem si,
TwoTableFormSheet ttfs)
- Get the first gate of a sub-process that will move items from one Stock into another.
This Gate will check whether the move is allowable, and if so, will trigger a Transition that
performs it.
- Override:
- Never.
- Instead, override
checkMove(sale.SaleProcess, sale.SalesPoint, data.StoringStock, data.StoringStock, data.DataBasket, data.StockItem)
and/or moveImpl(sale.SaleProcess, sale.SalesPoint, data.StoringStock, data.StoringStock, data.DataBasket, data.StockItem)
. - Parameters:
p
- the process into which the sub-process wil be embedded.sp
- the SalesPoint, if any, at which the FormSheet is being displayed.ssSource
- the source StoringStock.ssDest
- the destination StoringStock.db
- the DataBasket relative to which to perform the operation.si
- the StockItem which is to be moved from the source into the destination Stock.ttfs
- the FormSheet that triggers the process.
checkMove
protected int checkMove(SaleProcess p,
SalesPoint sp,
StoringStock ssSource,
StoringStock ssDest,
DataBasket db,
StockItem si)
throws InterruptedException
- Check whether the indicated move is allowable. If so, return 0, otherwise return a non-zero error value
that can be passed on to
FormSheetStrategy.error(sale.SaleProcess, int)
. You can assume that you are at a Gate
.
- Override:
- Sometimes.
- The default implementation returns 0.
- Parameters:
p
- the process into which the sub-process wil be embedded.sp
- the SalesPoint, if any, at which the FormSheet is being displayed.ssSource
- the source StoringStock.ssDest
- the destination StoringStock.db
- the DataBasket relative to which to perform the operation.si
- the StockItem which is to be moved.
moveImpl
protected void moveImpl(SaleProcess p,
SalesPoint sp,
StoringStock ssSource,
StoringStock ssDest,
DataBasket db,
StockItem si)
- Move the indicated item from the source StoringStock into the destination StoringStock. You
can assume that you are in a
Transition
.
- Override:
- Sometimes.
- Parameters:
p
- the process into which the sub-process wil be embedded.sp
- the SalesPoint, if any, at which the FormSheet is being displayed.ssSource
- the source StoringStock.ssDest
- the destination StoringStock.db
- the DataBasket relative to which to perform the operation.si
- the StockItem which is to be moved.