org.jasig.portal.tools.checks
Class TimeCheck

java.lang.Object
  extended by org.jasig.portal.tools.checks.TimeCheck
All Implemented Interfaces:
ICheck

public class TimeCheck
extends java.lang.Object
implements ICheck

An example ICheck implementation which is just a diagnostic and not an assertion. This check cannot fail, but it still exposes useful information, namely when the check was run. When included in a batch of checks, allows you to see when the batch was run.

Since:
uPortal 2.5
Version:
$Revision: 1.2 $ $Date: 2005/05/20 01:51:25 $

Constructor Summary
TimeCheck()
           
 
Method Summary
 CheckResult doCheck()
          Perform an arbitrary check.
 java.lang.String getDescription()
          Get a description of what it is the check is intended to check.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeCheck

public TimeCheck()
Method Detail

doCheck

public CheckResult doCheck()
Description copied from interface: ICheck
Perform an arbitrary check. The result of this method should be a CheckResult representing either a success or failure of the check. Implementations should catch their own exceptions and translate them into CheckResults representing failures, since the intent of this API is to translate arcane deployment issues into friendly results with remediation messages. However, the implementation of this method may throw any RuntimeException, and clients must cope with such exceptions. Cope with probably means translate it into a CheckResult representing a failure of this check. The client of a Check implementation will be less effective in translating a thrown Throwable into an intelligent CheckResult representing a failure than the Check would have been in doing this itself.

Specified by:
doCheck in interface ICheck
Returns:
a CheckResult representing the result of the check

getDescription

public java.lang.String getDescription()
Description copied from interface: ICheck
Get a description of what it is the check is intended to check. Implementations of this method must always return a non-null String and should not throw anything.

Specified by:
getDescription in interface ICheck
Returns:
a description of what it is that the check checks.