diff options
Diffstat (limited to 'pki/base/common/src/com/netscape/certsrv/selftests')
7 files changed, 414 insertions, 317 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 dde3d64e..d0f6b4c3 100644 --- a/pki/base/common/src/com/netscape/certsrv/selftests/EDuplicateSelfTestException.java +++ b/pki/base/common/src/com/netscape/certsrv/selftests/EDuplicateSelfTestException.java @@ -20,32 +20,38 @@ 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 { - // ////////////////////// +public class EDuplicateSelfTestException + extends ESelfTestException { + //////////////////////// // default parameters // - // ////////////////////// + //////////////////////// + + - // ///////////////////// + /////////////////////// // helper parameters // - // ///////////////////// + /////////////////////// /** * @@ -56,27 +62,32 @@ public class EDuplicateSelfTestException extends ESelfTestException { 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."); + super("The self test plugin property named " + + instanceName + + " already exists."); // strip preceding/trailing whitespace // from passed-in String parameters @@ -89,17 +100,20 @@ public class EDuplicateSelfTestException extends ESelfTestException { } /** - * 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) { - super("The self test plugin property named " + instanceName - + " contains a value of " + instanceValue - + " which already exists."); + public EDuplicateSelfTestException(String instanceName, + String instanceValue) { + super("The self test plugin property named " + + instanceName + + " contains a value of " + + instanceValue + + " which already exists."); // strip preceding/trailing whitespace // from passed-in String parameters @@ -120,16 +134,18 @@ public class EDuplicateSelfTestException extends ESelfTestException { * 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) { - super("The self test plugin property named " + instanceStore + "." - + instanceParameter + " is a duplicate."); + String instanceParameter, + String instanceValue) { + super("The self test plugin property named " + + instanceStore + "." + instanceParameter + + " is a duplicate."); // strip preceding/trailing whitespace // from passed-in String parameters @@ -149,14 +165,14 @@ public class EDuplicateSelfTestException extends ESelfTestException { 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() { @@ -166,7 +182,7 @@ public class EDuplicateSelfTestException extends ESelfTestException { /** * Returns the store associated with this self test. * <P> - * + * * @return substore portion of the substore.parameter/value pair */ public String getInstanceStore() { @@ -176,7 +192,7 @@ public class EDuplicateSelfTestException extends ESelfTestException { /** * Returns the parameter associated with this self test. * <P> - * + * * @return parameter portion of the substore.parameter/value pair */ public String getInstanceParameter() { @@ -186,25 +202,27 @@ public class EDuplicateSelfTestException extends ESelfTestException { /** * 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 27457f09..11907695 100644 --- a/pki/base/common/src/com/netscape/certsrv/selftests/EInvalidSelfTestException.java +++ b/pki/base/common/src/com/netscape/certsrv/selftests/EInvalidSelfTestException.java @@ -20,32 +20,38 @@ 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 { - // ////////////////////// +public class EInvalidSelfTestException + extends ESelfTestException { + //////////////////////// // default parameters // - // ////////////////////// + //////////////////////// + + - // ///////////////////// + /////////////////////// // helper parameters // - // ///////////////////// + /////////////////////// /** * @@ -56,26 +62,32 @@ public class EInvalidSelfTestException extends ESelfTestException { 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."); + super("The self test plugin named " + + instanceName + + " is invalid."); // strip preceding/trailing whitespace // from passed-in String parameters @@ -91,13 +103,17 @@ public class EInvalidSelfTestException extends ESelfTestException { * 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) { - super("The self test plugin named " + instanceName - + " contains a value " + instanceValue + " which is invalid."); + public EInvalidSelfTestException(String instanceName, + String instanceValue) { + super("The self test plugin named " + + instanceName + + " contains a value " + + instanceValue + + " which is invalid."); // strip preceding/trailing whitespace // from passed-in String parameters @@ -115,19 +131,21 @@ public class EInvalidSelfTestException extends ESelfTestException { /** * 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) { - super("The self test plugin parameter named " + instanceStore + "." - + instanceParameter + " is invalid."); + String instanceParameter, + String instanceValue) { + super("The self test plugin parameter named " + + instanceStore + "." + instanceParameter + + " is invalid."); // strip preceding/trailing whitespace // from passed-in String parameters @@ -147,14 +165,14 @@ public class EInvalidSelfTestException extends ESelfTestException { 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() { @@ -164,7 +182,7 @@ public class EInvalidSelfTestException extends ESelfTestException { /** * Returns the store associated with this self test. * <P> - * + * * @return substore portion of the substore.parameter/value pair */ public String getInstanceStore() { @@ -174,7 +192,7 @@ public class EInvalidSelfTestException extends ESelfTestException { /** * Returns the parameter associated with this self test. * <P> - * + * * @return parameter portion of the substore.parameter/value pair */ public String getInstanceParameter() { @@ -184,25 +202,27 @@ public class EInvalidSelfTestException extends ESelfTestException { /** * 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 0dc8ef23..88fa14cb 100644 --- a/pki/base/common/src/com/netscape/certsrv/selftests/EMissingSelfTestException.java +++ b/pki/base/common/src/com/netscape/certsrv/selftests/EMissingSelfTestException.java @@ -20,32 +20,38 @@ 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 { - // ////////////////////// +public class EMissingSelfTestException + extends ESelfTestException { + //////////////////////// // default parameters // - // ////////////////////// + //////////////////////// + + - // ///////////////////// + /////////////////////// // helper parameters // - // ///////////////////// + /////////////////////// /** * @@ -56,22 +62,26 @@ public class EMissingSelfTestException extends ESelfTestException { 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."); @@ -81,12 +91,13 @@ public class EMissingSelfTestException extends ESelfTestException { * 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."); + super("The self test plugin property named " + + instanceName + + " does not exist."); // strip preceding/trailing whitespace // from passed-in String parameters @@ -102,14 +113,16 @@ public class EMissingSelfTestException extends ESelfTestException { * 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) { - super("The self test plugin property named " + instanceName - + " contains no values."); + public EMissingSelfTestException(String instanceName, + String instanceValue) { + super("The self test plugin property named " + + instanceName + + " contains no values."); // strip preceding/trailing whitespace // from passed-in String parameters @@ -127,19 +140,21 @@ public class EMissingSelfTestException extends ESelfTestException { /** * 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) { - super("The self test plugin property named " + instanceStore + "." - + instanceParameter + " is missing."); + String instanceParameter, + String instanceValue) { + super("The self test plugin property named " + + instanceStore + "." + instanceParameter + + " is missing."); // strip preceding/trailing whitespace // from passed-in String parameters @@ -159,14 +174,14 @@ public class EMissingSelfTestException extends ESelfTestException { 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() { @@ -176,7 +191,7 @@ public class EMissingSelfTestException extends ESelfTestException { /** * Returns the store associated with this self test. * <P> - * + * * @return substore portion of the substore.parameter/value pair */ public String getInstanceStore() { @@ -186,7 +201,7 @@ public class EMissingSelfTestException extends ESelfTestException { /** * Returns the parameter associated with this self test. * <P> - * + * * @return parameter portion of the substore.parameter/value pair */ public String getInstanceParameter() { @@ -196,25 +211,27 @@ public class EMissingSelfTestException extends ESelfTestException { /** * 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 273f561a..e465517c 100644 --- a/pki/base/common/src/com/netscape/certsrv/selftests/ESelfTestException.java +++ b/pki/base/common/src/com/netscape/certsrv/selftests/ESelfTestException.java @@ -20,101 +20,108 @@ 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 { - // ////////////////////// +public class ESelfTestException + extends EBaseException { + //////////////////////// // default parameters // - // ////////////////////// + //////////////////////// + + - // ///////////////////////////////// + /////////////////////////////////// // ESelfTestException parameters // - // ///////////////////////////////// + /////////////////////////////////// /** * */ private static final long serialVersionUID = -8001373369705595891L; - private static final String SELFTEST_RESOURCES = SelfTestResources.class - .getName(); + 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 875cd8a0..f881a285 100644 --- a/pki/base/common/src/com/netscape/certsrv/selftests/ISelfTest.java +++ b/pki/base/common/src/com/netscape/certsrv/selftests/ISelfTest.java @@ -20,6 +20,7 @@ package com.netscape.certsrv.selftests; + /////////////////////// // import statements // /////////////////////// @@ -29,6 +30,7 @@ import java.util.Locale; import com.netscape.certsrv.base.IConfigStore; import com.netscape.certsrv.logging.ILogEventListener; + ////////////////////// // class definition // ////////////////////// @@ -40,78 +42,86 @@ 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, - EInvalidSelfTestException, EMissingSelfTestException; + public void initSelfTest(ISelfTestSubsystem subsystem, + 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; + public 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 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 */ @@ -120,9 +130,11 @@ 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; + public void runSelfTest(ILogEventListener logger) + 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 8ff652df..3391bdd1 100644 --- a/pki/base/common/src/com/netscape/certsrv/selftests/ISelfTestSubsystem.java +++ b/pki/base/common/src/com/netscape/certsrv/selftests/ISelfTestSubsystem.java @@ -20,6 +20,7 @@ package com.netscape.certsrv.selftests; + /////////////////////// // import statements // /////////////////////// @@ -27,6 +28,7 @@ package com.netscape.certsrv.selftests; import com.netscape.certsrv.base.ISubsystem; import com.netscape.certsrv.logging.ILogEventListener; + ////////////////////// // class definition // ////////////////////// @@ -37,14 +39,17 @@ import com.netscape.certsrv.logging.ILogEventListener; * * @version $Revision$, $Date$ */ -public interface ISelfTestSubsystem extends ISubsystem { - // ////////////////////// +public interface ISelfTestSubsystem + extends ISubsystem { + //////////////////////// // default parameters // - // ////////////////////// + //////////////////////// + - // //////////////////////////////// + + ////////////////////////////////// // ISelfTestSubsystem constants // - // //////////////////////////////// + ////////////////////////////////// public static final String ID = "selftests"; public static final String PROP_CONTAINER = "container"; @@ -55,17 +60,21 @@ public interface ISelfTestSubsystem extends ISubsystem { 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 @@ -75,7 +84,7 @@ public interface ISelfTestSubsystem extends ISubsystem { * 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(); @@ -83,70 +92,72 @@ public interface ISelfTestSubsystem extends ISubsystem { /** * 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; + public void runSelfTestsOnDemand() + 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(); @@ -154,71 +165,73 @@ public interface ISelfTestSubsystem extends ISubsystem { /** * 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; + public void runSelfTestsAtStartup() + 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 */ @@ -229,10 +242,10 @@ public interface ISelfTestSubsystem extends ISubsystem { // /** - * 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(); @@ -240,97 +253,104 @@ public interface ISelfTestSubsystem extends ISubsystem { /** * 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 7d69dfd6..c396c14b 100644 --- a/pki/base/common/src/com/netscape/certsrv/selftests/SelfTestResources.java +++ b/pki/base/common/src/com/netscape/certsrv/selftests/SelfTestResources.java @@ -17,8 +17,10 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.selftests; + import java.util.ListResourceBundle; + /** * A class represents a resource bundle for Self Tests. * <P> @@ -34,5 +36,6 @@ public class SelfTestResources extends ListResourceBundle { return contents; } - static final Object[][] contents = {}; + static final Object[][] contents = { + }; } |