01: /* Copyright 2005 The JA-SIG Collaborative. All rights reserved.
02: * See license distributed with this file and
03: * available online at http://www.uportal.org/license.html
04: */
05: package org.jasig.portal.tools.checks;
06:
07: /**
08: * A single runtime check that to be performed to validate an application deployment.
09: *
10: * @version $Revision: 35833 $ $Date: 2005-05-19 18:51:40 -0700 (Thu, 19 May 2005) $
11: * @since uPortal 2.5
12: */
13: public interface ICheck {
14:
15: /**
16: * Perform an arbitrary check. The result of this method should be
17: * a CheckResult representing either a success or failure of the check.
18: *
19: * Implementations should catch their own exceptions and translate them into
20: * CheckResults representing failures, since the intent of this API is to translate
21: * arcane deployment issues into friendly results with remediation messages.
22: *
23: * However, the
24: * implementation of this method may throw any RuntimeException, and
25: * clients must cope with such exceptions. Cope with probably means translate
26: * it into a CheckResult representing a failure of this check. The
27: * client of a Check implementation will be less effective in translating a thrown Throwable
28: * into an intelligent CheckResult representing a failure than the Check would have been
29: * in doing this itself.
30: *
31: * @return a CheckResult representing the result of the check
32: */
33: public CheckResult doCheck();
34:
35: /**
36: * Get a description of what it is the check is intended to check.
37: * Implementations of this method must always return a non-null String and
38: * should not throw anything.
39: * @return a description of what it is that the check checks.
40: */
41: public String getDescription();
42:
43: }
|