summaryrefslogtreecommitdiffstats
path: root/pki/base/common/src/com/netscape/certsrv/selftests
diff options
context:
space:
mode:
Diffstat (limited to 'pki/base/common/src/com/netscape/certsrv/selftests')
-rw-r--r--pki/base/common/src/com/netscape/certsrv/selftests/EDuplicateSelfTestException.java103
-rw-r--r--pki/base/common/src/com/netscape/certsrv/selftests/EInvalidSelfTestException.java103
-rw-r--r--pki/base/common/src/com/netscape/certsrv/selftests/EMissingSelfTestException.java105
-rw-r--r--pki/base/common/src/com/netscape/certsrv/selftests/ESelfTestException.java73
-rw-r--r--pki/base/common/src/com/netscape/certsrv/selftests/ISelfTest.java67
-rw-r--r--pki/base/common/src/com/netscape/certsrv/selftests/ISelfTestSubsystem.java253
-rw-r--r--pki/base/common/src/com/netscape/certsrv/selftests/SelfTestResources.java2
7 files changed, 319 insertions, 387 deletions
diff --git a/pki/base/common/src/com/netscape/certsrv/selftests/EDuplicateSelfTestException.java b/pki/base/common/src/com/netscape/certsrv/selftests/EDuplicateSelfTestException.java
index d0f6b4c3..1ace7097 100644
--- a/pki/base/common/src/com/netscape/certsrv/selftests/EDuplicateSelfTestException.java
+++ b/pki/base/common/src/com/netscape/certsrv/selftests/EDuplicateSelfTestException.java
@@ -20,38 +20,33 @@
package com.netscape.certsrv.selftests;
-
///////////////////////
// import statements //
///////////////////////
-
-
//////////////////////
// class definition //
//////////////////////
/**
* This class implements a duplicate self test exception.
- * EDuplicateSelfTestExceptions are derived from ESelfTestExceptions
- * in order to allow users to easily do self tests without try-catch clauses.
- *
+ * EDuplicateSelfTestExceptions are derived from ESelfTestExceptions in order to
+ * allow users to easily do self tests without try-catch clauses.
+ *
* EDuplicateSelfTestExceptions should be caught by SelfTestSubsystem managers.
* <P>
*
* @version $Revision$, $Date$
*/
public class EDuplicateSelfTestException
- extends ESelfTestException {
- ////////////////////////
+ extends ESelfTestException {
+ // //////////////////////
// default parameters //
- ////////////////////////
-
-
+ // //////////////////////
- ///////////////////////
+ // /////////////////////
// helper parameters //
- ///////////////////////
+ // /////////////////////
/**
*
@@ -62,32 +57,28 @@ public class EDuplicateSelfTestException
private String mInstanceParameter = null;
private String mInstanceValue = null;
- ////////////////////////////////////////////
+ // //////////////////////////////////////////
// EDuplicateSelfTestException parameters //
- ////////////////////////////////////////////
+ // //////////////////////////////////////////
-
-
- ///////////////////////////////////////////////
+ // /////////////////////////////////////////////
// ESelfTestException parameters (inherited) //
- ///////////////////////////////////////////////
-
+ // /////////////////////////////////////////////
-
- /////////////////////
+ // ///////////////////
// default methods //
- /////////////////////
+ // ///////////////////
/**
* Constructs a "duplicate" self test exception.
* <P>
- *
+ *
* @param instanceName duplicate "instanceName" exception details
*/
public EDuplicateSelfTestException(String instanceName) {
super("The self test plugin property named "
- + instanceName
- + " already exists.");
+ + instanceName
+ + " already exists.");
// strip preceding/trailing whitespace
// from passed-in String parameters
@@ -100,20 +91,20 @@ public class EDuplicateSelfTestException
}
/**
- * Constructs a "duplicate" self test exception where the value is always
- * a duplicate from a name/value pair
+ * Constructs a "duplicate" self test exception where the value is always a
+ * duplicate from a name/value pair
* <P>
- *
+ *
* @param instanceName duplicate "instanceName" exception details
* @param instanceValue duplicate "instanceValue" exception details
*/
public EDuplicateSelfTestException(String instanceName,
- String instanceValue) {
+ String instanceValue) {
super("The self test plugin property named "
- + instanceName
- + " contains a value of "
- + instanceValue
- + " which already exists.");
+ + instanceName
+ + " contains a value of "
+ + instanceValue
+ + " which already exists.");
// strip preceding/trailing whitespace
// from passed-in String parameters
@@ -134,18 +125,18 @@ public class EDuplicateSelfTestException
* duplicate from a substore.parameter/value pair; (the value passed in may
* be null).
* <P>
- *
+ *
* @param instanceStore duplicate "instanceStore" exception details
* @param instanceParameter duplicate "instanceParameter" exception details
- * @param instanceValue duplicate "instanceValue" exception details
- * (may be null)
+ * @param instanceValue duplicate "instanceValue" exception details (may be
+ * null)
*/
public EDuplicateSelfTestException(String instanceStore,
- String instanceParameter,
- String instanceValue) {
+ String instanceParameter,
+ String instanceValue) {
super("The self test plugin property named "
- + instanceStore + "." + instanceParameter
- + " is a duplicate.");
+ + instanceStore + "." + instanceParameter
+ + " is a duplicate.");
// strip preceding/trailing whitespace
// from passed-in String parameters
@@ -165,14 +156,14 @@ public class EDuplicateSelfTestException
mInstanceValue = instanceValue;
}
- ////////////////////
+ // //////////////////
// helper methods //
- ////////////////////
+ // //////////////////
/**
* Returns the instance name associated with this self test.
* <P>
- *
+ *
* @return name portion of the name/value pair
*/
public String getInstanceName() {
@@ -182,7 +173,7 @@ public class EDuplicateSelfTestException
/**
* Returns the store associated with this self test.
* <P>
- *
+ *
* @return substore portion of the substore.parameter/value pair
*/
public String getInstanceStore() {
@@ -192,7 +183,7 @@ public class EDuplicateSelfTestException
/**
* Returns the parameter associated with this self test.
* <P>
- *
+ *
* @return parameter portion of the substore.parameter/value pair
*/
public String getInstanceParameter() {
@@ -202,27 +193,25 @@ public class EDuplicateSelfTestException
/**
* Returns the value associated with this self test.
* <P>
- *
+ *
* @return value portion of the name/value pair
*/
public String getInstanceValue() {
return mInstanceValue;
}
- /////////////////////////////////////////
+ // ///////////////////////////////////////
// EDuplicateSelfTestException methods //
- /////////////////////////////////////////
-
-
+ // ///////////////////////////////////////
- ////////////////////////////////////////////
+ // //////////////////////////////////////////
// ESelfTestException methods (inherited) //
- ////////////////////////////////////////////
+ // //////////////////////////////////////////
- /* Note that all of the following ESelfTestException methods
- * are inherited from the ESelfTestException class:
- *
+ /*
+ * Note that all of the following ESelfTestException methods are inherited
+ * from the ESelfTestException class:
+ *
* public ESelfTestException( String msg );
*/
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/selftests/EInvalidSelfTestException.java b/pki/base/common/src/com/netscape/certsrv/selftests/EInvalidSelfTestException.java
index 11907695..c8b40c66 100644
--- a/pki/base/common/src/com/netscape/certsrv/selftests/EInvalidSelfTestException.java
+++ b/pki/base/common/src/com/netscape/certsrv/selftests/EInvalidSelfTestException.java
@@ -20,38 +20,33 @@
package com.netscape.certsrv.selftests;
-
///////////////////////
// import statements //
///////////////////////
-
-
//////////////////////
// class definition //
//////////////////////
/**
* This class implements an invalid self test exception.
- * EInvalidSelfTestExceptions are derived from ESelfTestExceptions
- * in order to allow users to easily do self tests without try-catch clauses.
- *
+ * EInvalidSelfTestExceptions are derived from ESelfTestExceptions in order to
+ * allow users to easily do self tests without try-catch clauses.
+ *
* EInvalidSelfTestExceptions should be caught by SelfTestSubsystem managers.
* <P>
*
* @version $Revision$, $Date$
*/
public class EInvalidSelfTestException
- extends ESelfTestException {
- ////////////////////////
+ extends ESelfTestException {
+ // //////////////////////
// default parameters //
- ////////////////////////
-
-
+ // //////////////////////
- ///////////////////////
+ // /////////////////////
// helper parameters //
- ///////////////////////
+ // /////////////////////
/**
*
@@ -62,32 +57,28 @@ public class EInvalidSelfTestException
private String mInstanceParameter = null;
private String mInstanceValue = null;
- //////////////////////////////////////////
+ // ////////////////////////////////////////
// EInvalidSelfTestException parameters //
- //////////////////////////////////////////
+ // ////////////////////////////////////////
-
-
- ///////////////////////////////////////////////
+ // /////////////////////////////////////////////
// ESelfTestException parameters (inherited) //
- ///////////////////////////////////////////////
-
+ // /////////////////////////////////////////////
-
- /////////////////////
+ // ///////////////////
// default methods //
- /////////////////////
+ // ///////////////////
/**
* Constructs an "invalid" self test exception.
* <P>
- *
+ *
* @param instanceName invalid "instanceName" exception details
*/
public EInvalidSelfTestException(String instanceName) {
super("The self test plugin named "
- + instanceName
- + " is invalid.");
+ + instanceName
+ + " is invalid.");
// strip preceding/trailing whitespace
// from passed-in String parameters
@@ -103,17 +94,17 @@ public class EInvalidSelfTestException
* Constructs a "invalid" self test exception where the value is always
* invalid from a name/value pair
* <P>
- *
+ *
* @param instanceName invalid "instanceName" exception details
* @param instanceValue invalid "instanceValue" exception details
*/
public EInvalidSelfTestException(String instanceName,
- String instanceValue) {
+ String instanceValue) {
super("The self test plugin named "
- + instanceName
- + " contains a value "
- + instanceValue
- + " which is invalid.");
+ + instanceName
+ + " contains a value "
+ + instanceValue
+ + " which is invalid.");
// strip preceding/trailing whitespace
// from passed-in String parameters
@@ -131,21 +122,21 @@ public class EInvalidSelfTestException
/**
* Constructs an "invalid" self test exception where the parameter is always
- * invalid from a substore.parameter/value pair; (the value passed in may
- * be null).
+ * invalid from a substore.parameter/value pair; (the value passed in may be
+ * null).
* <P>
- *
+ *
* @param instanceStore invalid "instanceStore" exception details
* @param instanceParameter invalid "instanceParameter" exception details
- * @param instanceValue invalid "instanceValue" exception details
- * (may be null)
+ * @param instanceValue invalid "instanceValue" exception details (may be
+ * null)
*/
public EInvalidSelfTestException(String instanceStore,
- String instanceParameter,
- String instanceValue) {
+ String instanceParameter,
+ String instanceValue) {
super("The self test plugin parameter named "
- + instanceStore + "." + instanceParameter
- + " is invalid.");
+ + instanceStore + "." + instanceParameter
+ + " is invalid.");
// strip preceding/trailing whitespace
// from passed-in String parameters
@@ -165,14 +156,14 @@ public class EInvalidSelfTestException
mInstanceValue = instanceValue;
}
- ////////////////////
+ // //////////////////
// helper methods //
- ////////////////////
+ // //////////////////
/**
* Returns the instance name associated with this self test.
* <P>
- *
+ *
* @return name portion of the name/value pair
*/
public String getInstanceName() {
@@ -182,7 +173,7 @@ public class EInvalidSelfTestException
/**
* Returns the store associated with this self test.
* <P>
- *
+ *
* @return substore portion of the substore.parameter/value pair
*/
public String getInstanceStore() {
@@ -192,7 +183,7 @@ public class EInvalidSelfTestException
/**
* Returns the parameter associated with this self test.
* <P>
- *
+ *
* @return parameter portion of the substore.parameter/value pair
*/
public String getInstanceParameter() {
@@ -202,27 +193,25 @@ public class EInvalidSelfTestException
/**
* Returns the value associated with this self test.
* <P>
- *
+ *
* @return value portion of the name/value pair
*/
public String getInstanceValue() {
return mInstanceValue;
}
- ///////////////////////////////////////
+ // /////////////////////////////////////
// EInvalidSelfTestException methods //
- ///////////////////////////////////////
-
-
+ // /////////////////////////////////////
- ////////////////////////////////////////////
+ // //////////////////////////////////////////
// ESelfTestException methods (inherited) //
- ////////////////////////////////////////////
+ // //////////////////////////////////////////
- /* Note that all of the following ESelfTestException methods
- * are inherited from the ESelfTestException class:
- *
+ /*
+ * Note that all of the following ESelfTestException methods are inherited
+ * from the ESelfTestException class:
+ *
* public ESelfTestException( String msg );
*/
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/selftests/EMissingSelfTestException.java b/pki/base/common/src/com/netscape/certsrv/selftests/EMissingSelfTestException.java
index 88fa14cb..70876c5c 100644
--- a/pki/base/common/src/com/netscape/certsrv/selftests/EMissingSelfTestException.java
+++ b/pki/base/common/src/com/netscape/certsrv/selftests/EMissingSelfTestException.java
@@ -20,38 +20,33 @@
package com.netscape.certsrv.selftests;
-
///////////////////////
// import statements //
///////////////////////
-
-
//////////////////////
// class definition //
//////////////////////
/**
* This class implements a missing self test exception.
- * EMissingSelfTestExceptions are derived from ESelfTestExceptions
- * in order to allow users to easily do self tests without try-catch clauses.
- *
+ * EMissingSelfTestExceptions are derived from ESelfTestExceptions in order to
+ * allow users to easily do self tests without try-catch clauses.
+ *
* EMissingSelfTestExceptions should be caught by SelfTestSubsystem managers.
* <P>
*
* @version $Revision$, $Date$
*/
public class EMissingSelfTestException
- extends ESelfTestException {
- ////////////////////////
+ extends ESelfTestException {
+ // //////////////////////
// default parameters //
- ////////////////////////
-
-
+ // //////////////////////
- ///////////////////////
+ // /////////////////////
// helper parameters //
- ///////////////////////
+ // /////////////////////
/**
*
@@ -62,26 +57,22 @@ public class EMissingSelfTestException
private String mInstanceParameter = null;
private String mInstanceValue = null;
- //////////////////////////////////////////
+ // ////////////////////////////////////////
// EMissingSelfTestException parameters //
- //////////////////////////////////////////
+ // ////////////////////////////////////////
-
-
- ///////////////////////////////////////////////
+ // /////////////////////////////////////////////
// ESelfTestException parameters (inherited) //
- ///////////////////////////////////////////////
-
+ // /////////////////////////////////////////////
-
- /////////////////////
+ // ///////////////////
// default methods //
- /////////////////////
+ // ///////////////////
/**
* Constructs a "missing" self test exception where the name is null
* <P>
- *
+ *
*/
public EMissingSelfTestException() {
super("The self test plugin property name is null.");
@@ -91,13 +82,13 @@ public class EMissingSelfTestException
* Constructs a "missing" self test exception where the name is always
* missing from a name/value pair.
* <P>
- *
+ *
* @param instanceName missing "instanceName" exception details
*/
public EMissingSelfTestException(String instanceName) {
super("The self test plugin property named "
- + instanceName
- + " does not exist.");
+ + instanceName
+ + " does not exist.");
// strip preceding/trailing whitespace
// from passed-in String parameters
@@ -113,16 +104,16 @@ public class EMissingSelfTestException
* Constructs a "missing" self test exception where the value is always
* missing from a name/value pair; (the value passed in is always null).
* <P>
- *
+ *
* @param instanceName missing "instanceName" exception details
- * @param instanceValue missing "instanceValue" exception details
- * (always null)
+ * @param instanceValue missing "instanceValue" exception details (always
+ * null)
*/
public EMissingSelfTestException(String instanceName,
- String instanceValue) {
+ String instanceValue) {
super("The self test plugin property named "
- + instanceName
- + " contains no values.");
+ + instanceName
+ + " contains no values.");
// strip preceding/trailing whitespace
// from passed-in String parameters
@@ -140,21 +131,21 @@ public class EMissingSelfTestException
/**
* Constructs a "missing" self test exception where the parameter is always
- * missing from a substore.parameter/value pair; (the value passed in may
- * be null).
+ * missing from a substore.parameter/value pair; (the value passed in may be
+ * null).
* <P>
- *
+ *
* @param instanceStore missing "instanceStore" exception details
* @param instanceParameter missing "instanceParameter" exception details
- * @param instanceValue missing "instanceValue" exception details
- * (may be null)
+ * @param instanceValue missing "instanceValue" exception details (may be
+ * null)
*/
public EMissingSelfTestException(String instanceStore,
- String instanceParameter,
- String instanceValue) {
+ String instanceParameter,
+ String instanceValue) {
super("The self test plugin property named "
- + instanceStore + "." + instanceParameter
- + " is missing.");
+ + instanceStore + "." + instanceParameter
+ + " is missing.");
// strip preceding/trailing whitespace
// from passed-in String parameters
@@ -174,14 +165,14 @@ public class EMissingSelfTestException
mInstanceValue = instanceValue;
}
- ////////////////////
+ // //////////////////
// helper methods //
- ////////////////////
+ // //////////////////
/**
* Returns the instance name associated with this self test.
* <P>
- *
+ *
* @return name portion of the name/value pair
*/
public String getInstanceName() {
@@ -191,7 +182,7 @@ public class EMissingSelfTestException
/**
* Returns the store associated with this self test.
* <P>
- *
+ *
* @return substore portion of the substore.parameter/value pair
*/
public String getInstanceStore() {
@@ -201,7 +192,7 @@ public class EMissingSelfTestException
/**
* Returns the parameter associated with this self test.
* <P>
- *
+ *
* @return parameter portion of the substore.parameter/value pair
*/
public String getInstanceParameter() {
@@ -211,27 +202,25 @@ public class EMissingSelfTestException
/**
* Returns the value associated with this self test.
* <P>
- *
+ *
* @return value portion of the name/value pair
*/
public String getInstanceValue() {
return mInstanceValue;
}
- ///////////////////////////////////////
+ // /////////////////////////////////////
// EMissingSelfTestException methods //
- ///////////////////////////////////////
-
-
+ // /////////////////////////////////////
- ////////////////////////////////////////////
+ // //////////////////////////////////////////
// ESelfTestException methods (inherited) //
- ////////////////////////////////////////////
+ // //////////////////////////////////////////
- /* Note that all of the following ESelfTestException methods
- * are inherited from the ESelfTestException class:
- *
+ /*
+ * Note that all of the following ESelfTestException methods are inherited
+ * from the ESelfTestException class:
+ *
* public ESelfTestException( String msg );
*/
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/selftests/ESelfTestException.java b/pki/base/common/src/com/netscape/certsrv/selftests/ESelfTestException.java
index e465517c..8ee7b8c0 100644
--- a/pki/base/common/src/com/netscape/certsrv/selftests/ESelfTestException.java
+++ b/pki/base/common/src/com/netscape/certsrv/selftests/ESelfTestException.java
@@ -20,39 +20,35 @@
package com.netscape.certsrv.selftests;
-
///////////////////////
// import statements //
///////////////////////
import com.netscape.certsrv.base.EBaseException;
-
//////////////////////
// class definition //
//////////////////////
/**
- * This class implements a self test exception. ESelfTestExceptions
- * are derived from EBaseExceptions in order to allow users
- * to easily do self tests without try-catch clauses.
- *
+ * This class implements a self test exception. ESelfTestExceptions are derived
+ * from EBaseExceptions in order to allow users to easily do self tests without
+ * try-catch clauses.
+ *
* ESelfTestExceptions should be caught by SelfTestSubsystem managers.
* <P>
*
* @version $Revision$, $Date$
*/
public class ESelfTestException
- extends EBaseException {
- ////////////////////////
+ extends EBaseException {
+ // //////////////////////
// default parameters //
- ////////////////////////
-
-
+ // //////////////////////
- ///////////////////////////////////
+ // /////////////////////////////////
// ESelfTestException parameters //
- ///////////////////////////////////
+ // /////////////////////////////////
/**
*
@@ -60,68 +56,65 @@ public class ESelfTestException
private static final long serialVersionUID = -8001373369705595891L;
private static final String SELFTEST_RESOURCES = SelfTestResources.class.getName();
-
- ///////////////////////////////////////////
+ // /////////////////////////////////////////
// EBaseException parameters (inherited) //
- ///////////////////////////////////////////
+ // /////////////////////////////////////////
- /* Note that all of the following EBaseException parameters
- * are inherited from the EBaseException class:
- *
+ /*
+ * Note that all of the following EBaseException parameters are inherited
+ * from the EBaseException class:
+ *
* public Object mParams[];
*/
-
-
- /////////////////////
+ // ///////////////////
// default methods //
- /////////////////////
+ // ///////////////////
/**
* Constructs a self test exception.
* <P>
- *
+ *
* @param msg exception details
*/
public ESelfTestException(String msg) {
super(msg);
}
-
- ////////////////////////////////
+ // //////////////////////////////
// ESelfTestException methods //
- ////////////////////////////////
+ // //////////////////////////////
/**
* Returns the bundle file name.
* <P>
+ *
* @return name of bundle class associated with this exception.
*/
protected String getBundleName() {
return SELFTEST_RESOURCES;
}
-
- ////////////////////////////////////////
+ // //////////////////////////////////////
// EBaseException methods (inherited) //
- ////////////////////////////////////////
+ // //////////////////////////////////////
- /* Note that all of the following EBaseException methods
- * are inherited from the EBaseException class:
- *
+ /*
+ * Note that all of the following EBaseException methods are inherited from
+ * the EBaseException class:
+ *
* public EBaseException( String msgFormat );
- *
+ *
* public EBaseException( String msgFormat, String param );
- *
+ *
* public EBaseException( String msgFormat, Exception param );
- *
+ *
* public EBaseException( String msgFormat, Object params[] );
- *
+ *
* public Object[] getParameters();
- *
+ *
* public String toString();
- *
+ *
* public String toString( Locale locale );
*/
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/selftests/ISelfTest.java b/pki/base/common/src/com/netscape/certsrv/selftests/ISelfTest.java
index f881a285..357544f7 100644
--- a/pki/base/common/src/com/netscape/certsrv/selftests/ISelfTest.java
+++ b/pki/base/common/src/com/netscape/certsrv/selftests/ISelfTest.java
@@ -20,7 +20,6 @@
package com.netscape.certsrv.selftests;
-
///////////////////////
// import statements //
///////////////////////
@@ -30,7 +29,6 @@ import java.util.Locale;
import com.netscape.certsrv.base.IConfigStore;
import com.netscape.certsrv.logging.ILogEventListener;
-
//////////////////////
// class definition //
//////////////////////
@@ -42,86 +40,82 @@ import com.netscape.certsrv.logging.ILogEventListener;
* @version $Revision$, $Date$
*/
public interface ISelfTest {
- ////////////////////////
+ // //////////////////////
// default parameters //
- ////////////////////////
-
-
+ // //////////////////////
- //////////////////////////
+ // ////////////////////////
// ISelfTest parameters //
- //////////////////////////
+ // ////////////////////////
public static final String PROP_PLUGIN = "plugin";
- /////////////////////
+ // ///////////////////
// 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,
+ String instanceName,
+ IConfigStore parameters)
+ throws EDuplicateSelfTestException,
EInvalidSelfTestException,
EMissingSelfTestException;
/**
* Notifies this subsystem if it is in execution mode.
* <P>
- *
+ *
* @exception ESelfTestException failed to start
*/
public void startupSelfTest()
- throws ESelfTestException;
+ 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 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();
/**
- * 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();
/**
- * 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
*/
@@ -130,11 +124,10 @@ public interface ISelfTest {
/**
* Execute an individual self test.
* <P>
- *
+ *
* @param logger specifies logging subsystem
* @exception ESelfTestException self test exception
*/
public void runSelfTest(ILogEventListener logger)
- throws ESelfTestException;
+ throws ESelfTestException;
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/selftests/ISelfTestSubsystem.java b/pki/base/common/src/com/netscape/certsrv/selftests/ISelfTestSubsystem.java
index 3391bdd1..392a80e5 100644
--- a/pki/base/common/src/com/netscape/certsrv/selftests/ISelfTestSubsystem.java
+++ b/pki/base/common/src/com/netscape/certsrv/selftests/ISelfTestSubsystem.java
@@ -20,7 +20,6 @@
package com.netscape.certsrv.selftests;
-
///////////////////////
// import statements //
///////////////////////
@@ -28,7 +27,6 @@ package com.netscape.certsrv.selftests;
import com.netscape.certsrv.base.ISubsystem;
import com.netscape.certsrv.logging.ILogEventListener;
-
//////////////////////
// class definition //
//////////////////////
@@ -40,16 +38,14 @@ import com.netscape.certsrv.logging.ILogEventListener;
* @version $Revision$, $Date$
*/
public interface ISelfTestSubsystem
- extends ISubsystem {
- ////////////////////////
+ extends ISubsystem {
+ // //////////////////////
// default parameters //
- ////////////////////////
-
+ // //////////////////////
-
- //////////////////////////////////
+ // ////////////////////////////////
// ISelfTestSubsystem constants //
- //////////////////////////////////
+ // ////////////////////////////////
public static final String ID = "selftests";
public static final String PROP_CONTAINER = "container";
@@ -60,21 +56,17 @@ public interface ISelfTestSubsystem
public static final String PROP_ON_DEMAND = "onDemand";
public static final String PROP_STARTUP = "startup";
- ///////////////////////////////////////
+ // /////////////////////////////////////
// ISubsystem parameters (inherited) //
- ///////////////////////////////////////
-
+ // /////////////////////////////////////
-
- /////////////////////
+ // ///////////////////
// default methods //
- /////////////////////
-
+ // ///////////////////
-
- ////////////////////////////////
+ // //////////////////////////////
// ISelfTestSubsystem methods //
- ////////////////////////////////
+ // //////////////////////////////
//
// methods associated with the list of on demand self tests
@@ -84,7 +76,7 @@ public interface ISelfTestSubsystem
* List the instance names of all the self tests enabled to run on demand
* (in execution order); may return null.
* <P>
- *
+ *
* @return list of self test instance names run on demand
*/
public String[] listSelfTestsEnabledOnDemand();
@@ -92,72 +84,70 @@ public interface ISelfTestSubsystem
/**
* Enable the specified self test to be executed on demand.
* <P>
- *
+ *
* @param instanceName instance name of self test
- * @param isCritical isCritical is either a critical failure (true) or
- * a non-critical failure (false)
+ * @param isCritical isCritical is either a critical failure (true) or a
+ * non-critical failure (false)
* @exception EInvalidSelfTestException subsystem has invalid name/value
* @exception EMissingSelfTestException subsystem has missing name/value
*/
- // public void enableSelfTestOnDemand( String instanceName,
- // boolean isCritical )
- // throws EInvalidSelfTestException, EMissingSelfTestException;
-
+ // public void enableSelfTestOnDemand( String instanceName,
+ // boolean isCritical )
+ // throws EInvalidSelfTestException, EMissingSelfTestException;
/**
* Disable the specified self test from being able to be executed on demand.
* <P>
- *
+ *
* @param instanceName instance name of self test
* @exception EMissingSelfTestException subsystem has missing name
*/
- // public void disableSelfTestOnDemand( String instanceName )
- // throws EMissingSelfTestException;
-
+ // public void disableSelfTestOnDemand( String instanceName )
+ // throws EMissingSelfTestException;
/**
* Determine if the specified self test is enabled to be executed on demand.
* <P>
- *
+ *
* @param instanceName instance name of self test
* @return true if the specified self test is enabled on demand
* @exception EMissingSelfTestException subsystem has missing name
*/
public boolean isSelfTestEnabledOnDemand(String instanceName)
- throws EMissingSelfTestException;
+ throws EMissingSelfTestException;
/**
- * Determine if failure of the specified self test is fatal when
- * it is executed on demand.
+ * Determine if failure of the specified self test is fatal when it is
+ * executed on demand.
* <P>
- *
+ *
* @param instanceName instance name of self test
- * @return true if failure of the specified self test is fatal when
- * it is executed on demand
+ * @return true if failure of the specified self test is fatal when it is
+ * executed on demand
* @exception EMissingSelfTestException subsystem has missing name
*/
public boolean isSelfTestCriticalOnDemand(String instanceName)
- throws EMissingSelfTestException;
+ throws EMissingSelfTestException;
/**
* Execute all self tests specified to be run on demand.
* <P>
- *
+ *
* @exception EMissingSelfTestException subsystem has missing name
* @exception ESelfTestException self test exception
*/
public void runSelfTestsOnDemand()
- throws EMissingSelfTestException, ESelfTestException;
+ throws EMissingSelfTestException, ESelfTestException;
//
// methods associated with the list of startup self tests
//
/**
- * List the instance names of all the self tests enabled to run
- * at server startup (in execution order); may return null.
+ * List the instance names of all the self tests enabled to run at server
+ * startup (in execution order); may return null.
* <P>
- *
+ *
* @return list of self test instance names run at server startup
*/
public String[] listSelfTestsEnabledAtStartup();
@@ -165,73 +155,71 @@ public interface ISelfTestSubsystem
/**
* Enable the specified self test at server startup.
* <P>
- *
+ *
* @param instanceName instance name of self test
- * @param isCritical isCritical is either a critical failure (true) or
- * a non-critical failure (false)
+ * @param isCritical isCritical is either a critical failure (true) or a
+ * non-critical failure (false)
* @exception EInvalidSelfTestException subsystem has invalid name/value
* @exception EMissingSelfTestException subsystem has missing name/value
*/
- // public void enableSelfTestAtStartup( String instanceName,
- // boolean isCritical )
- // throws EInvalidSelfTestException, EMissingSelfTestException;
-
+ // public void enableSelfTestAtStartup( String instanceName,
+ // boolean isCritical )
+ // throws EInvalidSelfTestException, EMissingSelfTestException;
/**
* Disable the specified self test at server startup.
* <P>
- *
+ *
* @param instanceName instance name of self test
* @exception EMissingSelfTestException subsystem has missing name
*/
- // public void disableSelfTestAtStartup( String instanceName )
- // throws EMissingSelfTestException;
-
+ // public void disableSelfTestAtStartup( String instanceName )
+ // throws EMissingSelfTestException;
/**
- * Determine if the specified self test is executed automatically
- * at server startup.
+ * Determine if the specified self test is executed automatically at server
+ * startup.
* <P>
- *
+ *
* @param instanceName instance name of self test
* @return true if the specified self test is executed at server startup
* @exception EMissingSelfTestException subsystem has missing name
*/
public boolean isSelfTestEnabledAtStartup(String instanceName)
- throws EMissingSelfTestException;
+ throws EMissingSelfTestException;
/**
- * Determine if failure of the specified self test is fatal to
- * server startup.
+ * Determine if failure of the specified self test is fatal to server
+ * startup.
* <P>
- *
+ *
* @param instanceName instance name of self test
- * @return true if failure of the specified self test is fatal to
- * server startup
+ * @return true if failure of the specified self test is fatal to server
+ * startup
* @exception EMissingSelfTestException subsystem has missing name
*/
public boolean isSelfTestCriticalAtStartup(String instanceName)
- throws EMissingSelfTestException;
+ throws EMissingSelfTestException;
/**
* Execute all self tests specified to be run at server startup.
* <P>
- *
+ *
* @exception EMissingSelfTestException subsystem has missing name
* @exception ESelfTestException self test exception
*/
public void runSelfTestsAtStartup()
- throws EMissingSelfTestException, ESelfTestException;
+ throws EMissingSelfTestException, ESelfTestException;
//
// methods associated with the list of self test instances
//
/**
- * Retrieve an individual self test from the instances list
- * given its instance name.
+ * Retrieve an individual self test from the instances list given its
+ * instance name.
* <P>
- *
+ *
* @param instanceName instance name of self test
* @return individual self test
*/
@@ -242,10 +230,10 @@ public interface ISelfTestSubsystem
//
/**
- * Returns the ILogEventListener of this subsystem.
- * This method may return null.
+ * Returns the ILogEventListener of this subsystem. This method may return
+ * null.
* <P>
- *
+ *
* @return ILogEventListener of this subsystem
*/
public ILogEventListener getSelfTestLogger();
@@ -253,104 +241,97 @@ public interface ISelfTestSubsystem
/**
* This method represents the log interface for the self test subsystem.
* <P>
- *
+ *
* @param logger log event listener
* @param msg self test log message
*/
public void log(ILogEventListener logger, String msg);
/**
- * Register an individual self test on the instances list AND
- * on the "on demand" list (note that the specified self test
- * will be appended to the end of each list).
+ * Register an individual self test on the instances list AND on the
+ * "on demand" list (note that the specified self test will be appended to
+ * the end of each list).
* <P>
- *
+ *
* @param instanceName instance name of self test
- * @param isCritical isCritical is either a critical failure (true) or
- * a non-critical failure (false)
+ * @param isCritical isCritical is either a critical failure (true) or a
+ * non-critical failure (false)
* @param instance individual self test
* @exception EDuplicateSelfTestException subsystem has duplicate name
* @exception EInvalidSelfTestException subsystem has invalid name/value
* @exception EMissingSelfTestException subsystem has missing name/value
*/
- // public void registerSelfTestOnDemand( String instanceName,
- // boolean isCritical,
- // ISelfTest instance )
- // throws EDuplicateSelfTestException,
- // EInvalidSelfTestException,
- // EMissingSelfTestException;
-
+ // public void registerSelfTestOnDemand( String instanceName,
+ // boolean isCritical,
+ // ISelfTest instance )
+ // throws EDuplicateSelfTestException,
+ // EInvalidSelfTestException,
+ // EMissingSelfTestException;
/**
- * Deregister an individual self test on the instances list AND
- * on the "on demand" list (note that the specified self test
- * will be removed from each list).
+ * Deregister an individual self test on the instances list AND on the
+ * "on demand" list (note that the specified self test will be removed from
+ * each list).
* <P>
- *
+ *
* @param instanceName instance name of self test
* @exception EMissingSelfTestException subsystem has missing name
*/
- // public void deregisterSelfTestOnDemand( String instanceName )
- // throws EMissingSelfTestException;
-
+ // public void deregisterSelfTestOnDemand( String instanceName )
+ // throws EMissingSelfTestException;
/**
- * Register an individual self test on the instances list AND
- * on the "startup" list (note that the specified self test
- * will be appended to the end of each list).
+ * Register an individual self test on the instances list AND on the
+ * "startup" list (note that the specified self test will be appended to the
+ * end of each list).
* <P>
- *
+ *
* @param instanceName instance name of self test
- * @param isCritical isCritical is either a critical failure (true) or
- * a non-critical failure (false)
+ * @param isCritical isCritical is either a critical failure (true) or a
+ * non-critical failure (false)
* @param instance individual self test
* @exception EDuplicateSelfTestException subsystem has duplicate name
* @exception EInvalidSelfTestException subsystem has invalid name/value
* @exception EMissingSelfTestException subsystem has missing name/value
*/
- // public void registerSelfTestAtStartup( String instanceName,
- // boolean isCritical,
- // ISelfTest instance )
- // throws EDuplicateSelfTestException,
- // EInvalidSelfTestException,
- // EMissingSelfTestException;
-
+ // public void registerSelfTestAtStartup( String instanceName,
+ // boolean isCritical,
+ // ISelfTest instance )
+ // throws EDuplicateSelfTestException,
+ // EInvalidSelfTestException,
+ // EMissingSelfTestException;
/**
- * Deregister an individual self test on the instances list AND
- * on the "startup" list (note that the specified self test
- * will be removed from each list).
+ * Deregister an individual self test on the instances list AND on the
+ * "startup" list (note that the specified self test will be removed from
+ * each list).
* <P>
- *
+ *
* @param instanceName instance name of self test
* @exception EMissingSelfTestException subsystem has missing name
*/
- // public void deregisterSelfTestAtStartup( String instanceName )
- // throws EMissingSelfTestException;
-
+ // public void deregisterSelfTestAtStartup( String instanceName )
+ // throws EMissingSelfTestException;
-
- ////////////////////////////////////
+ // //////////////////////////////////
// ISubsystem methods (inherited) //
- ////////////////////////////////////
-
- /* Note that all of the following ISubsystem methods
- * are inherited from the ISubsystem class:
- *
- * public String getId();
- *
- * public void setId( String id )
- * throws EBaseException;
- *
- * public void init( ISubsystem owner, IConfigStore config )
- * throws EBaseException;
- *
- * public void startup()
- * throws EBaseException;
- *
- * public void shutdown();
- *
- * public IConfigStore getConfigStore();
+ // //////////////////////////////////
+
+ /*
+ * Note that all of the following ISubsystem methods are inherited from the
+ * ISubsystem class:
+ *
+ * public String getId();
+ *
+ * public void setId( String id ) throws EBaseException;
+ *
+ * public void init( ISubsystem owner, IConfigStore config ) throws
+ * EBaseException;
+ *
+ * public void startup() throws EBaseException;
+ *
+ * public void shutdown();
+ *
+ * public IConfigStore getConfigStore();
*/
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/selftests/SelfTestResources.java b/pki/base/common/src/com/netscape/certsrv/selftests/SelfTestResources.java
index c396c14b..c7c4d372 100644
--- a/pki/base/common/src/com/netscape/certsrv/selftests/SelfTestResources.java
+++ b/pki/base/common/src/com/netscape/certsrv/selftests/SelfTestResources.java
@@ -17,10 +17,8 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.selftests;
-
import java.util.ListResourceBundle;
-
/**
* A class represents a resource bundle for Self Tests.
* <P>