org.jasig.portal.tools.checks
Class InitializingCheckRunner

java.lang.Object
  extended by org.jasig.portal.tools.checks.InitializingCheckRunner
All Implemented Interfaces:
InitializingBean, ServletContextAware

public class InitializingCheckRunner
extends Object
implements InitializingBean, ServletContextAware

Runs an injected ICheckRunner when afterPropertiesSet() is called and logs the results.

Version:
$Revision$
Author:
Eric Dalquist

Field Summary
static String INIT_CHECK_RESULTS
           
protected  org.apache.commons.logging.Log logger
           
 
Constructor Summary
InitializingCheckRunner()
           
 
Method Summary
 void afterPropertiesSet()
           
 ICheckRunner getCheckRunner()
           
protected  void logResults(List<CheckAndResult> results)
          Log the results reported by the check runner.
 void setCheckRunner(ICheckRunner checkRunner)
           
 void setServletContext(ServletContext servletContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INIT_CHECK_RESULTS

public static final String INIT_CHECK_RESULTS
See Also:
Constant Field Values

logger

protected final org.apache.commons.logging.Log logger
Constructor Detail

InitializingCheckRunner

public InitializingCheckRunner()
Method Detail

getCheckRunner

public ICheckRunner getCheckRunner()
Returns:
the checkRunner

setCheckRunner

public void setCheckRunner(ICheckRunner checkRunner)
Parameters:
checkRunner - the checkRunner to set

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface InitializingBean
Throws:
Exception

setServletContext

public void setServletContext(ServletContext servletContext)
Specified by:
setServletContext in interface ServletContextAware

logResults

protected void logResults(List<CheckAndResult> results)
Log the results reported by the check runner. You can subclass this class and override this method to change the logging behavior. You can also, by overriding this method and throwing a RuntimeException, veto the loading of the context. The default implementation of this method is safe such that it will not throw. Since the rest of contextInitialized is also safe, the default implementation of this ContextListener is safe and will not, no matter how abjectly the checks fail, itself abort the context initialization.

Parameters:
results - List of CheckAndResult instances
servletContext - the context in which we're running


Copyright © 2010 Jasig. All Rights Reserved.