*
* @throws ValveConfigurationException
*/
public AuthorizationProcessImpl setAuthorizationProcessImpl() throws ValveConfigurationException {
AuthorizationProcessImpl authorizationProcessImpl = null;
//Set authorizationProcessClsName if it has not been done yet
if (authorizationProcessClsName == null) {
//read the authorization class name from Valve Config
if (valveConf != null) {
authorizationProcessClsName =
valveConf.getAuthorizationProcessImpl();
logger.debug("Setting authorizationProcessClsName: " +
authorizationProcessClsName);
} else {
// Throw Configuration Exception
throw new ValveConfigurationException("Valve Configuration file has not been set correctly");
}
}
// Protection
if ((authorizationProcessClsName == null) ||
(authorizationProcessClsName.equals(""))) {
// Throw Configuration Exception
throw new ValveConfigurationException("Configuration parameter [authorizationProcessImpl] has not been set correctly");
}
try {
// Instantiate the authorization process class
authorizationProcessImpl =
(AuthorizationProcessImpl)Class.forName(authorizationProcessClsName).newInstance();
authorizationProcessImpl.setValveConfiguration(valveConf);
} catch (InstantiationException ie) {
// Throw Configuration Exception
throw new ValveConfigurationException("Configuration parameter [authorizationProcessImpl] has not been set correctly - InstantiationException");