|
SalesPoint Framework v3.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A context that allows processes to run and access certain functionality.
A ProcessContext provides processes
with an environment in which they
can work. Although some of the functionality could be accessed directly at the Shop
,
some can't, and for the rest the usage of ProcessContexts provides an extra level of flexibility.
It is therefore explicitly recommended that your processes access all of the needed functionality
through their context, except in cases where you want to make sure that a special service is
carried out at Shop level.
The methods comprising the ProcessContext interface fall into three categories:
Method Summary | |
Catalog |
getCatalog(String sName)
Get a Catalog by its name. |
User |
getCurrentUser(SaleProcess p)
Get the user currently associated with the given process. |
Object |
getProcessData(String sKey)
Get an object from the ProcessContext. |
Stock |
getStock(String sName)
Get a Stock by its name. |
boolean |
hasUseableDisplay(SaleProcess p)
True if the ProcessContext has a useable display for the given process. |
void |
log(SaleProcess p,
Loggable la)
Put an entry into the ProcessContext's log stream for a process. |
void |
popUpFormSheet(SaleProcess p,
FormSheet fs)
Pop up a FormSheet for a process. |
void |
processFinished(SaleProcess p)
Notification that a process was finished in this ProcessContext. |
void |
processStarted(SaleProcess p)
Notification that a process was started in this ProcessContext. |
void |
setFormSheet(SaleProcess p,
FormSheet fs)
Set a FormSheet for a process. |
void |
setMenuSheet(SaleProcess p,
MenuSheet ms)
Set a MenuSheet for a process. |
void |
setProcessData(String sKey,
Object oData)
Put an object into the ProcessContext. |
Method Detail |
public void setFormSheet(SaleProcess p, FormSheet fs) throws InterruptedException
The FormSheet will be displayed on the ProcessContext's display for the given process, if there
is one and it is useable. Setting a null
FormSheet will remove any FormSheet
currently being displayed.
p
- the process that wishes to set a FormSheetfs
- the FormSheet that is to be set.
InterruptedException
- if an interrupt occurred while waiting for the FormSheet to be
closed. See Display.setFormSheet
for details.Display.setFormSheet(sale.FormSheet)
public void popUpFormSheet(SaleProcess p, FormSheet fs) throws InterruptedException
The FormSheet will be popped up on the ProcessContext's display for the given process, if there is one and it is useable.
p
- the process that wishes to pop up a FormSheetfs
- the FormSheet that is to be set.
InterruptedException
- if an interrupt occurred while waiting for the FormSheet to be
closed. See Display.popUpFormSheet
for details.Display.popUpFormSheet(sale.FormSheet)
public void setMenuSheet(SaleProcess p, MenuSheet ms)
The MenuSheet will be displayed on the ProcessContext's display for the given process, if there
is one and it is useable. Setting a null
MenuSheet will remove any MenuSheet
currently being displayed.
p
- the process that wishes to set a MenuSheetms
- the MenuSheet that is to be set.Display.setMenuSheet(sale.MenuSheet)
public boolean hasUseableDisplay(SaleProcess p)
p
- the process whose display is to be checked.Display.isUseableDisplay()
public void setProcessData(String sKey, Object oData)
sKey
- object's identifieroData
- the data objectpublic Object getProcessData(String sKey)
sKey
- object's key
public void log(SaleProcess p, Loggable la) throws IOException
p
- the process that wishes to put data into the log stream.la
- the information that is to be logged.
IOException
- if any problems occurred while writing to the log stream.public User getCurrentUser(SaleProcess p)
p
- the process that wishes to know its current user.
public Stock getStock(String sName)
The Stock's name is resolved relative to the ProcessContext, so that the same call can result in different Stocks in different ProcessContexts.
sName
- the name of the Stock to be returned.
public Catalog getCatalog(String sName)
The Catalog's name is resolved relative to the ProcessContext, so that the same call can result in different Catalogs in different ProcessContexts.
sName
- the name of the Catalog to be returned.
public void processStarted(SaleProcess p)
This method is usually not called directly, but rather the Framework calls it as appropriate.
p
- the process that was started.public void processFinished(SaleProcess p)
This method is usually not called directly, but rather the Framework calls it as appropriate.
p
- the process that was finished.
|
SalesPoint Framework v3.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |