|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.util.parameter.AbstractParameterContext
com.arsdigita.runtime.AbstractScript
com.arsdigita.packaging.Check
The Check class provides a developer callback for performing validation checks during various points in the package loading and server startup process. This functionality is accessed by creating a package-key.checklist file in the src dir of the package that wishes to add checks. This must be a valid xml file that conforms to the following format:
Checks of type "schema" will be run before the schema for a package is loaded. Checks of type "data" will be run before the data for a package is loaded. Checks of type "startup" will be run before the server is started. All these checks will be run by the "ccm status" command. The classes referred to from the checklist file must be concrete subclasses of the Check class. They must also provide a public noargs constructor. A check is performed by first creating an instance of the specified class using the public noargs constructor and then invoking the<checklist> <checks type="schema"> <check class="com.example.Check1"/> <check class="com.example.Check2"/> ... </checks> <checks type="data"> ... </checks> <checks type="startup"> ... </checks> </checklist>
AbstractScript.run(ScriptContext)
method. The check
must report success or failure using the #status(Status)
method.
Checks will be invoked in the order in which they appear inside the
Nested Class Summary | |
static class |
Check.Status
|
Field Summary | |
static Check.Status |
FAIL
|
static Check.Status |
PASS
|
static String |
versionId
|
static Check.Status |
WARN
|
Constructor Summary | |
Check()
|
Method Summary | |
Check.Status |
getStatus()
Accesses the status of the previous invocation of the AbstractScript.run(ScriptContext) method. |
protected void |
status(Check.Status status)
Used by subclasses to report the result of the Check. |
Methods inherited from class com.arsdigita.runtime.AbstractScript |
run |
Methods inherited from class com.arsdigita.util.parameter.AbstractParameterContext |
get, get, getParameters, load, load, loadInfo, register, save, set, validate, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.arsdigita.util.parameter.ParameterContext |
get, get, getParameters, load, save, set, validate |
Field Detail |
public static final String versionId
public static final Check.Status PASS
public static final Check.Status FAIL
public static final Check.Status WARN
Constructor Detail |
public Check()
Method Detail |
protected void status(Check.Status status)
status
- The status, one of PASS, FAIL, or WARN.public Check.Status getStatus()
AbstractScript.run(ScriptContext)
method.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |