com.cinecolombia.cinecolombia.control.ejb
Class CinecolombiaControllerEJB

java.lang.Object
  |
  +--com.cinecolombia.cinecolombia.control.ejb.CinecolombiaControllerEJB
All Implemented Interfaces:
javax.ejb.EnterpriseBean, java.io.Serializable, javax.ejb.SessionBean

public class CinecolombiaControllerEJB
extends java.lang.Object
implements javax.ejb.SessionBean

Session Bean implementation for CinecolombiaController EJB. This is the EJB-tier controller of the MVC for cinecolombia module. It is implemented as a session EJB. It controls all 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:
CincoSOFT
See Also:
Serialized Form
Created:
Junio 2003

Field Summary
private  Debug debug
           
private  javax.ejb.SessionContext sc
           
private  StateMachine sm
           
private  Security varSecurity
           
 
Constructor Summary
CinecolombiaControllerEJB()
          Constructor for the CinecolombiaControllerEJB object
 
Method Summary
 void ejbActivate()
          activation after swapping
 void ejbCreate()
          after creation of ejb instance
 void ejbPassivate()
          before swappping
 void ejbRemove()
          before remove ejb instance
 Security getSecurity(java.lang.String companyId, java.lang.Long userId)
          get reference to Security EJB
 java.lang.String getW()
           
 java.util.Collection handleEvent(CinecolombiaEvent ese)
          Principal service: Feeds the specified event to the state machine of the business logic.
 void setSessionContext(javax.ejb.SessionContext sc)
          Sets the sessionContext attribute of the CinecolombiaControllerEJB object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sm

private StateMachine sm

varSecurity

private Security varSecurity

sc

private javax.ejb.SessionContext sc

debug

private Debug debug
Constructor Detail

CinecolombiaControllerEJB

public CinecolombiaControllerEJB()
Constructor for the CinecolombiaControllerEJB object

Method Detail

setSessionContext

public void setSessionContext(javax.ejb.SessionContext sc)
Sets the sessionContext attribute of the CinecolombiaControllerEJB object

Specified by:
setSessionContext in interface javax.ejb.SessionBean
Parameters:
sc - The new sessionContext value

ejbActivate

public void ejbActivate()
activation after swapping

Specified by:
ejbActivate in interface javax.ejb.SessionBean

ejbPassivate

public void ejbPassivate()
before swappping

Specified by:
ejbPassivate in interface javax.ejb.SessionBean

ejbCreate

public void ejbCreate()
after creation of ejb instance


ejbRemove

public void ejbRemove()
before remove ejb instance

Specified by:
ejbRemove in interface javax.ejb.SessionBean

handleEvent

public java.util.Collection handleEvent(CinecolombiaEvent ese)
                                 throws CinecolombiaEventException
Principal service: Feeds the specified event to the state machine of the business logic.

Parameters:
ese - event corresponding to 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:
CinecolombiaEventException

getSecurity

public Security getSecurity(java.lang.String companyId,
                            java.lang.Long userId)
get reference to Security EJB

Parameters:
companyId - Description of the Parameter
userId - Description of the Parameter
Returns:
the Security session bean for this session

getW

public java.lang.String getW()
Returns:
the w variable for this session: these variables are maintained by StateMachine javaBean