com.cinecolombia.cinecolombia.control.util
Class EJBUtil

java.lang.Object
  |
  +--com.cinecolombia.cinecolombia.control.util.EJBUtil

public final class EJBUtil
extends java.lang.Object

This is an utility class for obtaining EJB references in cinecolombia module.

Author:
CincoSOFT
Created:
Junio 2003

Constructor Summary
EJBUtil()
           
 
Method Summary
static CinecolombiaControllerHome getCinecolombiaControllerHome()
          get Home reference to CinecolombiaController EJB
static SecurityHome getSecurityHome()
          get Home reference to a Security EJB
static java.lang.String getUserId(javax.ejb.SessionContext context)
          get the current user from the context
static boolean isUserInRole(javax.ejb.SessionContext context, java.lang.String rol)
          determine if the current user belongs to a role
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EJBUtil

public EJBUtil()
Method Detail

getCinecolombiaControllerHome

public static CinecolombiaControllerHome getCinecolombiaControllerHome()
                                                                throws java.lang.Exception
get Home reference to CinecolombiaController EJB

Returns:
The CinecolombiaControllerHome value
Throws:
java.lang.Exception

getSecurityHome

public static SecurityHome getSecurityHome()
                                    throws java.lang.Exception
get Home reference to a Security EJB

Returns:
The SecurityHome value
Throws:
java.lang.Exception

getUserId

public static java.lang.String getUserId(javax.ejb.SessionContext context)
                                  throws java.lang.Exception
get the current user from the context

Parameters:
context - is the context
Returns:
The userId value
Throws:
java.lang.Exception

isUserInRole

public static boolean isUserInRole(javax.ejb.SessionContext context,
                                   java.lang.String rol)
                            throws java.lang.Exception
determine if the current user belongs to a role

Parameters:
context - is the context
rol - role of sistem
Returns:
The userInRole value
Throws:
java.lang.Exception