|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.salespointframework.desktop.strategies.FormSheetStrategy
org.salespointframework.desktop.strategies.EditButtonStrategy
org.salespointframework.desktop.strategies.DefaultRemoveCatalogItemStrategy
public class DefaultRemoveCatalogItemStrategy
Strategy that can be associated to the "Remove" button of a SingleTableFormSheet that displays the contents of a Catalog.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.salespointframework.desktop.strategies.FormSheetStrategy |
|---|
FormSheetStrategy.ErrorHandler |
| Field Summary | |
|---|---|
protected Catalog<CatalogItem> |
m_cCatalog
The Catalog that is being edited. |
| 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 | |
|---|---|
DefaultRemoveCatalogItemStrategy(Catalog<CatalogItem> c)
Create a new DefaultRemoveCatalogItemStrategy. |
|
| Method Summary | |
|---|---|
protected void |
doRemove(SaleProcess p,
CatalogItem ci,
DataBasket db)
Perform the actual removal. |
protected Gate |
getCheckGate(SingleTableFormSheet stfs)
Get the Gate that checks whether the removal is allowed. |
protected java.lang.String |
getConfirmationCaption(SingleTableFormSheet stfs,
CatalogItem ci)
Get the caption for the default confirmation MsgForm. |
protected java.lang.String |
getConfirmationText(SingleTableFormSheet stfs,
CatalogItem ci)
Get the text for the default confirmation MsgForm. |
Transition |
getEditProcess(SingleTableFormSheet stfs,
SaleProcess p,
SalesPoint sp)
Get the first transition of the process that will perform the editing. |
protected Transition |
getRemoveTransition(SingleTableFormSheet stfs)
Get the transition that performs the actual removal. |
| 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 |
| Field Detail |
|---|
protected Catalog<CatalogItem> m_cCatalog
| Constructor Detail |
|---|
public DefaultRemoveCatalogItemStrategy(Catalog<CatalogItem> c)
c - the Catalog to be edited. Must be the same that is displayed by the SingleTableFormSheet.| Method Detail |
|---|
public Transition getEditProcess(SingleTableFormSheet stfs,
SaleProcess p,
SalesPoint sp)
EditButtonStrategyGates and Transitions and display any number of Form-
and MenuSheets. Normally, the sub-process should end at the gate at which the
SingleTableFormSheet is being displayed, which can be obtained by
SingleTableFormSheet.getGate().
getEditProcess in class EditButtonStrategystfs - the SingleTableFormSheet that triggers the sub-process.p - the process into which the sub-process will be implanted.sp - the SalesPoint at which the FormSheet is displayed, if any.protected Gate getCheckGate(SingleTableFormSheet stfs)
getRemoveTransition(org.salespointframework.desktop.formsheets.SingleTableFormSheet), otherwise, a transition to the
SingleTableFormSheet's gate should be triggered.
stfs - the FormSheet that triggered the operation.
protected java.lang.String getConfirmationCaption(SingleTableFormSheet stfs,
CatalogItem ci)
MsgForm.
stfs - the FormSheet that triggered the operation.ci - the CatalogItem that is going to be removed.
protected java.lang.String getConfirmationText(SingleTableFormSheet stfs,
CatalogItem ci)
MsgForm.
stfs - the FormSheet that triggered the operation.ci - the CatalogItem that is going to be removed.protected Transition getRemoveTransition(SingleTableFormSheet stfs)
doRemove(org.salespointframework.core.SaleProcess, org.salespointframework.core.data.interfaces.CatalogItem, org.salespointframework.core.data.interfaces.DataBasket).
stfs - the FormSheet that triggered the operation.
protected void doRemove(SaleProcess p,
CatalogItem ci,
DataBasket db)
Any error condition should be passed on to FormSheetStrategy.error(org.salespointframework.core.SaleProcess, int) in
FormSheetStrategy.
p - the process in which this sub-process will be implanted.ci - the CatalogItem to be removed. Can be null.db - the DataBasket relative to which to perform the operation.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||