com.instantbank.lettertemplate.control.web
Class ModelManager
java.lang.Object
|
+--com.instantbank.lettertemplate.control.web.ModelUpdateNotifier
|
+--com.instantbank.lettertemplate.control.web.ModelManager
- All Implemented Interfaces:
- java.io.Serializable
- public class ModelManager
- extends ModelUpdateNotifier
- implements java.io.Serializable
This class provides a convenient set of methods for the web tier
components to access all the model objects. This class also insures that
only one copy of the model objects are created for web tier access by
placing a reference to the model objects in the session.
- Author:
- Instant-bank (Consuelo Franky)
- See Also:
- Serialized Form
Method Summary |
Job |
getJobEJB(java.lang.Long jobId)
get reference to the current Job EJB through the proxy |
JobWebImpl |
getJobModel()
gets an instance of JobWebImpl: javabean that is view of Job EJB |
LetterTemplateController |
getSCCEJB()
sets to sccEjb attribute the controller ejb reference |
void |
init(javax.servlet.ServletContext context,
javax.servlet.http.HttpSession session)
Here it should instances all the javabeans that are view of Model. |
void |
setSCC(LetterTemplateControllerProxy scc)
sets to scc attribute the web proxy reference |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
context
private javax.servlet.ServletContext context
session
private javax.servlet.http.HttpSession session
sccEjb
private LetterTemplateController sccEjb
scc
private LetterTemplateControllerProxy scc
jobEjb
private Job jobEjb
debug
private Debug debug
ModelManager
public ModelManager()
- constructor
init
public void init(javax.servlet.ServletContext context,
javax.servlet.http.HttpSession session)
- Here it should instances all the javabeans that are view of Model.
a) only one view copy in the user web session for each EJB in the user Service Layer session
b) only one view copy in the web context for each EJB shared between all users
- Parameters:
context
- HTTP contextsession
- HTTP session
setSCC
public void setSCC(LetterTemplateControllerProxy scc)
- sets to scc attribute the web proxy reference
- Parameters:
scc
- web proxy reference
getJobModel
public JobWebImpl getJobModel()
- gets an instance of JobWebImpl: javabean that is view of Job EJB
- Returns:
- The jobModel value
getSCCEJB
public LetterTemplateController getSCCEJB()
- sets to sccEjb attribute the controller ejb reference
- Returns:
- The sCCEJB value
getJobEJB
public Job getJobEJB(java.lang.Long jobId)
- get reference to the current Job EJB through the proxy
- Parameters:
jobId
- Description of the Parameter- Returns:
- The jobEJB value