diff options
author | Ade Lee <alee@redhat.com> | 2011-12-08 21:15:59 -0500 |
---|---|---|
committer | Ade Lee <alee@redhat.com> | 2011-12-08 21:15:59 -0500 |
commit | 171aaece4f23709d33d180cf36eb3af5e454b0c9 (patch) | |
tree | 1485f9f0a7bd10de4ff25030db575dbb8dafae74 /pki/base/common/src/com/netscape/certsrv/base | |
parent | adad2fcee8a29fdb82376fbce07dedb11fccc182 (diff) | |
download | pki-171aaece4f23709d33d180cf36eb3af5e454b0c9.tar.gz pki-171aaece4f23709d33d180cf36eb3af5e454b0c9.tar.xz pki-171aaece4f23709d33d180cf36eb3af5e454b0c9.zip |
Revert "Formatting"
This reverts commit 32150d3ee32f8ac27118af7c792794b538c78a2f.
Diffstat (limited to 'pki/base/common/src/com/netscape/certsrv/base')
31 files changed, 596 insertions, 546 deletions
diff --git a/pki/base/common/src/com/netscape/certsrv/base/ASubsystem.java b/pki/base/common/src/com/netscape/certsrv/base/ASubsystem.java index d6b21052b..ea3342308 100644 --- a/pki/base/common/src/com/netscape/certsrv/base/ASubsystem.java +++ b/pki/base/common/src/com/netscape/certsrv/base/ASubsystem.java @@ -17,10 +17,12 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.base; + /** - * This class represents a basic subsystem. Each basic subsystem is named with - * an identifier and has a configuration store. - * + * This class represents a basic subsystem. Each basic + * subsystem is named with an identifier and has a + * configuration store. + * * @version $Revision$, $Date$ */ public abstract class ASubsystem implements ISubsystem { @@ -31,7 +33,7 @@ public abstract class ASubsystem implements ISubsystem { /** * Initializes this subsystem. - * + * * @param parent parent subsystem * @param cfg configuration store */ @@ -42,7 +44,7 @@ public abstract class ASubsystem implements ISubsystem { /** * Retrieves the configuration store. - * + * * @return configuration store */ public IConfigStore getConfigStore() { @@ -51,7 +53,7 @@ public abstract class ASubsystem implements ISubsystem { /** * Sets the identifier of this subsystem. - * + * * @param id subsystem identifier */ public void setId(String id) { @@ -60,7 +62,7 @@ public abstract class ASubsystem implements ISubsystem { /** * Retrieves the subsystem identifier. - * + * * @return subsystem identifier */ public String getId() { diff --git a/pki/base/common/src/com/netscape/certsrv/base/AttributeNameHelper.java b/pki/base/common/src/com/netscape/certsrv/base/AttributeNameHelper.java index eee51ca03..786148a0e 100644 --- a/pki/base/common/src/com/netscape/certsrv/base/AttributeNameHelper.java +++ b/pki/base/common/src/com/netscape/certsrv/base/AttributeNameHelper.java @@ -17,24 +17,25 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.base; + /** - * AttributeNameHelper. This Helper class used to decompose dot-separated - * attribute name into prefix and suffix. - * + * AttributeNameHelper. This Helper class used to decompose + * dot-separated attribute name into prefix and suffix. + * * @version $Revision$, $Date$ */ public class AttributeNameHelper { // Public members private static final char SEPARATOR = '.'; - + // Private data members private String prefix = null; private String suffix = null; - + /** * Default constructor for the class. Name is of the form * "proofOfPosession.type". - * + * * @param name the attribute name. */ public AttributeNameHelper(String name) { @@ -50,19 +51,20 @@ public class AttributeNameHelper { /** * Return the prefix of the name. - * + * * @return attribute prefix */ public String getPrefix() { return (prefix); } - + /** * Return the suffix of the name. - * + * * @return attribute suffix */ public String getSuffix() { return (suffix); } } + diff --git a/pki/base/common/src/com/netscape/certsrv/base/BaseResources.java b/pki/base/common/src/com/netscape/certsrv/base/BaseResources.java index e8752646d..f54f13772 100644 --- a/pki/base/common/src/com/netscape/certsrv/base/BaseResources.java +++ b/pki/base/common/src/com/netscape/certsrv/base/BaseResources.java @@ -17,12 +17,15 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.base; + import java.util.ListResourceBundle; + /** - * A class represents a resource bundle for the entire system. + * A class represents a resource bundle for the entire + * system. * <P> - * + * * @version $Revision$, $Date$ * @see java.util.ListResourceBundle */ @@ -36,7 +39,8 @@ public class BaseResources extends ListResourceBundle { } /* - * Constants. The suffix represents the number of possible parameters. + * Constants. The suffix represents the number of + * possible parameters. */ static final Object[][] contents = {}; diff --git a/pki/base/common/src/com/netscape/certsrv/base/EBaseException.java b/pki/base/common/src/com/netscape/certsrv/base/EBaseException.java index 8b84a6362..e58aaca2f 100644 --- a/pki/base/common/src/com/netscape/certsrv/base/EBaseException.java +++ b/pki/base/common/src/com/netscape/certsrv/base/EBaseException.java @@ -17,13 +17,15 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.base; + import java.util.Locale; + /** - * An exception with localizable error messages. It is the base class for all - * exceptions in certificate server. + * An exception with localizable error messages. It is the + * base class for all exceptions in certificate server. * <P> - * + * * @version $Revision$, $Date$ * @see java.text.MessageFormat * @see com.netscape.certsrv.base.BaseResources @@ -36,8 +38,8 @@ public class EBaseException extends Exception { private static final long serialVersionUID = 8213021692117483973L; /** - * The resource bundle to use for error messages. Subclasses can override to - * use its own resource bundle. + * The resource bundle to use for error messages. + * Subclasses can override to use its own resource bundle. */ private static final String BASE_RESOURCES = BaseResources.class.getName(); @@ -47,13 +49,12 @@ public class EBaseException extends Exception { public Object mParams[] = null; /** - * Constructs an instance of this exception with the given resource key. If - * resource key is not found in the resource bundle, the resource key + * Constructs an instance of this exception with the given resource key. + * If resource key is not found in the resource bundle, the resource key * specified is used as the error message. - * * <pre> - * new EBaseException(BaseResources.PERMISSION_DENIED); - * new EBaseException("An plain error message"); + * new EBaseException(BaseResources.PERMISSION_DENIED); + * new EBaseException("An plain error message"); * <P> * @param msgFormat The error message resource key. */ @@ -63,14 +64,12 @@ public class EBaseException extends Exception { } /** - * Constructs an instance of this exception with the given resource key and - * a parameter as a string. - * + * Constructs an instance of this exception with the given resource key + * and a parameter as a string. * <PRE> - * new EBaseException(BaseResource.NO_CONFIG_FILE, fileName); + * new EBaseException(BaseResource.NO_CONFIG_FILE, fileName); * </PRE> * <P> - * * @param msgFormat exception details in message string format * @param param message string parameter */ @@ -81,9 +80,8 @@ public class EBaseException extends Exception { } /** - * Constructs an instance of the exception given the resource key and a - * exception parameter. - * + * Constructs an instance of the exception given the resource key and + * a exception parameter. * <PRE> * try { * ... @@ -92,7 +90,6 @@ public class EBaseException extends Exception { * } * </PRE> * <P> - * * @param msgFormat The resource key * @param param The parameter as an exception */ @@ -103,10 +100,9 @@ public class EBaseException extends Exception { } /** - * Constructs an instance of this exception given the resource key and an - * array of parameters. + * Constructs an instance of this exception given the resource key and + * an array of parameters. * <P> - * * @param msgFormat The resource key * @param params Array of params */ @@ -118,7 +114,7 @@ public class EBaseException extends Exception { /** * Returns the list of parameters. * <P> - * + * * @return List of parameters. */ public Object[] getParameters() { @@ -128,7 +124,6 @@ public class EBaseException extends Exception { /** * Returns the exception string in the default locale. * <P> - * * @return The exception string in the default locale. */ public String toString() { @@ -138,7 +133,6 @@ public class EBaseException extends Exception { /** * Returns the exception string in the given locale. * <P> - * * @param locale The locale * @return The exception string in the given locale. */ @@ -149,7 +143,6 @@ public class EBaseException extends Exception { /** * Returns the given resource bundle name. - * * @return the name of the resource bundle for this class. */ protected String getBundleName() { diff --git a/pki/base/common/src/com/netscape/certsrv/base/EPropertyNotDefined.java b/pki/base/common/src/com/netscape/certsrv/base/EPropertyNotDefined.java index 89a78031c..938c9fffe 100644 --- a/pki/base/common/src/com/netscape/certsrv/base/EPropertyNotDefined.java +++ b/pki/base/common/src/com/netscape/certsrv/base/EPropertyNotDefined.java @@ -17,12 +17,13 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.base; + /** - * This class represents an exception thrown when a property is not defined - * (empty string) the configuration store. It extends EBaseException and uses - * the same resource bundle. + * This class represents an exception thrown when a + * property is not defined (empty string) the configuration store. + * It extends EBaseException and uses the same resource bundle. * <p> - * + * * @version $Revision$, $Date$ * @see com.netscape.certsrv.base.EBaseException */ @@ -34,10 +35,9 @@ public class EPropertyNotDefined extends EBaseException { private static final long serialVersionUID = -7986464387187170352L; /** - * Constructs an instance of this exception given the name of the property - * that's not found. + * Constructs an instance of this exception given the name of the + * property that's not found. * <p> - * * @param errorString Detailed error message. */ public EPropertyNotDefined(String errorString) { diff --git a/pki/base/common/src/com/netscape/certsrv/base/EPropertyNotFound.java b/pki/base/common/src/com/netscape/certsrv/base/EPropertyNotFound.java index b442f0095..833a393a9 100644 --- a/pki/base/common/src/com/netscape/certsrv/base/EPropertyNotFound.java +++ b/pki/base/common/src/com/netscape/certsrv/base/EPropertyNotFound.java @@ -17,12 +17,13 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.base; + /** - * This class represents an exception thrown when a property is not found in the - * configuration store. It extends EBaseException and uses the same resource - * bundle. + * This class represents an exception thrown when a + * property is not found in the configuration store. + * It extends EBaseException and uses the same resource bundle. * <p> - * + * * @version $Revision$, $Date$ * @see com.netscape.certsrv.base.EBaseException */ @@ -34,10 +35,9 @@ public class EPropertyNotFound extends EBaseException { private static final long serialVersionUID = 2701966082697733003L; /** - * Constructs an instance of this exception given the name of the property - * that's not found. + * Constructs an instance of this exception given the name of the + * property that's not found. * <p> - * * @param errorString Detailed error message. */ public EPropertyNotFound(String errorString) { diff --git a/pki/base/common/src/com/netscape/certsrv/base/ExtendedPluginInfo.java b/pki/base/common/src/com/netscape/certsrv/base/ExtendedPluginInfo.java index cba4482a6..a0399d349 100644 --- a/pki/base/common/src/com/netscape/certsrv/base/ExtendedPluginInfo.java +++ b/pki/base/common/src/com/netscape/certsrv/base/ExtendedPluginInfo.java @@ -17,12 +17,14 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.base; + import java.util.Locale; + /** * Plugin which can return extended information to console * <p> - * + * * @version $Revision$, $Date$ */ public class ExtendedPluginInfo implements IExtendedPluginInfo { @@ -31,7 +33,7 @@ public class ExtendedPluginInfo implements IExtendedPluginInfo { /** * Constructs an extended plugin info object. - * + * * @param epi plugin info list */ public ExtendedPluginInfo(String epi[]) { @@ -39,43 +41,48 @@ public class ExtendedPluginInfo implements IExtendedPluginInfo { } /** - * This method returns an array of strings. Each element of the array - * represents a configurable parameter, or some other meta-info (such as - * help-token) - * - * there is an entry indexed on that parameter name - * <param-name>;<type_info>[,required];<description>;... - * - * Where: - * - * type_info is either 'string', 'number', 'boolean', 'password' or - * 'choice(ch1,ch2,ch3,...)' - * - * If the marker 'required' is included after the type_info, the parameter - * will has some visually distinctive marking in the UI. - * - * 'description' is a short sentence describing the parameter 'choice' is - * rendered as a drop-down list. The first parameter in the list will be - * activated by default 'boolean' is rendered as a checkbox. The resulting - * parameter will be either 'true' or 'false' 'string' allows any characters - * 'number' allows only numbers 'password' is rendered as a password field - * (the characters are replaced with *'s when being types. This parameter is - * not passed through to the plugin. It is instead inserted directly into - * the password cache keyed on the instance name. The value of the parameter - * 'bindPWPrompt' (see example below) is set to the key. - * - * In addition to the configurable parameters, the following magic - * parameters may be defined: - * - * HELP_TOKEN;helptoken - a pointer to the online manual section for this - * plugin HELP_TEXT;helptext - a general help string describing the plugin + * This method returns an array of strings. Each element of the + * array represents a configurable parameter, or some other + * meta-info (such as help-token) * - * For example: "username;string;The username you wish to login as" - * "bindPWPrompt;password;Enter password to bind as above user with" - * "algorithm;choice(RSA,DSA);Which algorithm do you want to use" - * "enable;boolean;Do you want to run this plugin" - * "port;number;Which port number do you want to use" + * there is an entry indexed on that parameter name + * <param-name>;<type_info>[,required];<description>;... + * + * Where: + * + * type_info is either 'string', 'number', 'boolean', 'password' or + * 'choice(ch1,ch2,ch3,...)' + * + * If the marker 'required' is included after the type_info, + * the parameter will has some visually distinctive marking in + * the UI. * + * 'description' is a short sentence describing the parameter + * 'choice' is rendered as a drop-down list. The first parameter in the + * list will be activated by default + * 'boolean' is rendered as a checkbox. The resulting parameter will be + * either 'true' or 'false' + * 'string' allows any characters + * 'number' allows only numbers + * 'password' is rendered as a password field (the characters are replaced + * with *'s when being types. This parameter is not passed through to + * the plugin. It is instead inserted directly into the password cache + * keyed on the instance name. The value of the parameter + * 'bindPWPrompt' (see example below) is set to the key. + * + * In addition to the configurable parameters, the following magic parameters + * may be defined: + * + * HELP_TOKEN;helptoken - a pointer to the online manual section for this plugin + * HELP_TEXT;helptext - a general help string describing the plugin + * + * For example: + * "username;string;The username you wish to login as" + * "bindPWPrompt;password;Enter password to bind as above user with" + * "algorithm;choice(RSA,DSA);Which algorithm do you want to use" + * "enable;boolean;Do you want to run this plugin" + * "port;number;Which port number do you want to use" + * */ public String[] getExtendedPluginInfo(Locale locale) { return _epi; diff --git a/pki/base/common/src/com/netscape/certsrv/base/IArgBlock.java b/pki/base/common/src/com/netscape/certsrv/base/IArgBlock.java index b7406c6ab..83c8f85fa 100644 --- a/pki/base/common/src/com/netscape/certsrv/base/IArgBlock.java +++ b/pki/base/common/src/com/netscape/certsrv/base/IArgBlock.java @@ -23,30 +23,32 @@ import java.util.Enumeration; import netscape.security.pkcs.PKCS10; + /** - * This interface defines the abstraction for the generic collection of - * attributes indexed by string names. Set of cooperating implementations of - * this interface may exploit dot-separated attribute names to provide seamless - * access to the attributes of attribute value which also implements AttrSet - * interface as if it was direct attribute of the container E.g., - * ((AttrSet)container.get("x")).get("y") is equivalent to container.get("x.y"); + * This interface defines the abstraction for the generic collection + * of attributes indexed by string names. + * Set of cooperating implementations of this interface may exploit + * dot-separated attribute names to provide seamless access to the + * attributes of attribute value which also implements AttrSet + * interface as if it was direct attribute of the container + * E.g., ((AttrSet)container.get("x")).get("y") is equivalent to + * container.get("x.y"); * <p> - * + * * @version $Revision$, $Date$ **/ public interface IArgBlock extends Serializable { /** * Checks if this argument block contains the given key. - * + * * @param n key * @return true if key is present */ public boolean isValuePresent(String n); - /** * Adds string-based value into this argument block. - * + * * @param n key * @param v value * @return value @@ -55,7 +57,7 @@ public interface IArgBlock extends Serializable { /** * Retrieves argument value as string. - * + * * @param n key * @return argument value as string * @exception EBaseException failed to retrieve value @@ -64,7 +66,7 @@ public interface IArgBlock extends Serializable { /** * Retrieves argument value as string. - * + * * @param n key * @param def default value to be returned if key is not present * @return argument value as string @@ -73,16 +75,16 @@ public interface IArgBlock extends Serializable { /** * Retrieves argument value as integer. - * + * * @param n key * @return argument value as int * @exception EBaseException failed to retrieve value */ - public int getValueAsInt(String n) throws EBaseException; + public int getValueAsInt(String n) throws EBaseException; /** * Retrieves argument value as integer. - * + * * @param n key * @param def default value to be returned if key is not present * @return argument value as int @@ -91,7 +93,7 @@ public interface IArgBlock extends Serializable { /** * Retrieves argument value as big integer. - * + * * @param n key * @return argument value as big integer * @exception EBaseException failed to retrieve value @@ -100,7 +102,7 @@ public interface IArgBlock extends Serializable { /** * Retrieves argument value as big integer. - * + * * @param n key * @param def default value to be returned if key is not present * @return argument value as big integer @@ -109,7 +111,7 @@ public interface IArgBlock extends Serializable { /** * Retrieves argument value as object - * + * * @param n key * @return argument value as object * @exception EBaseException failed to retrieve value @@ -118,7 +120,7 @@ public interface IArgBlock extends Serializable { /** * Retrieves argument value as object - * + * * @param n key * @param def default value to be returned if key is not present * @return argument value as object @@ -127,7 +129,7 @@ public interface IArgBlock extends Serializable { /** * Gets boolean value. They should be "true" or "false". - * + * * @param name name of the input type * @return boolean type: <code>true</code> or <code>false</code> * @exception EBaseException failed to retrieve value @@ -136,28 +138,27 @@ public interface IArgBlock extends Serializable { /** * Gets boolean value. They should be "true" or "false". - * + * * @param name name of the input type - * @param def Default value to return. + * @param def Default value to return. * @return boolean type: <code>true</code> or <code>false</code> */ public boolean getValueAsBoolean(String name, boolean def); /** * Gets KeyGenInfo - * + * * @param name name of the input type * @param def default value to return * @exception EBaseException On error. * @return KeyGenInfo object */ - public KeyGenInfo getValueAsKeyGenInfo(String name, KeyGenInfo def) - throws EBaseException; + public KeyGenInfo getValueAsKeyGenInfo(String name, KeyGenInfo def) throws EBaseException; /** - * Gets PKCS10 request. This pkcs10 attribute does not contain header - * information. - * + * Gets PKCS10 request. This pkcs10 attribute does not + * contain header information. + * * @param name name of the input type * @return pkcs10 request * @exception EBaseException failed to retrieve value @@ -165,44 +166,41 @@ public interface IArgBlock extends Serializable { public PKCS10 getValueAsRawPKCS10(String name) throws EBaseException; /** - * Gets PKCS10 request. This pkcs10 attribute does not contain header - * information. - * + * Gets PKCS10 request. This pkcs10 attribute does not + * contain header information. + * * @param name name of the input type * @param def default PKCS10 * @return pkcs10 request * @exception EBaseException failed to retrieve value */ - public PKCS10 getValueAsRawPKCS10(String name, PKCS10 def) - throws EBaseException; + public PKCS10 getValueAsRawPKCS10(String name, PKCS10 def) throws EBaseException; /** * Retrieves PKCS10 - * - * @param name name of the input type + * + * @param name name of the input type * @param checkheader true if header must be present * @return PKCS10 object * @exception EBaseException failed to retrieve value */ - public PKCS10 getValueAsPKCS10(String name, boolean checkheader) - throws EBaseException; + public PKCS10 getValueAsPKCS10(String name, boolean checkheader) throws EBaseException; /** * Retrieves PKCS10 - * - * @param name name of the input type + * + * @param name name of the input type * @param checkheader true if header must be present * @param def default PKCS10 * @return PKCS10 object * @exception EBaseException on error */ - public PKCS10 getValueAsPKCS10(String name, boolean checkheader, PKCS10 def) - throws EBaseException; + public PKCS10 getValueAsPKCS10(String name, boolean checkheader, PKCS10 def) throws EBaseException; /** * Retrieves PKCS10 - * - * @param name name of the input type + * + * @param name name of the input type * @param def default PKCS10 * @return PKCS10 object * @exception EBaseException on error @@ -211,14 +209,14 @@ public interface IArgBlock extends Serializable { /** * Retrieves a list of argument keys. - * + * * @return a list of string-based keys */ public Enumeration elements(); /** * Adds long-type arguments to this block. - * + * * @param n key * @param v value * @return value @@ -227,7 +225,7 @@ public interface IArgBlock extends Serializable { /** * Adds integer-type arguments to this block. - * + * * @param n key * @param v value * @return value @@ -236,7 +234,7 @@ public interface IArgBlock extends Serializable { /** * Adds boolean-type arguments to this block. - * + * * @param n key * @param v value * @return value @@ -245,7 +243,7 @@ public interface IArgBlock extends Serializable { /** * Adds integer-type arguments to this block. - * + * * @param n key * @param v value * @param radix radix @@ -255,7 +253,7 @@ public interface IArgBlock extends Serializable { /** * Sets argument into this block. - * + * * @param name key * @param obj value */ @@ -263,7 +261,7 @@ public interface IArgBlock extends Serializable { /** * Retrieves argument. - * + * * @param name key * @return object value */ @@ -271,14 +269,14 @@ public interface IArgBlock extends Serializable { /** * Deletes argument by the given key. - * + * * @param name key */ public void delete(String name); /** * Retrieves a list of argument keys. - * + * * @return a list of string-based keys */ public Enumeration getElements(); diff --git a/pki/base/common/src/com/netscape/certsrv/base/IAttrSet.java b/pki/base/common/src/com/netscape/certsrv/base/IAttrSet.java index c43f035d0..4e8b0205d 100644 --- a/pki/base/common/src/com/netscape/certsrv/base/IAttrSet.java +++ b/pki/base/common/src/com/netscape/certsrv/base/IAttrSet.java @@ -17,34 +17,38 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.base; + import java.io.Serializable; import java.util.Enumeration; + /** - * This interface defines the abstraction for the generic collection of - * attributes indexed by string names. Set of cooperating implementations of - * this interface may exploit dot-separated attribute names to provide seamless - * access to the attributes of attribute value which also implements AttrSet - * interface as if it was direct attribute of the container E.g., - * ((AttrSet)container.get("x")).get("y") is equivalent to container.get("x.y"); + * This interface defines the abstraction for the generic collection + * of attributes indexed by string names. + * Set of cooperating implementations of this interface may exploit + * dot-separated attribute names to provide seamless access to the + * attributes of attribute value which also implements AttrSet + * interface as if it was direct attribute of the container + * E.g., ((AttrSet)container.get("x")).get("y") is equivalent to + * container.get("x.y"); * <p> - * + * * @version $Revision$, $Date$ **/ public interface IAttrSet extends Serializable { /** * Sets an attribute value within this AttrSet. - * + * * @param name the name of the attribute * @param obj the attribute object. * @exception EBaseException on attribute handling errors. */ - public void set(String name, Object obj) throws EBaseException; + public void set(String name, Object obj)throws EBaseException; /** * Gets an attribute value. - * + * * @param name the name of the attribute to return. * @exception EBaseException on attribute handling errors. */ @@ -52,7 +56,7 @@ public interface IAttrSet extends Serializable { /** * Deletes an attribute value from this AttrSet. - * + * * @param name the name of the attribute to delete. * @exception EBaseException on attribute handling errors. */ @@ -61,7 +65,7 @@ public interface IAttrSet extends Serializable { /** * Returns an enumeration of the names of the attributes existing within * this AttrSet. - * + * * @return an enumeration of the attribute names. */ public Enumeration getElements(); diff --git a/pki/base/common/src/com/netscape/certsrv/base/IAuthInfo.java b/pki/base/common/src/com/netscape/certsrv/base/IAuthInfo.java index ed55d47eb..91f9f51af 100644 --- a/pki/base/common/src/com/netscape/certsrv/base/IAuthInfo.java +++ b/pki/base/common/src/com/netscape/certsrv/base/IAuthInfo.java @@ -17,11 +17,15 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.base; + + + /** - * An interface represents an authentication context. This is an entity that - * encapsulates the authentication information of a service requestor. For - * example, CMS user needs to authenticate to CMS using SSL. The client - * certificate is expressed in authenticated context. + * An interface represents an authentication context. This + * is an entity that encapsulates the authentication + * information of a service requestor. For example, CMS + * user needs to authenticate to CMS using SSL. The + * client certificate is expressed in authenticated context. * <P> * * @version $Revision$, $Date$ diff --git a/pki/base/common/src/com/netscape/certsrv/base/ICRLPrettyPrint.java b/pki/base/common/src/com/netscape/certsrv/base/ICRLPrettyPrint.java index f11015d7f..c770121fd 100644 --- a/pki/base/common/src/com/netscape/certsrv/base/ICRLPrettyPrint.java +++ b/pki/base/common/src/com/netscape/certsrv/base/ICRLPrettyPrint.java @@ -17,31 +17,32 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.base; + import java.util.Locale; + /** - * This interface represents a CRL pretty print handler. It converts a CRL - * object into a printable CRL string. - * + * This interface represents a CRL pretty print handler. + * It converts a CRL object into a printable CRL string. + * * @version $Revision$, $Date$ */ public interface ICRLPrettyPrint { /** * Retrieves the printable CRL string. - * + * * @param clientLocale end user clocale * @param crlSize CRL size * @param pageStart starting page number * @param pageSize page size in rows * @return printable CRL string */ - public String toString(Locale clientLocale, long crlSize, long pageStart, - long pageSize); + public String toString(Locale clientLocale, long crlSize, long pageStart, long pageSize); /** * Retrieves the printable CRL string. - * + * * @param clientLocale end user clocale * @return printable CRL string */ diff --git a/pki/base/common/src/com/netscape/certsrv/base/ICertPrettyPrint.java b/pki/base/common/src/com/netscape/certsrv/base/ICertPrettyPrint.java index fbef80f4f..fc4e8c291 100644 --- a/pki/base/common/src/com/netscape/certsrv/base/ICertPrettyPrint.java +++ b/pki/base/common/src/com/netscape/certsrv/base/ICertPrettyPrint.java @@ -17,19 +17,22 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.base; + import java.util.Locale; + /** - * This interface represents a certificate pretty print handler. This handler - * converts certificate object into a printable certificate string. + * This interface represents a certificate pretty print + * handler. This handler converts certificate object into + * a printable certificate string. * - * @version $Revision$, $Date$ + * @version $Revision$, $Date$ */ public interface ICertPrettyPrint { /** * Returns printable certificate string. - * + * * @param clientLocale end user locale * @return printable certificate string */ diff --git a/pki/base/common/src/com/netscape/certsrv/base/IConfigStore.java b/pki/base/common/src/com/netscape/certsrv/base/IConfigStore.java index bdf3a861e..aef83b1cf 100644 --- a/pki/base/common/src/com/netscape/certsrv/base/IConfigStore.java +++ b/pki/base/common/src/com/netscape/certsrv/base/IConfigStore.java @@ -17,16 +17,16 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.base; + import java.math.BigInteger; import java.util.Enumeration; + /** - * An interface represents a configuration store. A configuration store is an - * abstraction of a hierarchical store to keep arbitrary data indexed by string - * names. - * <p> - * In the following example: - * + * An interface represents a configuration store. + * A configuration store is an abstraction of a hierarchical store + * to keep arbitrary data indexed by string names.<p> + * In the following example: * <pre> * param1=value1 * configStore1.param11=value11 @@ -35,28 +35,26 @@ import java.util.Enumeration; * configStore1.subStore1.param112=value112 * configStore2.param21=value21 * </pre> - * - * The top config store has parameters <i>param1</i> and sub-stores + * The top config store has parameters <i>param1</i> and sub-stores * <i>configStore1</i> and <i>configStore2</i>. <br> * The following illustrates how a config store is used. - * * <pre> - * // the top config store is passed to the following method. - * public void init(IConfigStore config) throws EBaseException { - * IConfigStore store = config; - * String valx = config.getString("param1"); - * // valx is "value1" <p> - * - * IConfigStore substore1 = config.getSubstore("configStore1"); - * String valy = substore1.getString("param11"); - * // valy is "value11" <p> - * - * IConfigStore substore2 = config.getSubstore("configStore2"); - * String valz = substore2.getString("param21"); - * // valz is "value21" <p> - * } + * // the top config store is passed to the following method. + * public void init(IConfigStore config) throws EBaseException { + * IConfigStore store = config; + * String valx = config.getString("param1"); + * // valx is "value1" <p> + * + * IConfigStore substore1 = config.getSubstore("configStore1"); + * String valy = substore1.getString("param11"); + * // valy is "value11" <p> + * + * IConfigStore substore2 = config.getSubstore("configStore2"); + * String valz = substore2.getString("param21"); + * // valz is "value21" <p> + * } * </pre> - * + * * @version $Revision$, $Date$ */ public interface IConfigStore extends ISourceConfigStore { @@ -64,7 +62,6 @@ public interface IConfigStore extends ISourceConfigStore { /** * Gets the name of this Configuration Store. * <P> - * * @return The name of this Configuration store */ public String getName(); @@ -72,65 +69,60 @@ public interface IConfigStore extends ISourceConfigStore { /** * Retrieves the value of the given property as a string. * <p> - * * @param name The name of the property to get * @return The value of the property as a String * @exception EPropertyNotFound If the property is not present * @exception EBaseException If an internal error occurred */ - public String getString(String name) throws EPropertyNotFound, - EBaseException; + public String getString(String name) + throws EPropertyNotFound, EBaseException; /** - * Retrieves the value of a given property as a string or the given default - * value if the property is not present. + * Retrieves the value of a given property as a string or the + * given default value if the property is not present. * <P> - * * @param name The property to retrive * @param defval The default value to return if the property is not present * @return The roperty value as a string * @exception EBaseException If an internal error occurred */ - public String getString(String name, String defval) throws EBaseException; + public String getString(String name, String defval) + throws EBaseException; /** - * Stores a property and its value as a string. + * Stores a property and its value as a string. * <p> - * * @param name The name of the property * @param value The value as a string - */ + */ public void putString(String name, String value); /** * Retrieves the value of a property as a byte array. * <P> - * * @param name The property name * @return The property value as a byte array * @exception EPropertyNotFound If the property is not present * @exception EBaseException If an internal error occurred */ - public byte[] getByteArray(String name) throws EPropertyNotFound, - EBaseException; + public byte[] getByteArray(String name) + throws EPropertyNotFound, EBaseException; /** - * Retrieves the value of a property as a byte array, using the given - * default value if property is not present. + * Retrieves the value of a property as a byte array, using the + * given default value if property is not present. * <P> - * * @param name The name of the property * @param defval The default value if the property is not present. * @return The property value as a byte array. * @exception EBaseException If an internal error occurred */ - public byte[] getByteArray(String name, byte defval[]) - throws EBaseException; + public byte[] getByteArray(String name, byte defval[]) + throws EBaseException; /** * Stores the given property and value as a byte array. * <p> - * * @param name The property name * @param value The value as a byte array to store */ @@ -139,32 +131,29 @@ public interface IConfigStore extends ISourceConfigStore { /** * Retrieves the given property as a boolean. * <P> - * * @param name The name of the property as a string. * @return The value of the property as a boolean. * @exception EPropertyNotFound If the property is not present * @exception EBaseException If an internal error occurred */ - public boolean getBoolean(String name) throws EPropertyNotFound, - EBaseException; + public boolean getBoolean(String name) + throws EPropertyNotFound, EBaseException; /** * Retrieves the given property as a boolean. * <P> - * * @param name The name of the property - * @param defval The default value to turn as a boolean if property is not - * present + * @param defval The default value to turn as a boolean if + * property is not present * @return The value of the property as a boolean. * @exception EBaseException If an internal error occurred */ - public boolean getBoolean(String name, boolean defval) - throws EBaseException; + public boolean getBoolean(String name, boolean defval) + throws EBaseException; /** * Stores the given property and its value as a boolean. * <P> - * * @param name The property name * @param value The value as a boolean */ @@ -173,28 +162,28 @@ public interface IConfigStore extends ISourceConfigStore { /** * Retrieves the given property as an integer. * <P> - * * @param name The property name * @return The property value as an integer * @exception EPropertyNotFound If property is not found * @exception EBaseException If an internal error occurred */ - public int getInteger(String name) throws EPropertyNotFound, EBaseException; + public int getInteger(String name) + throws EPropertyNotFound, EBaseException; /** * Retrieves the given property as an integer. * <P> - * * @param name The property name * @return int The default value to return as an integer - * @exception EBaseException If the value cannot be converted to a integer + * @exception EBaseException If the value cannot be converted to a + * integer */ - public int getInteger(String name, int defval) throws EBaseException; + public int getInteger(String name, int defval) + throws EBaseException; /** * Sets a property and its value as an integer. * <P> - * * @param name parameter name * @param value integer value */ @@ -203,30 +192,28 @@ public interface IConfigStore extends ISourceConfigStore { /** * Retrieves the given property as a big integer. * <P> - * * @param name The property name * @return The property value as a big integer * @exception EPropertyNotFound If property is not found * @exception EBaseException If an internal error occurred */ - public BigInteger getBigInteger(String name) throws EPropertyNotFound, - EBaseException; + public BigInteger getBigInteger(String name) + throws EPropertyNotFound, EBaseException; /** * Retrieves the given property as a big integer. * <P> - * * @param name The property name * @return int The default value to return as a big integer - * @exception EBaseException If the value cannot be converted to a integer + * @exception EBaseException If the value cannot be converted to a + * integer */ - public BigInteger getBigInteger(String name, BigInteger defval) - throws EBaseException; + public BigInteger getBigInteger(String name, BigInteger defval) + throws EBaseException; /** * Sets a property and its value as an integer. * <P> - * * @param name parameter name * @param value big integer value */ @@ -235,26 +222,23 @@ public interface IConfigStore extends ISourceConfigStore { /** * Creates a nested sub-store with the specified name. * <P> - * * @param name The name of the sub-store * @return The sub-store created */ public IConfigStore makeSubStore(String name); /** - * Retrieves the given sub-store. + * Retrieves the given sub-store. * <P> - * * @param name The name of the sub-store * @return The sub-store */ public IConfigStore getSubStore(String name); /** - * Removes sub-store with the given name. (Removes all properties and - * sub-stores under this sub-store.) + * Removes sub-store with the given name. + * (Removes all properties and sub-stores under this sub-store.) * <P> - * * @param name The name of the sub-store to remove */ public void removeSubStore(String name); @@ -263,24 +247,22 @@ public interface IConfigStore extends ISourceConfigStore { /** * Retrives and enumeration of all properties in this config-store. - * * @return An enumeration of all properties in this config-store */ public Enumeration<String> getPropertyNames(); /** - * Returns an enumeration of the names of the substores of this - * config-store. + * Returns an enumeration of the names of the substores of + * this config-store. * <P> - * - * @return An enumeration of the names of the sub-stores of this - * config-store + * @return An enumeration of the names of the sub-stores of this + * config-store */ public Enumeration<String> getSubStoreNames(); /** * Commits all the data into file immediately. - * + * * @param createBackup true if a backup file should be created * @exception EBaseException failed to commit */ @@ -291,3 +273,4 @@ public interface IConfigStore extends ISourceConfigStore { */ public int size(); } + diff --git a/pki/base/common/src/com/netscape/certsrv/base/IConfigStoreEventListener.java b/pki/base/common/src/com/netscape/certsrv/base/IConfigStoreEventListener.java index 48eb37827..f2b6a03d4 100644 --- a/pki/base/common/src/com/netscape/certsrv/base/IConfigStoreEventListener.java +++ b/pki/base/common/src/com/netscape/certsrv/base/IConfigStoreEventListener.java @@ -17,32 +17,34 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.base; + import java.util.Hashtable; + /** * ConfigStore Parameters Event Notification. - * + * * @version $Revision$, $Date$ */ public interface IConfigStoreEventListener { /** * Called to validate the config store parameters that changed - * + * * @param action action * @param params configuration parameters changed * @exception EBaseException failed to validate */ - public void validateConfigParams(String action, Hashtable params) - throws EBaseException; + public void validateConfigParams(String action, + Hashtable params) throws EBaseException; /** * Validates the config store parameters that changed - * + * * @param action action * @param params configuration parameters changed * @exception EBaseException failed to validate */ - public void doConfigParams(String action, Hashtable params) - throws EBaseException; + public void doConfigParams(String action, + Hashtable params) throws EBaseException; } diff --git a/pki/base/common/src/com/netscape/certsrv/base/IExtPrettyPrint.java b/pki/base/common/src/com/netscape/certsrv/base/IExtPrettyPrint.java index 101af3fa8..73e95b776 100644 --- a/pki/base/common/src/com/netscape/certsrv/base/IExtPrettyPrint.java +++ b/pki/base/common/src/com/netscape/certsrv/base/IExtPrettyPrint.java @@ -17,17 +17,22 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.base; + + + /** - * This class will display the certificate content in predefined format. - * + * This class will display the certificate content in predefined + * format. + * * @version $Revision$, $Date$ */ public interface IExtPrettyPrint { /** * Retrieves the printable extension string. - * + * * @return printable extension string */ public String toString(); } + diff --git a/pki/base/common/src/com/netscape/certsrv/base/IExtendedPluginInfo.java b/pki/base/common/src/com/netscape/certsrv/base/IExtendedPluginInfo.java index e0f87c4ee..e8060b24a 100644 --- a/pki/base/common/src/com/netscape/certsrv/base/IExtendedPluginInfo.java +++ b/pki/base/common/src/com/netscape/certsrv/base/IExtendedPluginInfo.java @@ -17,12 +17,14 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.base; + import java.util.Locale; + /** * Plugin which can return extended information to console * <p> - * + * * @version $Revision$, $Date$ */ public interface IExtendedPluginInfo { @@ -31,43 +33,48 @@ public interface IExtendedPluginInfo { public static final String HELP_TEXT = "HELP_TEXT"; /** - * This method returns an array of strings. Each element of the array - * represents a configurable parameter, or some other meta-info (such as - * help-token) - * - * there is an entry indexed on that parameter name - * <param-name>;<type_info>[,required];<description>;... - * - * Where: - * - * type_info is either 'string', 'number', 'boolean', 'password' or - * 'choice(ch1,ch2,ch3,...)' - * - * If the marker 'required' is included after the type_info, the parameter - * will has some visually distinctive marking in the UI. - * - * 'description' is a short sentence describing the parameter 'choice' is - * rendered as a drop-down list. The first parameter in the list will be - * activated by default 'boolean' is rendered as a checkbox. The resulting - * parameter will be either 'true' or 'false' 'string' allows any characters - * 'number' allows only numbers 'password' is rendered as a password field - * (the characters are replaced with *'s when being types. This parameter is - * not passed through to the plugin. It is instead inserted directly into - * the password cache keyed on the instance name. The value of the parameter - * 'bindPWPrompt' (see example below) is set to the key. - * - * In addition to the configurable parameters, the following magic - * parameters may be defined: - * - * HELP_TOKEN;helptoken - a pointer to the online manual section for this - * plugin HELP_TEXT;helptext - a general help string describing the plugin + * This method returns an array of strings. Each element of the + * array represents a configurable parameter, or some other + * meta-info (such as help-token) * - * For example: "username;string;The username you wish to login as" - * "bindPWPrompt;password;Enter password to bind as above user with" - * "algorithm;choice(RSA,DSA);Which algorithm do you want to use" - * "enable;boolean;Do you want to run this plugin" - * "port;number;Which port number do you want to use" + * there is an entry indexed on that parameter name + * <param-name>;<type_info>[,required];<description>;... + * + * Where: + * + * type_info is either 'string', 'number', 'boolean', 'password' or + * 'choice(ch1,ch2,ch3,...)' + * + * If the marker 'required' is included after the type_info, + * the parameter will has some visually distinctive marking in + * the UI. * + * 'description' is a short sentence describing the parameter + * 'choice' is rendered as a drop-down list. The first parameter in the + * list will be activated by default + * 'boolean' is rendered as a checkbox. The resulting parameter will be + * either 'true' or 'false' + * 'string' allows any characters + * 'number' allows only numbers + * 'password' is rendered as a password field (the characters are replaced + * with *'s when being types. This parameter is not passed through to + * the plugin. It is instead inserted directly into the password cache + * keyed on the instance name. The value of the parameter + * 'bindPWPrompt' (see example below) is set to the key. + * + * In addition to the configurable parameters, the following magic parameters + * may be defined: + * + * HELP_TOKEN;helptoken - a pointer to the online manual section for this plugin + * HELP_TEXT;helptext - a general help string describing the plugin + * + * For example: + * "username;string;The username you wish to login as" + * "bindPWPrompt;password;Enter password to bind as above user with" + * "algorithm;choice(RSA,DSA);Which algorithm do you want to use" + * "enable;boolean;Do you want to run this plugin" + * "port;number;Which port number do you want to use" + * */ public String[] getExtendedPluginInfo(Locale locale); diff --git a/pki/base/common/src/com/netscape/certsrv/base/IPluginImpl.java b/pki/base/common/src/com/netscape/certsrv/base/IPluginImpl.java index 52ac3dd9f..4a55af607 100644 --- a/pki/base/common/src/com/netscape/certsrv/base/IPluginImpl.java +++ b/pki/base/common/src/com/netscape/certsrv/base/IPluginImpl.java @@ -17,11 +17,12 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.base; + import java.util.Vector; /** * This interface represents a plugin instance. - * + * * @version $Revision$, $Date$ */ public interface IPluginImpl { @@ -31,7 +32,6 @@ public interface IPluginImpl { /** * Gets the description for this plugin instance. * <P> - * * @return The Description for this plugin instance. */ public String getDescription(); @@ -39,7 +39,7 @@ public interface IPluginImpl { /** * Returns the name of the plugin class. * <P> - * + * * @return The name of the plugin class. */ public String getImplName(); @@ -47,23 +47,24 @@ public interface IPluginImpl { /** * Returns the name of the plugin instance. * <P> - * - * @return The name of the plugin instance. If none is set the name of the - * implementation will be returned.xxxx + * + * @return The name of the plugin instance. If none is set + * the name of the implementation will be returned.xxxx */ public String getInstanceName(); /** * Initializes this plugin instance. - * + * * @param sys parent subsystem * @param instanceName instance name of this plugin * @param className class name of this plugin * @param config configuration store * @exception EBaseException failed to initialize */ - public void init(ISubsystem sys, String instanceName, String className, - IConfigStore config) throws EBaseException; + public void init(ISubsystem sys, String instanceName, String className, + IConfigStore config) + throws EBaseException; /** * Shutdowns this plugin. @@ -72,32 +73,33 @@ public interface IPluginImpl { /** * Retrieves the configuration store. - * + * * @return configuration store */ public IConfigStore getConfigStore(); /** * Return configured parameters for a plugin instance. - * - * @return nvPairs A Vector of name/value pairs. Each name/value pair is - * constructed as a String in name=value format. + * + * @return nvPairs A Vector of name/value pairs. Each name/value + * pair is constructed as a String in name=value format. */ public Vector getInstanceParams(); /** * Retrieves a list of configuration parameter names. - * + * * @return a list of parameter names */ public String[] getConfigParams(); /** * Return default parameters for a plugin implementation. - * - * @return nvPairs A Vector of name/value pairs. Each name/value pair is - * constructed as a String in name=value. + * + * @return nvPairs A Vector of name/value pairs. Each name/value + * pair is constructed as a String in name=value. */ public Vector getDefaultParams(); } + diff --git a/pki/base/common/src/com/netscape/certsrv/base/IPrettyPrintFormat.java b/pki/base/common/src/com/netscape/certsrv/base/IPrettyPrintFormat.java index 0f3039d15..1fba48f19 100644 --- a/pki/base/common/src/com/netscape/certsrv/base/IPrettyPrintFormat.java +++ b/pki/base/common/src/com/netscape/certsrv/base/IPrettyPrintFormat.java @@ -17,28 +17,32 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.base; + + + /** - * This class will display the certificate content in predefined format. - * + * This class will display the certificate content in predefined + * format. + * * @version $Revision$, $Date$ */ public interface IPrettyPrintFormat { /** * Retrieves a pretty print string of the given byte array. - * + * * @param in byte array * @param indentSize indentation size * @param lineLen length of line * @param separator separator string * @return pretty print string */ - public String toHexString(byte[] in, int indentSize, int lineLen, - String separator); + public String toHexString(byte[] in, int indentSize, + int lineLen, String separator); /** * Retrieves a pretty print string of the given byte array. - * + * * @param in byte array * @param indentSize indentation size * @param lineLen length of line @@ -48,7 +52,7 @@ public interface IPrettyPrintFormat { /** * Retrieves a pretty print string of the given byte array. - * + * * @param in byte array * @param indentSize indentation size * @return pretty print string @@ -57,7 +61,7 @@ public interface IPrettyPrintFormat { /** * Retrieves a pretty print string of the given byte array. - * + * * @param in byte array * @return pretty print string */ diff --git a/pki/base/common/src/com/netscape/certsrv/base/ISecurityDomainSessionTable.java b/pki/base/common/src/com/netscape/certsrv/base/ISecurityDomainSessionTable.java index dfc358088..3902d4433 100644 --- a/pki/base/common/src/com/netscape/certsrv/base/ISecurityDomainSessionTable.java +++ b/pki/base/common/src/com/netscape/certsrv/base/ISecurityDomainSessionTable.java @@ -19,30 +19,21 @@ package com.netscape.certsrv.base; import java.util.Enumeration; + /** * This interface defines the abstraction for the cookie table. **/ public interface ISecurityDomainSessionTable { - public static final int SUCCESS = 0; - public static final int FAILURE = 1; - + public static final int SUCCESS =0; + public static final int FAILURE =1; public int addEntry(String cookieId, String ip, String uid, String group); - public int removeEntry(String sessionId); - public boolean isSessionIdExist(String sessionId); - public String getIP(String sessionId); - public String getUID(String sessionId); - public String getGroup(String sessionId); - public long getBeginTime(String sessionId); - public int getSize(); - public long getTimeToLive(); - public Enumeration getSessionIds(); } diff --git a/pki/base/common/src/com/netscape/certsrv/base/ISourceConfigStore.java b/pki/base/common/src/com/netscape/certsrv/base/ISourceConfigStore.java index 362fc8ad0..fb8628ba2 100644 --- a/pki/base/common/src/com/netscape/certsrv/base/ISourceConfigStore.java +++ b/pki/base/common/src/com/netscape/certsrv/base/ISourceConfigStore.java @@ -17,19 +17,20 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.base; + import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.Serializable; import java.util.Enumeration; + /** - * An interface that represents the source that creates the configuration store - * tree. Note that the tree can be built based on the information from a text - * file or ldap entries. - * + * An interface that represents the source that creates the configuration + * store tree. Note that the tree can be built based on the information + * from a text file or ldap entries. * @see com.netscape.certsrv.base.IConfigStore - * + * * @version $Revision$, $Date$ */ public interface ISourceConfigStore extends Serializable { @@ -37,7 +38,7 @@ public interface ISourceConfigStore extends Serializable { /** * Gets a property. * <P> - * + * * @param name The property name * @return property value */ @@ -46,7 +47,7 @@ public interface ISourceConfigStore extends Serializable { /** * Retrieves a property. * <P> - * + * * @param name The property name * @param value The property value */ @@ -55,7 +56,7 @@ public interface ISourceConfigStore extends Serializable { /** * Returns an enumeration of the config store's keys. * <P> - * + * * @return a list of keys * @see java.util.Hashtable#elements * @see java.util.Enumeration @@ -63,16 +64,16 @@ public interface ISourceConfigStore extends Serializable { public Enumeration keys(); /** - * Reads a config store from an input stream. - * + * Reads a config store from an input stream. + * * @param in input stream where the properties are located * @exception IOException If an IO error occurs while loading from input. */ public void load(InputStream in) throws IOException; /** - * Stores this config store to the specified output stream. - * + * Stores this config store to the specified output stream. + * * @param out output stream where the properties should be serialized * @param header optional header to be serialized */ diff --git a/pki/base/common/src/com/netscape/certsrv/base/ISubsystem.java b/pki/base/common/src/com/netscape/certsrv/base/ISubsystem.java index 994c8f758..77f1708ac 100644 --- a/pki/base/common/src/com/netscape/certsrv/base/ISubsystem.java +++ b/pki/base/common/src/com/netscape/certsrv/base/ISubsystem.java @@ -17,9 +17,13 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.base; + + + /** - * An interface represents a CMS subsystem. CMS is made up of a list subsystems. - * Each subsystem is responsible for a set of speciailized functions. + * An interface represents a CMS subsystem. CMS is made up of a list + * subsystems. Each subsystem is responsible for a set of + * speciailized functions. * <P> * * @version $Revision$, $Date$ @@ -28,40 +32,41 @@ public interface ISubsystem { /** * Retrieves the name of this subsystem. - * + * * @return subsystem identifier */ public String getId(); /** * Sets specific to this subsystem. - * + * * @param id subsystem identifier * @exception EBaseException failed to set id */ public void setId(String id) throws EBaseException; /** - * Initializes this subsystem with the given configuration store. + * Initializes this subsystem with the given configuration + * store. * <P> - * + * * @param owner owner of this subsystem * @param config configuration store * @exception EBaseException failed to initialize */ public void init(ISubsystem owner, IConfigStore config) - throws EBaseException; + throws EBaseException; /** * Notifies this subsystem if owner is in running mode. - * + * * @exception EBaseException failed to start up */ public void startup() throws EBaseException; /** - * Stops this system. The owner may call shutdown anytime after - * initialization. + * Stops this system. The owner may call shutdown + * anytime after initialization. * <P> */ public void shutdown(); @@ -69,7 +74,7 @@ public interface ISubsystem { /** * Returns the root configuration storage of this system. * <P> - * + * * @return configuration store of this subsystem */ public IConfigStore getConfigStore(); diff --git a/pki/base/common/src/com/netscape/certsrv/base/ISubsystemSource.java b/pki/base/common/src/com/netscape/certsrv/base/ISubsystemSource.java index 7c491d518..23b82179e 100644 --- a/pki/base/common/src/com/netscape/certsrv/base/ISubsystemSource.java +++ b/pki/base/common/src/com/netscape/certsrv/base/ISubsystemSource.java @@ -17,9 +17,12 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.base; + + + /** - * An interface represents a subsystem source. A subsystem source is a container - * that manages multiple subsystems. + * An interface represents a subsystem source. A subsystem + * source is a container that manages multiple subsystems. * <P> * * @version $Revision$, $Date$ @@ -28,7 +31,7 @@ public interface ISubsystemSource { /** * Retrieves subsystem from the source. - * + * * @param sid subsystem identifier * @return subsystem */ diff --git a/pki/base/common/src/com/netscape/certsrv/base/ITimeSource.java b/pki/base/common/src/com/netscape/certsrv/base/ITimeSource.java index 6805a5f90..f1e3e25e4 100644 --- a/pki/base/common/src/com/netscape/certsrv/base/ITimeSource.java +++ b/pki/base/common/src/com/netscape/certsrv/base/ITimeSource.java @@ -17,13 +17,17 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.base; + import java.util.Date; + /** - * This interface represents a time source where current time can be retrieved. - * CMS is installed with a default time source that returns current time based - * on the system time. It is possible to register a time source that returns the - * current time from a NTP server. + * This interface represents a time source where + * current time can be retrieved. CMS is installed + * with a default time source that returns + * current time based on the system time. It is + * possible to register a time source that returns + * the current time from a NTP server. * * @version $Revision$, $Date$ */ @@ -31,7 +35,7 @@ public interface ITimeSource { /** * Retrieves current time and date. - * + * * @return current time and date */ public Date getCurrentDate(); diff --git a/pki/base/common/src/com/netscape/certsrv/base/KeyGenInfo.java b/pki/base/common/src/com/netscape/certsrv/base/KeyGenInfo.java index 5fc417178..17efca771 100644 --- a/pki/base/common/src/com/netscape/certsrv/base/KeyGenInfo.java +++ b/pki/base/common/src/com/netscape/certsrv/base/KeyGenInfo.java @@ -17,6 +17,7 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.base; + import java.io.IOException; import netscape.security.util.DerInputStream; @@ -24,36 +25,35 @@ import netscape.security.util.DerValue; import netscape.security.x509.AlgorithmId; import netscape.security.x509.X509Key; + /** - * - * The <code>KeyGenInfo</code> represents the information generated by the - * KeyGen tag of the HTML forms. It provides the parsing and accessing - * mechanisms. - * <p> - * + * + * The <code>KeyGenInfo</code> represents the information generated by + * the KeyGen tag of the HTML forms. It provides the parsing and accessing + * mechanisms.<p> + * * <pre> * SignedPublicKeyAndChallenge ::= SEQUENCE { * publicKeyAndChallenge PublicKeyAndChallenge, * signatureAlgorithm AlgorithmIdentifier, * signature BIT STRING * } - * + * * PublicKeyAndChallenge ::= SEQUENCE { * spki SubjectPublicKeyInfo, * challenge IA5STRING * } - * </pre> - * - * + *</pre> + * + * * @version $Revision$, $Date$ */ public class KeyGenInfo { - /* - * ========================================================== variables - * ========================================================== - */ + /*========================================================== + * variables + *==========================================================*/ private String mSPKACString; private byte mPKAC[]; private byte mSPKAC[]; @@ -64,37 +64,36 @@ public class KeyGenInfo { private byte mSignature[]; private AlgorithmId mAlgId; - /* - * ========================================================== constructors - * ========================================================== - */ + /*========================================================== + * constructors + *==========================================================*/ /** - * Construct empty KeyGenInfo. Need to call decode function later to - * initialize. + * Construct empty KeyGenInfo. Need to call decode function + * later to initialize. */ public KeyGenInfo() { } /** - * Construct KeyGenInfo using the SignedPublicKeyAndChallenge string - * representation. - * + * Construct KeyGenInfo using the SignedPublicKeyAndChallenge + * string representation. + * * @param spkac SignedPublicKeyAndChallenge string representation */ - public KeyGenInfo(String spkac) throws IOException { + public KeyGenInfo(String spkac) + throws IOException { decode(spkac); } - /* - * ========================================================== public methods - * ========================================================== - */ + /*========================================================== + * public methods + *==========================================================*/ /** * Initialize using the SPKAC string - * + * * @param spkac SPKAC string from the end user */ public void decode(String spkac) throws IOException { @@ -105,7 +104,7 @@ public class KeyGenInfo { /** * Der encoded into buffer - * + * * @return Der encoded buffer */ public byte[] encode() { @@ -114,7 +113,7 @@ public class KeyGenInfo { /** * Get SPKI in DerValue form - * + * * @return SPKI in DerValue form */ public DerValue getDerSPKI() { @@ -123,7 +122,7 @@ public class KeyGenInfo { /** * Get SPKI as X509Key - * + * * @return SPKI in X509Key form */ public X509Key getSPKI() { @@ -132,7 +131,7 @@ public class KeyGenInfo { /** * Get Challenge phrase in DerValue form - * + * * @return Challenge in DerValue form. null if none. */ public DerValue getDerChallenge() { @@ -141,7 +140,7 @@ public class KeyGenInfo { /** * Get Challenge phrase in string format - * + * * @return challenge phrase. null if none. */ public String getChallenge() { @@ -150,7 +149,6 @@ public class KeyGenInfo { /** * Get Signature - * * @return signature */ public byte[] getSignature() { @@ -159,7 +157,6 @@ public class KeyGenInfo { /** * Get Algorithm ID - * * @return the algorithm id */ public AlgorithmId getAlgorithmId() { @@ -168,7 +165,7 @@ public class KeyGenInfo { /** * Validate Signature and Challenge Phrase - * + * * @param challenge phrase; null if none * @return true if validated; otherwise, false */ @@ -183,7 +180,7 @@ public class KeyGenInfo { /** * String representation of KenGenInfo - * + * * @return string representation of KeGenInfo */ public String toString() { @@ -192,17 +189,18 @@ public class KeyGenInfo { return ""; } - /* - * ========================================================== private - * methods========================================================== - */ + /*========================================================== + * private methods + *==========================================================*/ - private byte[] base64Decode(String spkac) throws IOException { + private byte[] base64Decode(String spkac) + throws IOException { return com.netscape.osutil.OSUtil.AtoB(spkac); } - private void derDecode(byte spkac[]) throws IOException { + private void derDecode(byte spkac[]) + throws IOException { DerInputStream derIn = new DerInputStream(spkac); /* get SPKAC Algorithm & Signature */ @@ -226,3 +224,4 @@ public class KeyGenInfo { } } + diff --git a/pki/base/common/src/com/netscape/certsrv/base/MessageFormatter.java b/pki/base/common/src/com/netscape/certsrv/base/MessageFormatter.java index a3fa598ed..16324fb91 100644 --- a/pki/base/common/src/com/netscape/certsrv/base/MessageFormatter.java +++ b/pki/base/common/src/com/netscape/certsrv/base/MessageFormatter.java @@ -17,6 +17,7 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.base; + import java.lang.reflect.Method; import java.text.MessageFormat; import java.util.Date; @@ -24,12 +25,13 @@ import java.util.Locale; import java.util.MissingResourceException; import java.util.ResourceBundle; + /** - * Factors out common function of formatting internatinalized messages taking - * arguments and using java.util.ResourceBundle and java.text.MessageFormat - * mechanism. + * Factors out common function of formatting internatinalized + * messages taking arguments and using java.util.ResourceBundle + * and java.text.MessageFormat mechanism. * <P> - * + * * @version $Revision$, $Date$ * @see java.text.MessageFormat * @see java.util.ResourceBundle @@ -40,47 +42,50 @@ public class MessageFormatter { /** * Retrieves the localized string. - * + * * @param locale end user locale * @param resourceBundleBaseName resource bundle class name * @param formatString format string * @return localized string */ - public static String getLocalizedString(Locale locale, - String resourceBundleBaseName, String formatString) { - return getLocalizedString(locale, resourceBundleBaseName, formatString, - null); + public static String getLocalizedString( + Locale locale, String resourceBundleBaseName, + String formatString) { + return getLocalizedString(locale, resourceBundleBaseName, + formatString, null); } /** * Retrieves the localized string. - * + * * @param locale end user locale * @param resourceBundleBaseName resource bundle class name * @param formatString format string * @param params parameters to be substituted * @return localized string */ - public static String getLocalizedString(Locale locale, - String resourceBundleBaseName, String formatString, Object params) { + public static String getLocalizedString( + Locale locale, String resourceBundleBaseName, + String formatString, Object params) { Object o[] = new Object[1]; o[0] = params; - return getLocalizedString(locale, resourceBundleBaseName, formatString, - o); + return getLocalizedString(locale, resourceBundleBaseName, + formatString, o); } /** * Retrieves the localized string. - * + * * @param locale end user locale * @param resourceBundleBaseName resource bundle class name * @param formatString format string * @param params parameters to be substituted * @return localized string */ - public static String getLocalizedString(Locale locale, - String resourceBundleBaseName, String formatString, Object[] params) { + public static String getLocalizedString( + Locale locale, String resourceBundleBaseName, + String formatString, Object[] params) { String localizedFormat = null; @@ -92,43 +97,42 @@ public class MessageFormatter { // instantiated everytime you call toString(). localizedFormat = ResourceBundle.getBundle( - resourceBundleBaseName, locale).getString(formatString); + resourceBundleBaseName, locale).getString(formatString); } catch (MissingResourceException e) { return formatString; - + } Object[] localizedParams = params; Object[] localeArg = null; if (params != null) { for (int i = 0; i < params.length; ++i) { - if (!(params[i] instanceof String) - || !(params[i] instanceof Date) - || !(params[i] instanceof Number)) { + if (!(params[i] instanceof String) || + !(params[i] instanceof Date) || + !(params[i] instanceof Number)) { if (localizedParams == params) { // only done once - // NB if the following variant of cloning code is - // used - // localizedParams = (Object [])mParams.clone(); + // NB if the following variant of cloning code is used + // localizedParams = (Object [])mParams.clone(); // it causes ArrayStoreException in - // localizedParams[i] = params[i].toString(); + // localizedParams[i] = params[i].toString(); // below localizedParams = new Object[params.length]; System.arraycopy(params, 0, localizedParams, 0, - params.length); + params.length); } try { - Method toStringMethod = params[i].getClass() - .getMethod("toString", toStringSignature); + Method toStringMethod = params[i].getClass().getMethod( + "toString", toStringSignature); if (localeArg == null) { // only done once localeArg = new Object[] { locale }; } localizedParams[i] = toStringMethod.invoke( - params[i], localeArg); + params[i], localeArg); } catch (Exception e) { // no method for localization, fall back localizedParams[i] = params[i].toString(); @@ -137,8 +141,7 @@ public class MessageFormatter { } } try { - // XXX - runtime exception may be raised by the following - // function + // XXX - runtime exception may be raised by the following function MessageFormat format = new MessageFormat(localizedFormat); return format.format(localizedParams); diff --git a/pki/base/common/src/com/netscape/certsrv/base/MetaAttributeDef.java b/pki/base/common/src/com/netscape/certsrv/base/MetaAttributeDef.java index 76c91c540..e01d40f88 100644 --- a/pki/base/common/src/com/netscape/certsrv/base/MetaAttributeDef.java +++ b/pki/base/common/src/com/netscape/certsrv/base/MetaAttributeDef.java @@ -17,15 +17,17 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.base; + import java.util.Enumeration; import java.util.Hashtable; import netscape.security.util.ObjectIdentifier; + /** * A class representing a meta attribute defintion. * <P> - * + * * @version $Revision$, $Date$ */ public class MetaAttributeDef { @@ -38,64 +40,66 @@ public class MetaAttributeDef { private MetaAttributeDef() { } - + /** * Constructs a MetaAttribute defintion * <P> - * + * * @param name attribute name * @param valueClass attribute value class * @param oid attribute object identifier */ - private MetaAttributeDef(String name, Class valueClass, ObjectIdentifier oid) { + private MetaAttributeDef(String name, Class valueClass, + ObjectIdentifier oid) { mName = name; mValueClass = valueClass; mOid = oid; } - + /** * Gets an attribute OID. * <P> - * + * * @return returns attribute OID or null if not defined. */ - public ObjectIdentifier getOID() { - return mOid; + public ObjectIdentifier getOID() { + return mOid; } /** * Gets an Java class for the attribute values * <P> - * + * * @return returns Java class for the attribute values */ - public Class getValueClass() { - return mValueClass; + public Class getValueClass() { + return mValueClass; } /** * Gets attribute name * <P> - * - * @return returns attribute name + * + * @return returns attribute name */ - public String getName() { - return mName; + public String getName() { + return mName; } - + /** - * Registers new MetaAttribute defintion Attribute is defined by name, Java - * class for attribute values and optional object identifier + * Registers new MetaAttribute defintion + * Attribute is defined by name, Java class for attribute values and + * optional object identifier * <P> - * + * * @param name attribute name * @param valueClass attribute value class * @param oid attribute object identifier * @exception IllegalArgumentException if name or valueClass are null, or - * conflicting attribute definition already exists + * conflicting attribute definition already exists */ - public static MetaAttributeDef register(String name, Class valueClass, - ObjectIdentifier oid) { + public static MetaAttributeDef register(String name, Class valueClass, + ObjectIdentifier oid) { if (name == null) { throw new IllegalArgumentException( "Attribute name must not be null"); @@ -108,53 +112,53 @@ public class MetaAttributeDef { MetaAttributeDef newDef = new MetaAttributeDef(name, valueClass, oid); MetaAttributeDef oldDef; - if ((oldDef = (MetaAttributeDef) mNameToAttrDef.get(name)) != null - && !oldDef.equals(newDef)) { - throw new IllegalArgumentException("Attribute \'" + name - + "\' is already defined"); + if ((oldDef = (MetaAttributeDef) mNameToAttrDef.get(name)) != null && + !oldDef.equals(newDef)) { + throw new IllegalArgumentException( + "Attribute \'" + name + "\' is already defined"); } - if (oid != null - && (oldDef = (MetaAttributeDef) mOidToAttrDef.get(oid)) != null - && !oldDef.equals(newDef)) { - throw new IllegalArgumentException("OID \'" + oid - + "\' is already in use"); + if (oid != null && + (oldDef = (MetaAttributeDef) mOidToAttrDef.get(oid)) != null && + !oldDef.equals(newDef)) { + throw new IllegalArgumentException( + "OID \'" + oid + "\' is already in use"); } mNameToAttrDef.put(name, newDef); if (oid != null) { mOidToAttrDef.put(oid, newDef); } return newDef; - } - + } + /** * Compares this attribute definition with another, for equality. * <P> - * - * @return true iff names, valueClasses and object identifiers are - * identical. + * + * @return true iff names, valueClasses and object identifiers + * are identical. */ public boolean equals(Object other) { if (other == this) return true; - + if (other instanceof MetaAttributeDef) { MetaAttributeDef otherDef = (MetaAttributeDef) other; - if ((mOid != null && otherDef.mOid != null && !mOid - .equals(otherDef.mOid)) - || (mOid == null && otherDef.mOid != null) - || !mName.equals(otherDef.mName) - || !mValueClass.equals(otherDef.mValueClass)) { + if ((mOid != null && otherDef.mOid != null && + !mOid.equals(otherDef.mOid)) || + (mOid == null && otherDef.mOid != null) || + !mName.equals(otherDef.mName) || + !mValueClass.equals(otherDef.mValueClass)) { return false; } } return false; } - + /** * Retrieves attribute definition by name * <P> - * + * * @param name attribute name * @return attribute definition or null if not found */ @@ -165,7 +169,7 @@ public class MetaAttributeDef { /** * Retrieves attribute definition by object identifier * <P> - * + * * @param oid attribute object identifier * @return attribute definition or null if not found */ @@ -176,7 +180,7 @@ public class MetaAttributeDef { /** * Returns enumeration of the registered attribute names * <P> - * + * * @return returns enumeration of the registered attribute names */ public static Enumeration getAttributeNames() { @@ -186,7 +190,7 @@ public class MetaAttributeDef { /** * Returns enumeration of the registered attribute object identifiers * <P> - * + * * @return returns enumeration of the attribute object identifiers */ public static Enumeration getAttributeNameOids() { diff --git a/pki/base/common/src/com/netscape/certsrv/base/MetaInfo.java b/pki/base/common/src/com/netscape/certsrv/base/MetaInfo.java index 41415d379..1922e74c6 100644 --- a/pki/base/common/src/com/netscape/certsrv/base/MetaInfo.java +++ b/pki/base/common/src/com/netscape/certsrv/base/MetaInfo.java @@ -17,14 +17,17 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.base; + import java.util.Enumeration; import java.util.Hashtable; + /** - * A class represents meta information. A meta information object is just a - * generic hashtable that is embedded into a request object. + * A class represents meta information. A meta information + * object is just a generic hashtable that is embedded into + * a request object. * <P> - * + * * @version $Revision$, $Date$ */ public class MetaInfo implements IAttrSet { @@ -38,7 +41,7 @@ public class MetaInfo implements IAttrSet { private Hashtable content = new Hashtable(); - /** + /** * Constructs a meta information. * <P> */ @@ -48,7 +51,7 @@ public class MetaInfo implements IAttrSet { /** * Returns a short string describing this certificate attribute. * <P> - * + * * @return information about this certificate attribute. */ public String toString() { @@ -66,11 +69,11 @@ public class MetaInfo implements IAttrSet { sb.append("]\n"); return sb.toString(); } - + /** * Gets an attribute value. * <P> - * + * * @param name the name of the attribute to return. * @exception EBaseException on attribute handling errors. */ @@ -80,8 +83,8 @@ public class MetaInfo implements IAttrSet { /** * Sets an attribute value. - * - * @param name the name of the attribute + * + * @param name the name of the attribute * @param obj the attribute object. * * @exception EBaseException on attribute handling errors. @@ -89,18 +92,18 @@ public class MetaInfo implements IAttrSet { public void set(String name, Object obj) throws EBaseException { content.put(name, obj); } - + /** * Deletes an attribute value from this CertAttrSet. * <P> - * + * * @param name the name of the attribute to delete. * @exception EBaseException on attribute handling errors. */ public void delete(String name) throws EBaseException { content.remove(name); } - + /** * Returns an enumeration of the names of the attributes existing within * this attribute. diff --git a/pki/base/common/src/com/netscape/certsrv/base/Nonces.java b/pki/base/common/src/com/netscape/certsrv/base/Nonces.java index cec105e03..470ba654c 100644 --- a/pki/base/common/src/com/netscape/certsrv/base/Nonces.java +++ b/pki/base/common/src/com/netscape/certsrv/base/Nonces.java @@ -21,10 +21,11 @@ import java.security.cert.X509Certificate; import java.util.Hashtable; import java.util.Vector; + /** * This class manages nonces sometimes used to control request state flow. * <P> - * + * * @version $Revision$, $Date$ */ public class Nonces implements IAuthInfo { @@ -52,17 +53,17 @@ public class Nonces implements IAuthInfo { long i; long k = 0; long n = nonce; - long m = (long) ((mNonceLimit / 2) + 1); + long m = (long)((mNonceLimit / 2) + 1); for (i = 0; i < m; i++) { k = n + i; // avoid collisions - if (!mNonceList.contains((Object) k)) { + if (!mNonceList.contains((Object)k)) { break; } k = n - i; // avoid collisions - if (!mNonceList.contains((Object) k)) { + if (!mNonceList.contains((Object)k)) { break; } } @@ -70,9 +71,9 @@ public class Nonces implements IAuthInfo { mNonceList.add(k); mNonces.put(k, cert); if (mNonceList.size() > mNonceLimit) { - n = ((Long) (mNonceList.firstElement())).longValue(); + n = ((Long)(mNonceList.firstElement())).longValue(); mNonceList.remove(0); - mNonces.remove((Object) n); + mNonces.remove((Object)n); } } else { // failed to resolved collision @@ -82,15 +83,15 @@ public class Nonces implements IAuthInfo { } public X509Certificate getCertificate(long nonce) { - X509Certificate cert = (X509Certificate) mNonces.get(nonce); + X509Certificate cert = (X509Certificate)mNonces.get(nonce); return cert; } public X509Certificate getCertificate(int index) { X509Certificate cert = null; if (index >= 0 && index < mNonceList.size()) { - long nonce = ((Long) (mNonceList.elementAt(index))).longValue(); - cert = (X509Certificate) mNonces.get(nonce); + long nonce = ((Long)(mNonceList.elementAt(index))).longValue(); + cert = (X509Certificate)mNonces.get(nonce); } return cert; } @@ -98,16 +99,17 @@ public class Nonces implements IAuthInfo { public long getNonce(int index) { long nonce = 0; if (index >= 0 && index < mNonceList.size()) { - nonce = ((Long) (mNonceList.elementAt(index))).longValue(); + nonce = ((Long)(mNonceList.elementAt(index))).longValue(); } return nonce; } public void removeNonce(long nonce) { - mNonceList.remove((Object) nonce); - mNonces.remove((Object) nonce); + mNonceList.remove((Object)nonce); + mNonces.remove((Object)nonce); } + public int size() { return mNonceList.size(); } diff --git a/pki/base/common/src/com/netscape/certsrv/base/PasswordResources.java b/pki/base/common/src/com/netscape/certsrv/base/PasswordResources.java index c3309c5fa..287ce795d 100644 --- a/pki/base/common/src/com/netscape/certsrv/base/PasswordResources.java +++ b/pki/base/common/src/com/netscape/certsrv/base/PasswordResources.java @@ -17,12 +17,14 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.base; + import java.util.ListResourceBundle; + /** * A class represents a resource bundle for the password checker. * <p> - * + * * @version $Revision$, $Date$ * @see java.util.ListResourceBundle */ @@ -40,3 +42,4 @@ public class PasswordResources extends ListResourceBundle { */ static final Object[][] contents = {}; } + diff --git a/pki/base/common/src/com/netscape/certsrv/base/Plugin.java b/pki/base/common/src/com/netscape/certsrv/base/Plugin.java index 79fae88ac..e7001ce56 100644 --- a/pki/base/common/src/com/netscape/certsrv/base/Plugin.java +++ b/pki/base/common/src/com/netscape/certsrv/base/Plugin.java @@ -17,6 +17,9 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.base; + + + /** * This represents a generici CMS plugin. * <p> @@ -38,10 +41,10 @@ public class Plugin { mId = id; mClassPath = classPath; } - + /** * Returns the plugin identifier. - * + * * @return plugin id */ public String getId() { @@ -50,7 +53,7 @@ public class Plugin { /** * Returns the plugin classpath. - * + * * @return plugin classpath */ public String getClassPath() { diff --git a/pki/base/common/src/com/netscape/certsrv/base/SessionContext.java b/pki/base/common/src/com/netscape/certsrv/base/SessionContext.java index 956a579e9..29c390acd 100644 --- a/pki/base/common/src/com/netscape/certsrv/base/SessionContext.java +++ b/pki/base/common/src/com/netscape/certsrv/base/SessionContext.java @@ -17,16 +17,19 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.base; + import java.util.Hashtable; + /** - * This class specifies the context object that includes authentication - * environment and connection information. This object is later used in access - * control evaluation. This is a global object that can be accessible throughout - * the server. It is useful for passing global and per-thread infomration in - * methods. + * This class specifies the context object that includes + * authentication environment and connection information. + * This object is later used in access control evaluation. + * This is a global object that can be accessible + * throughout the server. It is useful for passing + * global and per-thread infomration in methods. * <P> - * + * * @version $Revision$, $Date$ */ public class SessionContext extends Hashtable implements IAuthInfo { @@ -64,7 +67,7 @@ public class SessionContext extends Hashtable implements IAuthInfo { /** * Group ID of the authenticated user in the current thread. */ - public static final String GROUP_ID = "groupid"; // String + public static final String GROUP_ID = "groupid"; //String /** * ID of the processing request in the current thread. @@ -91,9 +94,10 @@ public class SessionContext extends Hashtable implements IAuthInfo { } /** - * Creates a new context and associates it with the current thread. If the - * current thread is also associated with a old context, the old context - * will be replaced. + * Creates a new context and associates it with + * the current thread. If the current thread is + * also associated with a old context, the old + * context will be replaced. */ private static SessionContext createContext() { SessionContext sc = new SessionContext(); @@ -103,10 +107,12 @@ public class SessionContext extends Hashtable implements IAuthInfo { } /** - * Sets the current context. This allows the caller to associate a specific - * session context with the current thread. This methods makes custom - * session context possible. - * + * Sets the current context. This allows the + * caller to associate a specific session context + * with the current thread. + * This methods makes custom session context + * possible. + * * @param sc session context */ public static void setContext(SessionContext sc) { @@ -114,14 +120,15 @@ public class SessionContext extends Hashtable implements IAuthInfo { } /** - * Retrieves the session context associated with the current thread. If no - * context is associated, a context is created. - * + * Retrieves the session context associated with + * the current thread. If no context is associated, + * a context is created. + * * @return sesssion context */ public static SessionContext getContext() { - SessionContext sc = (SessionContext) mContexts.get(Thread - .currentThread()); + SessionContext sc = (SessionContext) mContexts.get( + Thread.currentThread()); if (sc == null) { sc = createContext(); @@ -130,14 +137,15 @@ public class SessionContext extends Hashtable implements IAuthInfo { } /** - * Retrieves the session context associated with the current thread. If no - * context is associated, null is returned. - * + * Retrieves the session context associated with + * the current thread. If no context is associated, + * null is returned. + * * @return sesssion context */ public static SessionContext getExistingContext() { - SessionContext sc = (SessionContext) mContexts.get(Thread - .currentThread()); + SessionContext sc = (SessionContext) + mContexts.get(Thread.currentThread()); if (sc == null) { return null; @@ -150,8 +158,8 @@ public class SessionContext extends Hashtable implements IAuthInfo { * Releases the current session context. */ public static void releaseContext() { - SessionContext sc = (SessionContext) mContexts.get(Thread - .currentThread()); + SessionContext sc = (SessionContext) mContexts.get( + Thread.currentThread()); if (sc != null) { mContexts.remove(Thread.currentThread()); |