ca.bc.gov.webade
Class WebADEApplicationUtils

java.lang.Object
  extended byca.bc.gov.webade.WebADEApplicationUtils

public final class WebADEApplicationUtils
extends java.lang.Object

Author:
jross

Constructor Summary
WebADEApplicationUtils()
           
 
Method Summary
static Application createApplication(java.lang.String appCode)
           
static Application createApplication(java.lang.String appCode, boolean loadExtensions)
           
static Application createApplication(WebADEDatastore datastore)
           
static boolean isUserEligibleProfileManager(Application app, User user)
          Deprecated. No replacement method, always returns true.
static boolean isUserInGroup(User user, Group group)
          Deprecated.  
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebADEApplicationUtils

public WebADEApplicationUtils()
Method Detail

createApplication

public static Application createApplication(java.lang.String appCode)
                                     throws WebADEException
Parameters:
appCode - The application acronym for the application.
Returns:
Initialized Application singleton.
Throws:
WebADEException - Thrown if an error occurs while creating the Application singleton.

createApplication

public static Application createApplication(java.lang.String appCode,
                                            boolean loadExtensions)
                                     throws WebADEException
Parameters:
appCode - The application acronym for the application.
loadExtensions - Flag indicating whether to load extensions for the application.
Returns:
Initialized Application singleton.
Throws:
WebADEException - Thrown if an error occurs while creating the Application singleton.

createApplication

public static Application createApplication(WebADEDatastore datastore)
                                     throws WebADEException
Parameters:
datastore -
Returns:
A properly-initialized instance of Application.
Throws:
WebADEException

isUserInGroup

public static boolean isUserInGroup(User user,
                                    Group group)
Deprecated.  

Helper method that checks to see if the user is a member of the target group.

Parameters:
user - The target user.
group - The target group.
Returns:
True if the user is a member of the given group.

isUserEligibleProfileManager

public static boolean isUserEligibleProfileManager(Application app,
                                                   User user)
                                            throws WebADEException
Deprecated. No replacement method, always returns true.

Checks to see if the user is eligible to be a profile manager. With the change to web-services, this method no longer can provide meaningful results. It has therefore been deprecated and always returns true.

Parameters:
app - The application singleton used to query about the user's abilities.
user - The target user.
Returns:
True if the user is non-BCeID, or is BCeID and a profile admin.
Throws:
WebADEException