|
SalesPoint Framework v3.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sale.stdforms.FormSheetStrategy data.stdforms.singletableformsheet.EditButtonStrategy data.stdforms.singletableformsheet.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 inherited from class sale.stdforms.FormSheetStrategy |
FormSheetStrategy.ErrorHandler |
Field Summary | |
protected Catalog |
m_cCatalog
The Catalog that is being edited. |
Fields inherited from class sale.stdforms.FormSheetStrategy |
DEFAULT_ERROR_HANDLER, m_ehErrHandler, MSG_POPUP_ERROR_HANDLER |
Fields inherited from interface sale.ProcessErrorCodes |
DATABASKET_CONFLICT_ERROR, DUPLICATE_KEY_EXCEPTION, ERR_INTERNAL, ERR_LOWERBOUND, ERR_NOERROR, ERR_UPPERBOUND, NOT_ENOUGH_ELEMENTS_ERROR, REMOVE_VETO_EXCEPTION |
Constructor Summary | |
DefaultRemoveCatalogItemStrategy(Catalog 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 String |
getConfirmationCaption(SingleTableFormSheet stfs,
CatalogItem ci)
Get the caption for the default confirmation MsgForm . |
protected 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 sale.stdforms.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 m_cCatalog
Constructor Detail |
public DefaultRemoveCatalogItemStrategy(Catalog 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)
EditButtonStrategy
Gates
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 EditButtonStrategy
stfs
- 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(data.stdforms.SingleTableFormSheet)
, otherwise, a transition to the
SingleTableFormSheet's gate
should be triggered.
stfs
- the FormSheet that triggered the operation.getConfirmationCaption(data.stdforms.SingleTableFormSheet, data.CatalogItem)
and
getConfirmationText(data.stdforms.SingleTableFormSheet, data.CatalogItem)
, resp.protected String getConfirmationCaption(SingleTableFormSheet stfs, CatalogItem ci)
MsgForm
.
stfs
- the FormSheet that triggered the operation.ci
- the CatalogItem that is going to be removed.(stfs.getCaption() + " - Confirmation")
.protected String getConfirmationText(SingleTableFormSheet stfs, CatalogItem ci)
MsgForm
.
stfs
- the FormSheet that triggered the operation.ci
- the CatalogItem that is going to be removed.("Are you sure, you want to remove \"" + ci.getName() + "\"?")
.protected Transition getRemoveTransition(SingleTableFormSheet stfs)
doRemove(sale.SaleProcess, data.CatalogItem, data.DataBasket)
.
stfs
- the FormSheet that triggered the operation.doRemove(sale.SaleProcess, data.CatalogItem, data.DataBasket)
.protected void doRemove(SaleProcess p, CatalogItem ci, DataBasket db)
Any error condition should be passed on to FormSheetStrategy.error(sale.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.
|
SalesPoint Framework v3.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |