com.instantbank.lettertemplate.control.util
Class EJBUtil

java.lang.Object
  |
  +--com.instantbank.lettertemplate.control.util.EJBUtil

public final class EJBUtil
extends java.lang.Object

This is a utility class for obtaining EJB references.

Author:
Instant-bank (Consuelo Franky)

Constructor Summary
EJBUtil()
           
 
Method Summary
static JobHome getJobHome()
          get Home reference to a Job EJB
static LetterTemplateControllerHome getLetterTemplateControllerHome()
          get Home reference to a LetterTemplateController EJB
static LetterTemplateHome getLetterTemplateHome()
          get Home reference to a LetterTemplate 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, registerNatives, toString, wait, wait, wait
 

Constructor Detail

EJBUtil

public EJBUtil()
Method Detail

getLetterTemplateControllerHome

public static LetterTemplateControllerHome getLetterTemplateControllerHome()
                                                                    throws java.lang.Exception
get Home reference to a LetterTemplateController EJB
Returns:
The LetterTemplateControllerHome value
Throws:
java.lang.Exception -  

getLetterTemplateHome

public static LetterTemplateHome getLetterTemplateHome()
                                                throws java.lang.Exception
get Home reference to a LetterTemplate EJB
Returns:
The LetterTemplateHome value
Throws:
java.lang.Exception -  

getJobHome

public static JobHome getJobHome()
                          throws java.lang.Exception
get Home reference to a Job EJB
Returns:
The JobHome 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 -