org.jasig.portal.tools.checks
Class BaseCheck
java.lang.Object
org.jasig.portal.tools.checks.BaseCheck
- All Implemented Interfaces:
- ICheck
- Direct Known Subclasses:
- ClassPresenceCheck, SpringBeanCheck, SystemPropertyCheck, XalanVersionCheck
public abstract class BaseCheck
- extends Object
- implements ICheck
- Version:
- $Revision$
- Author:
- Eric Dalquist
|
Field Summary |
protected org.apache.commons.logging.Log |
log
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected final org.apache.commons.logging.Log log
BaseCheck
public BaseCheck()
isFatal
public final boolean isFatal()
- Returns:
- the fatal
setFatal
public final void setFatal(boolean fatal)
- If a failed check should be marked as fatal
setDescription
public final void setDescription(String description)
- The description of the check
doCheck
public final 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
doCheckInternal
protected abstract CheckResult doCheckInternal()
- Returns:
- The check result
getDescription
public final 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.
Copyright © 2010 Jasig. All Rights Reserved.