org.jasig.portal.tools.checks
Class CheckResult

java.lang.Object
  extended by org.jasig.portal.tools.checks.CheckResult

public class CheckResult
extends Object

Object representing the result of a check. All CheckResults convey the result of a check. Additionally, CheckResults representing failures convey advice about how to remediate the failed check.

Since:
uPortal 2.5
Version:
$Revision: 19776 $ $Date: 2010-01-14 16:17:21 -0600 (Thu, 14 Jan 2010) $

Method Summary
static CheckResult createFailure(String message, String remediationAdvice)
          Obtain a CheckResult representing a check that failed -- dependency for which you were checking was not present, thing you asserted to be true wasn't, etc.
static CheckResult createFatalFailure(String message, String remediationAdvice)
          Obtain a CheckResult representing a check that failed and should stop the portal from initializaing -- dependency for which you were checking was not present, thing you asserted to be true wasn't, etc.
static CheckResult createSuccess(String message)
          Obtain a CheckResult representing a check that succeeded -- dependency for which you were checking was present, thing you asserted to be true actually was true, etc.
 String getMessage()
           
 String getRemediationAdvice()
           
 boolean isFatal()
           
 boolean isSuccess()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

createSuccess

public static CheckResult createSuccess(String message)
Obtain a CheckResult representing a check that succeeded -- dependency for which you were checking was present, thing you asserted to be true actually was true, etc.

Parameters:
message - - a message describing the success of that check
Returns:
a CheckResult representing the success

createFailure

public static CheckResult createFailure(String message,
                                        String remediationAdvice)
Obtain a CheckResult representing a check that failed -- dependency for which you were checking was not present, thing you asserted to be true wasn't, etc.

Parameters:
message - - a message describing the failure of the check
remediationAdvice - - advice for the uPortal deployer about how to resolve this failure
Returns:
a CheckResult representing this failure

createFatalFailure

public static CheckResult createFatalFailure(String message,
                                             String remediationAdvice)
Obtain a CheckResult representing a check that failed and should stop the portal from initializaing -- dependency for which you were checking was not present, thing you asserted to be true wasn't, etc.

Parameters:
message - - a message describing the failure of the check
remediationAdvice - - advice for the uPortal deployer about how to resolve this failure
Returns:
a CheckResult representing this failure

getMessage

public String getMessage()
Returns:
Returns the message.

getRemediationAdvice

public String getRemediationAdvice()
Returns:
Returns the remediationAdvice.

isSuccess

public boolean isSuccess()
Returns:
Returns the success.

isFatal

public boolean isFatal()
Returns:
If the failure was fatal, can only be true if isSuccess() is false

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()


Copyright © 2010 Jasig. All Rights Reserved.