com.instantbank.lettertemplate.control.ejb
Interface LetterTemplateController

All Superinterfaces:
javax.ejb.EJBObject, java.rmi.Remote

public interface LetterTemplateController
extends javax.ejb.EJBObject

This is the EJB-tier controller of the MVC. It is implemented as a session EJB. It controls all the activities that happen in a client session (managing update events through handleEvent() method) It also provides mechanisms to access other session EJBs and variables: get services for obtaining session variables and for contacting EJBs (entity or session) which are instanced for the user.

Author:
Instant-bank (Consuelo Franky)

Method Summary
 LetterTemplate getLetterTemplate(java.lang.String companyId, java.lang.Long userId)
          Get reference to LetterTemplate EJB
 Job getNewJob(java.lang.String companyId, java.lang.Long userId, java.lang.String name, long ftpPrimaryId, long ftpAlternateId)
          Get reference to a new Job EJB
 Job getOldJob(java.lang.Long jobId)
          Get reference to an existent Job EJB
 java.lang.String getW()
           
 java.util.Collection handleEvent(LetterTemplateEvent ese)
          Principal service: Feeds the specified event to the state machine of the business logic.
 void setJobNull()
          Sets null to job attribute:
 
Methods inherited from interface javax.ejb.EJBObject
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove
 

Method Detail

handleEvent

public java.util.Collection handleEvent(LetterTemplateEvent ese)
                                 throws java.rmi.RemoteException,
                                        LetterTemplateEventException
Principal service: Feeds the specified event to the state machine of the business logic.
Parameters:
ese - event associated to a user request
Returns:
a list of models (EJBs names) that got updated because of the processing of this event. In addition, the first element of the list contains the service answer (or the "" string when this answer is not required)
Throws:
LetterTemplateEventException -  
java.rmi.RemoteException - Description of the Exception

setJobNull

public void setJobNull()
                throws java.rmi.RemoteException
Sets null to job attribute:
Throws:
java.rmi.RemoteException - Description of the Exception

getLetterTemplate

public LetterTemplate getLetterTemplate(java.lang.String companyId,
                                        java.lang.Long userId)
                                 throws java.rmi.RemoteException
Get reference to LetterTemplate EJB
Parameters:
companyId - current company
userId - current user
Returns:
the LetterTemplate session bean for this session
Throws:
java.rmi.RemoteException -  

getOldJob

public Job getOldJob(java.lang.Long jobId)
              throws java.rmi.RemoteException
Get reference to an existent Job EJB
Parameters:
jobId - primary key of the Job
Returns:
the Job entity EJB associated.
Throws:
java.rmi.RemoteException -  

getNewJob

public Job getNewJob(java.lang.String companyId,
                     java.lang.Long userId,
                     java.lang.String name,
                     long ftpPrimaryId,
                     long ftpAlternateId)
              throws java.rmi.RemoteException
Get reference to a new Job EJB
Parameters:
companyId - current company
userId - current user
name - name of Job
ftpPrimaryId - primary ftp associated to the Job
ftpAlternateId - alternate ftp associated to the Job
Returns:
a new Job entity EJB associated with this session.
Throws:
java.rmi.RemoteException - Description of the Exception

getW

public java.lang.String getW()
                      throws java.rmi.RemoteException
Returns:
the w variable for this session
Throws:
java.rmi.RemoteException -