Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jasig.portal.tools.checks
Class JaxpCheck

    java.lang.Object
      org.jasig.portal.tools.checks.JaxpCheck

All Implemented Interfaces:
  ICheck

    public class JaxpCheck

extends java.lang.Object
implements ICheck

Checks that JAXP is present in the JVM. This allows us to give a useful error back to the deployer if we find JAXP missing. Instead of getting many class not found errors the deployer will see a message instructing how to fix the problem. JaxpCheck fulfills two purposes. First, it is an executable class which will make an educated guess at whether the JAXP jars are present (by checking for a particular class found only in the JAXP distribution) and if it guesses we're missing those jars will report this error to System.err and return a nonzero return code. A nonzero return value from a main method stop an Ant build when the class was run with stopOnFailure declared to true, as it is by default in our build.xml. Second, JaxpCheck implements the ICheck interface and so can be used via the CheckRunner API in this package. This allows us to run this check as part of the context initialization sanity checking. An instance of this check is configured in

Since:
  uPortal 2.5
Version:
  $Revision: 1.1 $ $Date: 2005/05/20 19:01:34 $

Field Summary
`private static java.lang.String` | `A_JAXP_CLASS` The name of a class found only in the JAXP distribution.
`private ICheck` | `checkDelegate` ICheck implementation to which we delegate as the way we implement ICheck.

Constructor Summary
`JaxpCheck()`

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.
`static void` | `main(java.lang.String[] args)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### A_JAXP_CLASS

    private static final java.lang.String A_JAXP_CLASS

  The name of a class found only in the JAXP distribution.

  See Also:
    Constant Field Values

### checkDelegate

    private ICheck checkDelegate

  ICheck implementation to which we delegate as the way we implement ICheck.

Constructor Detail

### JaxpCheck

    public JaxpCheck()

Method Detail

### main

    public static void main(java.lang.String[] args)

### 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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD