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/IConfigStore.java | |
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/IConfigStore.java')
-rw-r--r-- | pki/base/common/src/com/netscape/certsrv/base/IConfigStore.java | 143 |
1 files changed, 63 insertions, 80 deletions
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(); } + |