|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jasig.portal.tools.checks.ClassPresenceCheck
public class ClassPresenceCheck
Checks that a class named as a constructor argument is present.
Field Summary | |
---|---|
private java.lang.String |
checkDescription
A String describing this check. |
private CheckResult |
failureResult
The CheckResult we will return if our target class is not present. |
protected org.apache.commons.logging.Log |
log
|
private CheckResult |
successResult
The CheckResult we will return if our target class is present. |
private java.lang.String |
targetClass
The class we will be looking for. |
Constructor Summary | |
---|---|
ClassPresenceCheck(java.lang.String targetClass)
Each instance of ClassPresenceCheck exists to test for the presence of exactly one class. |
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. |
(package private) CheckResult |
getFailureResult()
Get the CheckResult we will return when we fail to touch our configured targetClass. |
(package private) CheckResult |
getSuccessResult()
Get the CheckResult we will return when we succeed in touching our configured targetClass. |
(package private) java.lang.String |
getTargetClass()
Get the name of the class for which we check. |
void |
setDescription(java.lang.String description)
Set the check description which we will return for on calls to the getDescription() method we're implementing as part of being an ICheck . |
(package private) void |
setFailureResult(CheckResult failureResult)
Set the CheckResult we will return when we fail to touch our configured targetClass. |
(package private) void |
setSuccessResult(CheckResult successResult)
Set the CheckResult we will return when we succeed in touching our configured targetClass. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final org.apache.commons.logging.Log log
private final java.lang.String targetClass
private CheckResult successResult
private CheckResult failureResult
private java.lang.String checkDescription
Constructor Detail |
---|
public ClassPresenceCheck(java.lang.String targetClass)
targetClass
- fully qualified name of the target class
java.lang.IllegalArgumentException
- if targetClass is nullMethod Detail |
---|
public CheckResult doCheck()
ICheck
doCheck
in interface ICheck
public java.lang.String getDescription()
ICheck
getDescription
in interface ICheck
public void setDescription(java.lang.String description)
ICheck
.
description
- CheckResult getFailureResult()
void setFailureResult(CheckResult failureResult)
failureResult
- desired CheckResult on failureCheckResult getSuccessResult()
void setSuccessResult(CheckResult successResult)
successResult
- desired CheckResult on success.java.lang.String getTargetClass()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |