summaryrefslogtreecommitdiffstats
path: root/pki/base/common/src/com/netscape/cms/selftests/ASelfTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'pki/base/common/src/com/netscape/cms/selftests/ASelfTest.java')
-rw-r--r--pki/base/common/src/com/netscape/cms/selftests/ASelfTest.java93
1 files changed, 39 insertions, 54 deletions
diff --git a/pki/base/common/src/com/netscape/cms/selftests/ASelfTest.java b/pki/base/common/src/com/netscape/cms/selftests/ASelfTest.java
index df7f02bc..bc9a5b75 100644
--- a/pki/base/common/src/com/netscape/cms/selftests/ASelfTest.java
+++ b/pki/base/common/src/com/netscape/cms/selftests/ASelfTest.java
@@ -20,7 +20,6 @@
package com.netscape.cms.selftests;
-
///////////////////////
// import statements //
///////////////////////
@@ -37,7 +36,6 @@ import com.netscape.certsrv.selftests.ESelfTestException;
import com.netscape.certsrv.selftests.ISelfTest;
import com.netscape.certsrv.selftests.ISelfTestSubsystem;
-
//////////////////////
// class definition //
//////////////////////
@@ -50,17 +48,14 @@ import com.netscape.certsrv.selftests.ISelfTestSubsystem;
* @author thomask
* @version $Revision$, $Date$
*/
-public abstract class ASelfTest
- implements ISelfTest {
- ////////////////////////
+public abstract class ASelfTest implements ISelfTest {
+ // //////////////////////
// default parameters //
- ////////////////////////
-
-
+ // //////////////////////
- //////////////////////////
+ // ////////////////////////
// ISelfTest parameters //
- //////////////////////////
+ // ////////////////////////
// parameter information
private static final String SELF_TEST_NAME = "ASelfTest";
@@ -71,34 +66,29 @@ public abstract class ASelfTest
protected IConfigStore mConfig = null;
protected String mPrefix = null;
- /////////////////////
+ // ///////////////////
// default methods //
- /////////////////////
+ // ///////////////////
-
-
- ///////////////////////
+ // /////////////////////
// ISelfTest methods //
- ///////////////////////
+ // /////////////////////
/**
- * Initializes this subsystem with the configuration store
- * associated with this instance name.
+ * Initializes this subsystem with the configuration store associated with
+ * this instance name.
* <P>
- *
+ *
* @param subsystem the associated subsystem
- * @param instanceName the name of this self test instance
+ * @param instanceName the name of this self test instance
* @param parameters configuration store (self test parameters)
* @exception EDuplicateSelfTestException subsystem has duplicate name/value
* @exception EInvalidSelfTestException subsystem has invalid name/value
* @exception EMissingSelfTestException subsystem has missing name/value
*/
- public void initSelfTest(ISelfTestSubsystem subsystem,
- String instanceName,
- IConfigStore parameters)
- throws EDuplicateSelfTestException,
- EInvalidSelfTestException,
- EMissingSelfTestException {
+ public void initSelfTest(ISelfTestSubsystem subsystem, String instanceName,
+ IConfigStore parameters) throws EDuplicateSelfTestException,
+ EInvalidSelfTestException, EMissingSelfTestException {
// store individual self test class values for this instance
mSelfTestSubsystem = (ISelfTestSubsystem) subsystem;
@@ -107,10 +97,9 @@ public abstract class ASelfTest
if (instanceName != null) {
instanceName = instanceName.trim();
} else {
- mSelfTestSubsystem.log(mSelfTestSubsystem.getSelfTestLogger(),
- CMS.getLogMessage(
- "SELFTESTS_PARAMETER_WAS_NULL",
- SELF_TEST_NAME));
+ mSelfTestSubsystem.log(mSelfTestSubsystem.getSelfTestLogger(), CMS
+ .getLogMessage("SELFTESTS_PARAMETER_WAS_NULL",
+ SELF_TEST_NAME));
throw new EMissingSelfTestException();
}
@@ -123,15 +112,13 @@ public abstract class ASelfTest
mConfig = parameters.getSubStore(pluginPath);
- if ((mConfig != null) &&
- (mConfig.getName() != null) &&
- (mConfig.getName() != "")) {
+ if ((mConfig != null) && (mConfig.getName() != null)
+ && (mConfig.getName() != "")) {
mPrefix = mConfig.getName().trim();
} else {
- mSelfTestSubsystem.log(mSelfTestSubsystem.getSelfTestLogger(),
- CMS.getLogMessage(
- "SELFTESTS_PARAMETER_WAS_NULL",
- SELF_TEST_NAME));
+ mSelfTestSubsystem.log(mSelfTestSubsystem.getSelfTestLogger(), CMS
+ .getLogMessage("SELFTESTS_PARAMETER_WAS_NULL",
+ SELF_TEST_NAME));
throw new EMissingSelfTestException();
}
@@ -142,24 +129,23 @@ public abstract class ASelfTest
/**
* Notifies this subsystem if it is in execution mode.
* <P>
- *
+ *
* @exception ESelfTestException failed to start
*/
- public abstract void startupSelfTest()
- throws ESelfTestException;
+ public abstract void startupSelfTest() throws ESelfTestException;
/**
- * Stops this subsystem. The subsystem may call shutdownSelfTest
- * anytime after initialization.
+ * Stops this subsystem. The subsystem may call shutdownSelfTest anytime
+ * after initialization.
* <P>
*/
public abstract void shutdownSelfTest();
/**
- * Returns the name associated with this self test. This method may
- * return null if the self test has not been intialized.
+ * Returns the name associated with this self test. This method may return
+ * null if the self test has not been intialized.
* <P>
- *
+ *
* @return instanceName of this self test
*/
public String getSelfTestName() {
@@ -167,10 +153,10 @@ public abstract class ASelfTest
}
/**
- * Returns the root configuration storage (self test parameters)
- * associated with this subsystem.
+ * Returns the root configuration storage (self test parameters) associated
+ * with this subsystem.
* <P>
- *
+ *
* @return configuration store (self test parameters) of this subsystem
*/
public IConfigStore getSelfTestConfigStore() {
@@ -178,10 +164,10 @@ public abstract class ASelfTest
}
/**
- * Retrieves description associated with an individual self test.
- * This method may return null.
+ * Retrieves description associated with an individual self test. This
+ * method may return null.
* <P>
- *
+ *
* @param locale locale of the client that requests the description
* @return description of self test
*/
@@ -190,11 +176,10 @@ public abstract class ASelfTest
/**
* Execute an individual self test.
* <P>
- *
+ *
* @param logger specifies logging subsystem
* @exception ESelfTestException self test exception
*/
public abstract void runSelfTest(ILogEventListener logger)
- throws ESelfTestException;
+ throws ESelfTestException;
}
-