SalesPoint Framework v3.0

sale
Class Shop.ProcessHandle

java.lang.Object
  |
  +--sale.Shop.ProcessHandle

protected static class Shop.ProcessHandle
extends Object
implements ProcessContext

A ProcessContext for one remote or background process.

See Also:
Serialized Form

Field Summary
protected  Display m_d
          The display to be used.
protected  DataBasket m_db
          The DataBasket to be used.
protected  SaleProcess m_p
          The process for which this is the context.
protected  User m_usr
          The user to be used as the current user for the process.
 
Constructor Summary
Shop.ProcessHandle(SaleProcess p, Display d, User usr, DataBasket db)
          Create a new ProcessHandle.
 
Method Summary
 boolean canShutdown(boolean fContextDestroy)
          Check whether the process that is handled by this ProcessHandle can be quitted.
 Catalog getCatalog(String sName)
           
 User getCurrentUser(SaleProcess p)
           
 Stock getStock(String sName)
           
 boolean hasUseableDisplay(SaleProcess p)
           
 void log(SaleProcess p, Loggable la)
           
 void popUpFormSheet(SaleProcess p, FormSheet fs)
           
 void processFinished(SaleProcess p)
           
 void processStarted(SaleProcess p)
           
 void resume()
          Resume the process that is handled by this ProcessHandle.
 void setFormSheet(SaleProcess p, FormSheet fs)
           
 void setMenuSheet(SaleProcess p, MenuSheet ms)
           
 void suspend()
          Suspend the process that is handled by this ProcessHandle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_p

protected SaleProcess m_p
The process for which this is the context.

m_d

protected Display m_d
The display to be used. Defaults to NullDisplay.s_ndGlobal.

m_usr

protected User m_usr
The user to be used as the current user for the process.

m_db

protected DataBasket m_db
The DataBasket to be used.
Constructor Detail

Shop.ProcessHandle

public Shop.ProcessHandle(SaleProcess p,
                          Display d,
                          User usr,
                          DataBasket db)
Create a new ProcessHandle.
Method Detail

setFormSheet

public void setFormSheet(SaleProcess p,
                         FormSheet fs)
                  throws InterruptedException
Specified by:
setFormSheet in interface ProcessContext

popUpFormSheet

public void popUpFormSheet(SaleProcess p,
                           FormSheet fs)
                    throws InterruptedException
Specified by:
popUpFormSheet in interface ProcessContext

setMenuSheet

public void setMenuSheet(SaleProcess p,
                         MenuSheet ms)
Specified by:
setMenuSheet in interface ProcessContext

hasUseableDisplay

public boolean hasUseableDisplay(SaleProcess p)
Specified by:
hasUseableDisplay in interface ProcessContext

log

public void log(SaleProcess p,
                Loggable la)
         throws IOException
Specified by:
log in interface ProcessContext

getCurrentUser

public User getCurrentUser(SaleProcess p)
Specified by:
getCurrentUser in interface ProcessContext

getStock

public Stock getStock(String sName)
Specified by:
getStock in interface ProcessContext

getCatalog

public Catalog getCatalog(String sName)
Specified by:
getCatalog in interface ProcessContext

processStarted

public void processStarted(SaleProcess p)
Specified by:
processStarted in interface ProcessContext

processFinished

public void processFinished(SaleProcess p)
Specified by:
processFinished in interface ProcessContext

suspend

public void suspend()
             throws InterruptedException
Suspend the process that is handled by this ProcessHandle.
Override:
Never.

resume

public void resume()
Resume the process that is handled by this ProcessHandle.
Override:
Never.

canShutdown

public boolean canShutdown(boolean fContextDestroy)
Check whether the process that is handled by this ProcessHandle can be quitted.

The default implementation simply calls

   m_p.canQuit (fContextDestroy);
 
Called by canShutdown(boolean).

Override:
Sometimes.

SalesPoint Framework v3.0