summaryrefslogtreecommitdiffstats
path: root/pki/base/common/src/com/netscape/certsrv/profile
diff options
context:
space:
mode:
authorAde Lee <alee@redhat.com>2012-01-11 12:57:53 -0500
committerAde Lee <alee@redhat.com>2012-01-11 13:49:04 -0500
commit10cfe7756e967ac91c66d33b392aeab9cf3780fb (patch)
treed5ac9b58442265d2ce5ef60e31f041ddacba1b4f /pki/base/common/src/com/netscape/certsrv/profile
parentedcb24f65cc3700e75d0a1d14dc2483f210b0ee4 (diff)
downloadpki-10cfe7756e967ac91c66d33b392aeab9cf3780fb.tar.gz
pki-10cfe7756e967ac91c66d33b392aeab9cf3780fb.tar.xz
pki-10cfe7756e967ac91c66d33b392aeab9cf3780fb.zip
Formatting (no line wrap in comments or code)
Diffstat (limited to 'pki/base/common/src/com/netscape/certsrv/profile')
-rw-r--r--pki/base/common/src/com/netscape/certsrv/profile/CertInfoProfile.java67
-rw-r--r--pki/base/common/src/com/netscape/certsrv/profile/EDeferException.java21
-rw-r--r--pki/base/common/src/com/netscape/certsrv/profile/EProfileException.java7
-rw-r--r--pki/base/common/src/com/netscape/certsrv/profile/ERejectException.java13
-rw-r--r--pki/base/common/src/com/netscape/certsrv/profile/ICertInfoPolicyDefault.java2
-rw-r--r--pki/base/common/src/com/netscape/certsrv/profile/IEnrollProfile.java17
-rw-r--r--pki/base/common/src/com/netscape/certsrv/profile/IPolicyConstraint.java22
-rw-r--r--pki/base/common/src/com/netscape/certsrv/profile/IPolicyDefault.java63
-rw-r--r--pki/base/common/src/com/netscape/certsrv/profile/IProfile.java172
-rw-r--r--pki/base/common/src/com/netscape/certsrv/profile/IProfileAuthenticator.java27
-rw-r--r--pki/base/common/src/com/netscape/certsrv/profile/IProfileContext.java7
-rw-r--r--pki/base/common/src/com/netscape/certsrv/profile/IProfileEx.java2
-rw-r--r--pki/base/common/src/com/netscape/certsrv/profile/IProfileInput.java30
-rw-r--r--pki/base/common/src/com/netscape/certsrv/profile/IProfileOutput.java30
-rw-r--r--pki/base/common/src/com/netscape/certsrv/profile/IProfilePolicy.java10
-rw-r--r--pki/base/common/src/com/netscape/certsrv/profile/IProfileSubsystem.java48
-rw-r--r--pki/base/common/src/com/netscape/certsrv/profile/IProfileUpdater.java16
17 files changed, 254 insertions, 300 deletions
diff --git a/pki/base/common/src/com/netscape/certsrv/profile/CertInfoProfile.java b/pki/base/common/src/com/netscape/certsrv/profile/CertInfoProfile.java
index 75f134c2a..5c192e9cd 100644
--- a/pki/base/common/src/com/netscape/certsrv/profile/CertInfoProfile.java
+++ b/pki/base/common/src/com/netscape/certsrv/profile/CertInfoProfile.java
@@ -26,8 +26,7 @@ import netscape.security.x509.X509CertInfo;
import com.netscape.certsrv.apps.CMS;
import com.netscape.certsrv.base.IConfigStore;
-public class CertInfoProfile
-{
+public class CertInfoProfile {
private Vector<ICertInfoPolicyDefault> mDefaults = new Vector<ICertInfoPolicyDefault>();
private String mName = null;
private String mID = null;
@@ -35,8 +34,7 @@ public class CertInfoProfile
private String mProfileIDMapping = null;
private String mProfileSetIDMapping = null;
- public CertInfoProfile(String cfg) throws Exception
- {
+ public CertInfoProfile(String cfg) throws Exception {
IConfigStore config = CMS.createFileConfigStore(cfg);
mID = config.getString("id");
mName = config.getString("name");
@@ -45,67 +43,60 @@ public class CertInfoProfile
mProfileSetIDMapping = config.getString("profileSetIDMapping");
StringTokenizer st = new StringTokenizer(config.getString("list"), ",");
while (st.hasMoreTokens()) {
- String id = (String)st.nextToken();
+ String id = (String) st.nextToken();
String c = config.getString(id + ".default.class");
try {
- /* load defaults */
- ICertInfoPolicyDefault def = (ICertInfoPolicyDefault)
- Class.forName(c).newInstance();
- init(config.getSubStore(id + ".default"), def);
- mDefaults.addElement(def);
+ /* load defaults */
+ ICertInfoPolicyDefault def = (ICertInfoPolicyDefault)
+ Class.forName(c).newInstance();
+ init(config.getSubStore(id + ".default"), def);
+ mDefaults.addElement(def);
} catch (Exception e) {
- CMS.debug("CertInfoProfile: " + e.toString());
+ CMS.debug("CertInfoProfile: " + e.toString());
}
}
}
private void init(IConfigStore config, ICertInfoPolicyDefault def)
- throws Exception
- {
- try {
- def.init(null, config);
- } catch (Exception e) {
- CMS.debug("CertInfoProfile.init: " + e.toString());
- }
+ throws Exception {
+ try {
+ def.init(null, config);
+ } catch (Exception e) {
+ CMS.debug("CertInfoProfile.init: " + e.toString());
+ }
}
- public String getID()
- {
+ public String getID() {
return mID;
}
- public String getName()
- {
+ public String getName() {
return mName;
}
- public String getDescription()
- {
+ public String getDescription() {
return mDescription;
}
- public String getProfileIDMapping()
- {
+ public String getProfileIDMapping() {
return mProfileIDMapping;
}
- public String getProfileSetIDMapping()
- {
+ public String getProfileSetIDMapping() {
return mProfileSetIDMapping;
}
- public void populate(X509CertInfo info)
- {
+ public void populate(X509CertInfo info) {
Enumeration<ICertInfoPolicyDefault> e1 = mDefaults.elements();
while (e1.hasMoreElements()) {
- ICertInfoPolicyDefault def =
- (ICertInfoPolicyDefault)e1.nextElement();
- try {
- def.populate(null /* request */, info);
- } catch (Exception e) {
- CMS.debug(e);
- CMS.debug("CertInfoProfile.populate: " + e.toString());
- }
+ ICertInfoPolicyDefault def =
+ (ICertInfoPolicyDefault) e1.nextElement();
+ try {
+ def.populate(null /* request */, info);
+ } catch (Exception e) {
+ CMS.debug(e);
+ CMS.debug("CertInfoProfile.populate: " + e.toString());
+ }
}
}
}
diff --git a/pki/base/common/src/com/netscape/certsrv/profile/EDeferException.java b/pki/base/common/src/com/netscape/certsrv/profile/EDeferException.java
index f4af86b21..c92630b97 100644
--- a/pki/base/common/src/com/netscape/certsrv/profile/EDeferException.java
+++ b/pki/base/common/src/com/netscape/certsrv/profile/EDeferException.java
@@ -17,17 +17,14 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.profile;
-
/**
- * This represents a profile specific exception. The
- * framework raises this exception when a request is
- * deferred.
+ * This represents a profile specific exception. The
+ * framework raises this exception when a request is
+ * deferred.
* <p>
- * A deferred request will not be processed
- * immediately. Manual approval is required for
- * processing the request again.
+ * A deferred request will not be processed immediately. Manual approval is required for processing the request again.
* <p>
- *
+ *
* @version $Revision$, $Date$
*/
public class EDeferException extends EProfileException {
@@ -39,10 +36,10 @@ public class EDeferException extends EProfileException {
/**
* Creates a defer exception.
- *
- * @param msg localized message that will be
- * displayed to end user. This message
- * should indicate the reason why a request
+ *
+ * @param msg localized message that will be
+ * displayed to end user. This message
+ * should indicate the reason why a request
* is deferred.
*/
public EDeferException(String msg) {
diff --git a/pki/base/common/src/com/netscape/certsrv/profile/EProfileException.java b/pki/base/common/src/com/netscape/certsrv/profile/EProfileException.java
index d21d6edb0..37f968a67 100644
--- a/pki/base/common/src/com/netscape/certsrv/profile/EProfileException.java
+++ b/pki/base/common/src/com/netscape/certsrv/profile/EProfileException.java
@@ -22,10 +22,9 @@ import com.netscape.certsrv.base.EBaseException;
/**
* This represents a generic profile exception.
* <p>
- * This is the base class for all profile-specific
- * exception.
+ * This is the base class for all profile-specific exception.
* <p>
- *
+ *
* @version $Revision$, $Date$
*/
public class EProfileException extends EBaseException {
@@ -37,7 +36,7 @@ public class EProfileException extends EBaseException {
/**
* Creates a profile exception.
- *
+ *
* @param msg additional message for the handler
* of the exception. The message may
* or may not be localized.
diff --git a/pki/base/common/src/com/netscape/certsrv/profile/ERejectException.java b/pki/base/common/src/com/netscape/certsrv/profile/ERejectException.java
index ceea57f21..59b35bcdb 100644
--- a/pki/base/common/src/com/netscape/certsrv/profile/ERejectException.java
+++ b/pki/base/common/src/com/netscape/certsrv/profile/ERejectException.java
@@ -17,16 +17,13 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.profile;
-
/**
* This represents a profile specific exception. This
* exception is raised when a request is rejected.
* <p>
- * A rejected request cannot be reprocessed. Rejected
- * request is considered as a request in its terminal
- * state.
+ * A rejected request cannot be reprocessed. Rejected request is considered as a request in its terminal state.
* <p>
- *
+ *
* @version $Revision$, $Date$
*/
public class ERejectException extends EProfileException {
@@ -37,10 +34,10 @@ public class ERejectException extends EProfileException {
private static final long serialVersionUID = -542393641391361342L;
/**
- * Creates a rejection exception.
- *
+ * Creates a rejection exception.
+ *
* @param msg localized message that indicates
- * the reason why a request is
+ * the reason why a request is
* rejected.
*/
public ERejectException(String msg) {
diff --git a/pki/base/common/src/com/netscape/certsrv/profile/ICertInfoPolicyDefault.java b/pki/base/common/src/com/netscape/certsrv/profile/ICertInfoPolicyDefault.java
index bfd9bdc95..698791296 100644
--- a/pki/base/common/src/com/netscape/certsrv/profile/ICertInfoPolicyDefault.java
+++ b/pki/base/common/src/com/netscape/certsrv/profile/ICertInfoPolicyDefault.java
@@ -27,6 +27,6 @@ public interface ICertInfoPolicyDefault extends IPolicyDefault {
/**
* Populates certificate info directly.
*/
- public void populate(IRequest request, X509CertInfo info)
+ public void populate(IRequest request, X509CertInfo info)
throws EBaseException;
}
diff --git a/pki/base/common/src/com/netscape/certsrv/profile/IEnrollProfile.java b/pki/base/common/src/com/netscape/certsrv/profile/IEnrollProfile.java
index fb92d53ee..7d3d7ff71 100644
--- a/pki/base/common/src/com/netscape/certsrv/profile/IEnrollProfile.java
+++ b/pki/base/common/src/com/netscape/certsrv/profile/IEnrollProfile.java
@@ -22,27 +22,23 @@ import com.netscape.certsrv.request.IRequest;
/**
* This interface represents an enrollment profile.
* <p>
- * An enrollment profile contains a list of enrollment
- * specific input plugins, default policies, constriant
- * policies and output plugins.
+ * An enrollment profile contains a list of enrollment specific input plugins, default policies, constriant policies and output plugins.
* <p>
- * This interface also defines a set of enrollment specific
- * attribute names that can be used to retrieve values
- * from an enrollment request.
+ * This interface also defines a set of enrollment specific attribute names that can be used to retrieve values from an enrollment request.
* <p>
- *
+ *
* @version $Revision$, $Date$
*/
public interface IEnrollProfile extends IProfile {
/**
- * Name of request attribute that stores the User
+ * Name of request attribute that stores the User
* Supplied Certificate Request Type.
*/
public static final String CTX_CERT_REQUEST_TYPE = "cert_request_type";
/**
- * Name of request attribute that stores the User
+ * Name of request attribute that stores the User
* Supplied Certificate Request.
*/
public static final String CTX_CERT_REQUEST = "cert_request";
@@ -56,7 +52,7 @@ public interface IEnrollProfile extends IProfile {
public static final String REQ_TYPE_KEYGEN = "keygen";
/**
- * Name of request attribute that stores the End-User Locale.
+ * Name of request attribute that stores the End-User Locale.
* <p>
* The value is of type java.util.Locale.
*/
@@ -151,6 +147,7 @@ public interface IEnrollProfile extends IProfile {
/**
* Set Default X509CertInfo in the request.
+ *
* @param request profile-based certificate request.
* @exception EProfileException failed to set the X509CertInfo.
*/
diff --git a/pki/base/common/src/com/netscape/certsrv/profile/IPolicyConstraint.java b/pki/base/common/src/com/netscape/certsrv/profile/IPolicyConstraint.java
index 1af3ef190..bf2374652 100644
--- a/pki/base/common/src/com/netscape/certsrv/profile/IPolicyConstraint.java
+++ b/pki/base/common/src/com/netscape/certsrv/profile/IPolicyConstraint.java
@@ -17,38 +17,36 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.profile;
-
import java.util.Locale;
import com.netscape.certsrv.base.IConfigStore;
import com.netscape.certsrv.property.IConfigTemplate;
import com.netscape.certsrv.request.IRequest;
-
/**
* This represents a constraint policy. A constraint policy
* validates if the given request conforms to the set
* rules.
* <p>
- *
+ *
* @version $Revision$, $Date$
*/
public interface IPolicyConstraint extends IConfigTemplate {
/**
* Initializes this constraint policy.
- *
+ *
* @param profile owner of this policy
* @param config configuration store for this constraint
* @exception EProfileException failed to initialize
*/
public void init(IProfile profile, IConfigStore config)
- throws EProfileException;
+ throws EProfileException;
/**
* Returns the corresponding configuration store
* of this constraint policy.
- *
+ *
* @return config store of this constraint
*/
public IConfigStore getConfigStore();
@@ -56,16 +54,16 @@ public interface IPolicyConstraint extends IConfigTemplate {
/**
* Validates the request. The request is not modified
* during the validation.
- *
+ *
* @param request request to be validated
* @exception ERejectException reject the given request
*/
public void validate(IRequest request)
- throws ERejectException;
+ throws ERejectException;
/**
* Returns localized description of this constraint.
- *
+ *
* @param locale locale of the end-user
* @return localized description of this constraint
*/
@@ -73,7 +71,7 @@ public interface IPolicyConstraint extends IConfigTemplate {
/**
* Returns localized name of this constraint.
- *
+ *
* @param locale locale of the end-user
* @return localized name of this constraint
*/
@@ -82,10 +80,10 @@ public interface IPolicyConstraint extends IConfigTemplate {
/**
* Checks if this constraint is applicable to the
* given default policy.
- *
+ *
* @param def default policy to be checked
* @return true if this constraint can be applied to
- * the given default policy
+ * the given default policy
*/
public boolean isApplicable(IPolicyDefault def);
}
diff --git a/pki/base/common/src/com/netscape/certsrv/profile/IPolicyDefault.java b/pki/base/common/src/com/netscape/certsrv/profile/IPolicyDefault.java
index 092b10fdc..bf1aefcff 100644
--- a/pki/base/common/src/com/netscape/certsrv/profile/IPolicyDefault.java
+++ b/pki/base/common/src/com/netscape/certsrv/profile/IPolicyDefault.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.profile;
-
import java.util.Enumeration;
import java.util.Locale;
@@ -27,36 +26,20 @@ import com.netscape.certsrv.property.IConfigTemplate;
import com.netscape.certsrv.property.IDescriptor;
import com.netscape.certsrv.request.IRequest;
-
/**
* This represents a default policy that populates
* the request with additional values.
* <p>
- *
- * During request submission process, a default
- * policy is invoked to populate the default values
- * in the request. The default values will later
- * on be used for execution. The default values
- * are like the parameters for the request.
+ *
+ * During request submission process, a default policy is invoked to populate the default values in the request. The default values will later on be used for execution. The default values are like the parameters for the request.
* <p>
- *
- * This policy is called in 2 places. For
- * automated enrollment request, this policy
- * is invoked to populate the HTTP parameters
- * into the request. For request that cannot
- * be executed immediately, this policy will be
- * invoked again right after the agent's
- * approval.
+ *
+ * This policy is called in 2 places. For automated enrollment request, this policy is invoked to populate the HTTP parameters into the request. For request that cannot be executed immediately, this policy will be invoked again right after the agent's approval.
* <p>
- *
- * Each default policy may contain zero or more
- * properties that describe the default value.
- * For example, a X509 Key can be described by
- * its key type, key length, and key data. The
- * properties help to describe the default value
- * into human readable values.
+ *
+ * Each default policy may contain zero or more properties that describe the default value. For example, a X509 Key can be described by its key type, key length, and key data. The properties help to describe the default value into human readable values.
* <p>
- *
+ *
* @version $Revision$, $Date$
*/
public interface IPolicyDefault extends IConfigTemplate {
@@ -69,27 +52,27 @@ public interface IPolicyDefault extends IConfigTemplate {
* @exception EProfileException failed to initialize
*/
public void init(IProfile profile, IConfigStore config)
- throws EProfileException;
+ throws EProfileException;
/**
* Retrieves the configuration store of this default.
- *
+ *
* @return configuration store of this default policy
*/
public IConfigStore getConfigStore();
/**
* Populates the request with this policy default.
- *
+ *
* @param request request to be populated
* @exception EProfileException failed to populate
*/
public void populate(IRequest request)
- throws EProfileException;
-
+ throws EProfileException;
+
/**
* Retrieves the localizable name of this policy.
- *
+ *
* @param locale locale of the end user
* @return localized name of this default policy
*/
@@ -105,17 +88,17 @@ public interface IPolicyDefault extends IConfigTemplate {
/**
* Retrieves a list of names of the property.
- *
+ *
* @return a list of property names. The values are
* of type java.lang.String
*/
public Enumeration<String> getValueNames();
/**
- * Retrieves the descriptor of the given property
- * by name. The descriptor contains syntax
+ * Retrieves the descriptor of the given property
+ * by name. The descriptor contains syntax
* information.
- *
+ *
* @param locale locale of the end user
* @param name name of property
* @return descriptor of the property
@@ -124,25 +107,25 @@ public interface IPolicyDefault extends IConfigTemplate {
/**
* Sets the value of the given value property by name.
- *
+ *
* @param name name of property
* @param locale locale of the end user
* @param request request
* @param value value to be set in the given request
* @exception EPropertyException failed to set property
*/
- public void setValue(String name, Locale locale, IRequest request,
- String value) throws EPropertyException;
+ public void setValue(String name, Locale locale, IRequest request,
+ String value) throws EPropertyException;
/**
- * Retrieves the value of the given value
+ * Retrieves the value of the given value
* property by name.
- *
+ *
* @param name name of property
* @param locale locale of the end user
* @param request request
* @exception EPropertyException failed to get property
*/
public String getValue(String name, Locale locale, IRequest request)
- throws EPropertyException;
+ throws EPropertyException;
}
diff --git a/pki/base/common/src/com/netscape/certsrv/profile/IProfile.java b/pki/base/common/src/com/netscape/certsrv/profile/IProfile.java
index cc6975cdf..779bf6a88 100644
--- a/pki/base/common/src/com/netscape/certsrv/profile/IProfile.java
+++ b/pki/base/common/src/com/netscape/certsrv/profile/IProfile.java
@@ -29,63 +29,59 @@ import com.netscape.certsrv.request.IRequestQueue;
import com.netscape.cms.profile.common.ProfilePolicy;
/**
- * This interface represents a profile. A profile contains
- * a list of input policies, default policies, constraint
+ * This interface represents a profile. A profile contains
+ * a list of input policies, default policies, constraint
* policies and output policies.
* <p>
- *
+ *
* The input policy is for building the enrollment page.
* <p>
- *
- * The default policy is for populating user-supplied and
- * system-supplied values into the request.
+ *
+ * The default policy is for populating user-supplied and system-supplied values into the request.
* <p>
- *
- * The constraint policy is for validating the request before
- * processing.
+ *
+ * The constraint policy is for validating the request before processing.
* <p>
- *
+ *
* The output policy is for building the result page.
* <p>
- *
- * Each profile can have multiple policy set. Each set
- * is composed of zero or more default policies and zero
- * or more constraint policies.
+ *
+ * Each profile can have multiple policy set. Each set is composed of zero or more default policies and zero or more constraint policies.
* <p>
- *
+ *
* @version $Revision$, $Date$
*/
public interface IProfile {
/**
* Initializes this profile.
- *
+ *
* @param owner profile subsystem
* @param config configuration store for this profile
* @exception EBaseException failed to initialize
*/
public void init(IProfileSubsystem owner, IConfigStore config)
- throws EBaseException;
+ throws EBaseException;
/**
* Retrieves the request queue that is associated with
* this profile. The request queue is for creating
* new requests.
- *
+ *
* @return request queue
*/
public IRequestQueue getRequestQueue();
/**
* Sets id of this profile.
- *
+ *
* @param id profile identifier
*/
public void setId(String id);
-
+
/**
* Returns the identifier of this profile.
- *
+ *
* @return profile id
*/
public String getId();
@@ -94,7 +90,7 @@ public interface IProfile {
* Retrieves a localized string that represents
* requestor's distinguished name. This string
* displayed in the request listing user interface.
- *
+ *
* @param request request
* @return distringuished name of the request owner
*/
@@ -102,14 +98,14 @@ public interface IProfile {
/**
* Retrieves the configuration store of this profile.
- *
+ *
* @return configuration store
*/
public IConfigStore getConfigStore();
/**
* Retrieves the instance id of the authenticator for this profile.
- *
+ *
* @return authenticator instance id
*/
public String getAuthenticatorId();
@@ -118,31 +114,31 @@ public interface IProfile {
/**
* Sets the instance id of the authenticator for this profile.
- *
+ *
* @param id authenticator instance id
*/
public void setAuthenticatorId(String id);
/**
* Retrieves the associated authenticator instance.
- *
- * @return profile authenticator instance.
- * if no associated authenticator, null is returned
+ *
+ * @return profile authenticator instance.
+ * if no associated authenticator, null is returned
* @exception EProfileException failed to retrieve
*/
- public IProfileAuthenticator getAuthenticator()
- throws EProfileException;
+ public IProfileAuthenticator getAuthenticator()
+ throws EProfileException;
/**
* Retrieves a list of input policy IDs.
- *
+ *
* @return input policy id list
*/
public Enumeration<String> getProfileInputIds();
/**
* Retrieves input policy by id.
- *
+ *
* @param id input policy id
* @return input policy instance
*/
@@ -150,14 +146,14 @@ public interface IProfile {
/**
* Retrieves a list of output policy IDs.
- *
+ *
* @return output policy id list
*/
public Enumeration<String> getProfileOutputIds();
/**
* Retrieves output policy by id.
- *
+ *
* @param id output policy id
* @return output policy instance
*/
@@ -168,22 +164,22 @@ public interface IProfile {
* End-user profile will be displayed to the end user.
* Non end-user profile mainly is for registration
* manager.
- *
+ *
* @return end-user profile or not
*/
- public boolean isVisible();
+ public boolean isVisible();
/**
* Sets this profile end-user profile or not.
- *
+ *
* @param v end-user profile or not
*/
- public void setVisible(boolean v);
+ public void setVisible(boolean v);
/**
* Retrieves the user id of the person who
* approves this profile.
- *
+ *
* @return user id of the approver of this profile
*/
public String getApprovedBy();
@@ -200,7 +196,7 @@ public interface IProfile {
/**
* Returns the profile name.
- *
+ *
* @param locale end-user locale
* @param name profile name
*/
@@ -208,7 +204,7 @@ public interface IProfile {
/**
* Retrieves the profile name.
- *
+ *
* @param locale end-user locale
* @return localized profile name
*/
@@ -216,7 +212,7 @@ public interface IProfile {
/**
* Returns the profile description.
- *
+ *
* @param locale end-user locale
* @param desc profile description
*/
@@ -224,7 +220,7 @@ public interface IProfile {
/**
* Retrieves the profile description.
- *
+ *
* @param locale end-user locale
* @return localized profile description
*/
@@ -234,21 +230,21 @@ public interface IProfile {
* Retrieves profile context. The context stores
* information about the requestor before the
* actual request is created.
- *
+ *
* @return profile context.
*/
public IProfileContext createContext();
/**
* Returns the profile policy set identifiers.
- *
+ *
* @return a list of policy set id
*/
public Enumeration<String> getProfilePolicySetIds();
/**
* Creates a profile policy.
- *
+ *
* @param setId id of the policy set that owns this policy
* @param id policy id
* @param defaultClassId id of the registered default implementation
@@ -256,73 +252,73 @@ public interface IProfile {
* @exception EProfileException failed to create policy
* @return profile policy instance
*/
- public IProfilePolicy createProfilePolicy(String setId, String id,
- String defaultClassId, String constraintClassId)
- throws EProfileException;
+ public IProfilePolicy createProfilePolicy(String setId, String id,
+ String defaultClassId, String constraintClassId)
+ throws EProfileException;
/**
* Deletes input policy by id.
- *
+ *
* @param inputId id of the input policy
- * @exception EProfileException failed to delete
+ * @exception EProfileException failed to delete
*/
public void deleteProfileInput(String inputId) throws EProfileException;
/**
* Deletes output policy by id.
- *
+ *
* @param outputId id of the output policy
- * @exception EProfileException failed to delete
+ * @exception EProfileException failed to delete
*/
public void deleteProfileOutput(String outputId) throws EProfileException;
/**
* Creates a input policy.
- *
+ *
* @param id input policy id
* @param inputClassId id of the registered input implementation
* @param nvp default parameters
* @return input policy
* @exception EProfileException failed to create
*/
- public IProfileInput createProfileInput(String id, String inputClassId,
- NameValuePairs nvp)
- throws EProfileException;
+ public IProfileInput createProfileInput(String id, String inputClassId,
+ NameValuePairs nvp)
+ throws EProfileException;
/**
* Creates a output policy.
- *
+ *
* @param id output policy id
* @param outputClassId id of the registered output implementation
* @param nvp default parameters
* @return output policy
* @exception EProfileException failed to create
*/
- public IProfileOutput createProfileOutput(String id, String outputClassId,
- NameValuePairs nvp) throws EProfileException;
+ public IProfileOutput createProfileOutput(String id, String outputClassId,
+ NameValuePairs nvp) throws EProfileException;
/**
* Deletes a policy.
- *
+ *
* @param setId id of the policy set
* @param policyId id of policy to delete
* @exception EProfileException failed to delete
*/
- public void deleteProfilePolicy(String setId, String policyId)
- throws EProfileException;
+ public void deleteProfilePolicy(String setId, String policyId)
+ throws EProfileException;
/**
* Retrieves a policy.
- *
+ *
* @param setId set id
* @param id policy id
* @return profile policy
*/
- public IProfilePolicy getProfilePolicy(String setId, String id);
+ public IProfilePolicy getProfilePolicy(String setId, String id);
/**
* Retrieves all the policy id within a set.
- *
+ *
* @param setId set id
* @return a list of policy id
*/
@@ -332,7 +328,7 @@ public interface IProfile {
* Retrieves a default set id for the given request.
* It is the profile's responsibility to return
* an appropriate set id for the request.
- *
+ *
* @param req request
* @return policy set id
*/
@@ -340,7 +336,7 @@ public interface IProfile {
/**
* Returns a list of profile policies.
- *
+ *
* @param setId set id
* @return a list of policies
*/
@@ -350,62 +346,62 @@ public interface IProfile {
* Creates one or more requests. Normally, only one request will
* be created. In case of CRMF request, multiple requests may be
* created for one submission.
- *
+ *
* @param ctx profile context
* @param locale user locale
* @return a list of requests
* @exception EProfileException failed to create requests
*/
- public IRequest[] createRequests(IProfileContext ctx, Locale locale)
- throws EProfileException;
+ public IRequest[] createRequests(IProfileContext ctx, Locale locale)
+ throws EProfileException;
/**
* Populates user-supplied input values into the requests.
- *
+ *
* @param ctx profile context
* @param request request
* @exception EProfileException failed to populate
*/
- public void populateInput(IProfileContext ctx, IRequest request)
- throws EProfileException;
+ public void populateInput(IProfileContext ctx, IRequest request)
+ throws EProfileException;
/**
* Passes the request to the set of default policies that
* populate the profile information against the profile.
- *
+ *
* @param request request
* @exception EProfileException failed to populate default values
- */
- public void populate(IRequest request)
- throws EProfileException;
+ */
+ public void populate(IRequest request)
+ throws EProfileException;
/**
- * Passes the request to the set of constraint policies
+ * Passes the request to the set of constraint policies
* that validate the request against the profile.
- *
+ *
* @param request request
* @exception ERejectException validation violation
- */
- public void validate(IRequest request)
- throws ERejectException;
+ */
+ public void validate(IRequest request)
+ throws ERejectException;
/**
* Process a request after validation.
- *
+ *
* @param request request to be processed
* @exception EProfileException failed to process
*/
- public void execute(IRequest request)
- throws EProfileException;
+ public void execute(IRequest request)
+ throws EProfileException;
/**
* Handles end-user request submission.
- *
+ *
* @param token authentication token
* @param request request to be processed
* @exception EDeferException defer request
* @exception EProfileException failed to submit
*/
public void submit(IAuthToken token, IRequest request)
- throws EDeferException, EProfileException;
+ throws EDeferException, EProfileException;
}
diff --git a/pki/base/common/src/com/netscape/certsrv/profile/IProfileAuthenticator.java b/pki/base/common/src/com/netscape/certsrv/profile/IProfileAuthenticator.java
index 476002e2d..98546c601 100644
--- a/pki/base/common/src/com/netscape/certsrv/profile/IProfileAuthenticator.java
+++ b/pki/base/common/src/com/netscape/certsrv/profile/IProfileAuthenticator.java
@@ -26,14 +26,13 @@ import com.netscape.certsrv.base.IConfigStore;
import com.netscape.certsrv.property.IDescriptor;
import com.netscape.certsrv.request.IRequest;
-
/**
* This interface represents an authenticator for profile.
* An authenticator is responsibile for authenting
* the end-user. If authentication is successful, request
* can be processed immediately. Otherwise, the request will
* be defered and manual approval is then required.
- *
+ *
* @version $Revision$, $Date$
*/
public interface IProfileAuthenticator extends IAuthManager {
@@ -42,17 +41,17 @@ public interface IProfileAuthenticator extends IAuthManager {
/**
* Initializes this default policy.
- *
+ *
* @param profile owner of this authenticator
* @param config configuration store
* @exception EProfileException failed to initialize
*/
public void init(IProfile profile, IConfigStore config)
- throws EProfileException;
+ throws EProfileException;
/**
* Retrieves the configuration store.
- *
+ *
* @return configuration store
*/
public IConfigStore getConfigStore();
@@ -60,17 +59,17 @@ public interface IProfileAuthenticator extends IAuthManager {
/**
* Populates authentication specific information into the
* request for auditing purposes.
- *
+ *
* @param token authentication token
* @param request request
* @exception EProfileException failed to populate
*/
public void populate(IAuthToken token, IRequest request)
- throws EProfileException;
+ throws EProfileException;
/**
* Retrieves the localizable name of this policy.
- *
+ *
* @param locale end user locale
* @return localized authenticator name
*/
@@ -78,7 +77,7 @@ public interface IProfileAuthenticator extends IAuthManager {
/**
* Retrieves the localizable description of this policy.
- *
+ *
* @param locale end user locale
* @return localized authenticator description
*/
@@ -86,7 +85,7 @@ public interface IProfileAuthenticator extends IAuthManager {
/**
* Retrieves a list of names of the property.
- *
+ *
* @return a list of property names
*/
public Enumeration<String> getValueNames();
@@ -96,16 +95,16 @@ public interface IProfileAuthenticator extends IAuthManager {
* serializable into the request. Passsword or other
* security-related value may not be desirable for
* storage.
- *
+ *
* @param name property name
* @return true if the property is not security related
*/
public boolean isValueWriteable(String name);
/**
- * Retrieves the descriptor of the given value
+ * Retrieves the descriptor of the given value
* property by name.
- *
+ *
* @param locale user locale
* @param name property name
* @return descriptor of the requested property
@@ -114,7 +113,7 @@ public interface IProfileAuthenticator extends IAuthManager {
/**
* Checks if this authenticator requires SSL client authentication.
- *
+ *
* @return client authentication required or not
*/
public boolean isSSLClientRequired();
diff --git a/pki/base/common/src/com/netscape/certsrv/profile/IProfileContext.java b/pki/base/common/src/com/netscape/certsrv/profile/IProfileContext.java
index 906c4816e..b3c27d040 100644
--- a/pki/base/common/src/com/netscape/certsrv/profile/IProfileContext.java
+++ b/pki/base/common/src/com/netscape/certsrv/profile/IProfileContext.java
@@ -17,19 +17,18 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.profile;
-
/**
* This interface represents a profile context which
* stores system-wide and user-provided information for
* assisting request creation.
- *
+ *
* @version $Revision$, $Date$
*/
public interface IProfileContext {
/**
* Sets a value into the context.
- *
+ *
* @param name property name
* @param value property value
*/
@@ -37,7 +36,7 @@ public interface IProfileContext {
/**
* Retrieves a value from the context.
- *
+ *
* @param name property name
* @return property value
*/
diff --git a/pki/base/common/src/com/netscape/certsrv/profile/IProfileEx.java b/pki/base/common/src/com/netscape/certsrv/profile/IProfileEx.java
index 8ce3262ec..79e4f4175 100644
--- a/pki/base/common/src/com/netscape/certsrv/profile/IProfileEx.java
+++ b/pki/base/common/src/com/netscape/certsrv/profile/IProfileEx.java
@@ -23,7 +23,7 @@ import com.netscape.certsrv.base.EBaseException;
* This interface represents the extension version of
* profile.
* <p>
- *
+ *
* @version $Revision$, $Date$
*/
public interface IProfileEx extends IProfile {
diff --git a/pki/base/common/src/com/netscape/certsrv/profile/IProfileInput.java b/pki/base/common/src/com/netscape/certsrv/profile/IProfileInput.java
index 35453e7d5..4ef598698 100644
--- a/pki/base/common/src/com/netscape/certsrv/profile/IProfileInput.java
+++ b/pki/base/common/src/com/netscape/certsrv/profile/IProfileInput.java
@@ -37,34 +37,34 @@ public interface IProfileInput extends IConfigTemplate {
/**
* Initializes this default policy.
- *
+ *
* @param profile owner of this input
* @param config configuration store
* @exception EProfileException failed to initialize
*/
public void init(IProfile profile, IConfigStore config)
- throws EProfileException;
+ throws EProfileException;
/**
* Returns configuration store.
- *
+ *
* @return configuration store
*/
public IConfigStore getConfigStore();
/**
* Populates the request with this policy default.
- *
+ *
* @param ctx profile context
* @param request request
* @exception EProfileException failed to populate
*/
public void populate(IProfileContext ctx, IRequest request)
- throws EProfileException;
+ throws EProfileException;
/**
* Retrieves the localizable name of this policy.
- *
+ *
* @param locale user locale
* @return localized input name
*/
@@ -72,7 +72,7 @@ public interface IProfileInput extends IConfigTemplate {
/**
* Retrieves the localizable description of this policy.
- *
+ *
* @param locale user locale
* @return localized input description
*/
@@ -80,15 +80,15 @@ public interface IProfileInput extends IConfigTemplate {
/**
* Retrieves a list of names of the property.
- *
+ *
* @return a list of property names
*/
public Enumeration<String> getValueNames();
/**
- * Retrieves the descriptor of the given value
+ * Retrieves the descriptor of the given value
* property by name.
- *
+ *
* @param locale user locale
* @param name property name
* @return descriptor of the property
@@ -97,24 +97,24 @@ public interface IProfileInput extends IConfigTemplate {
/**
* Retrieves value from the request.
- *
+ *
* @param name property name
* @param locale user locale
* @param request request
* @exception EProfileException failed to get value
*/
public String getValue(String name, Locale locale, IRequest request)
- throws EProfileException;
+ throws EProfileException;
/**
* Sets the value of the given property by name.
- *
+ *
* @param name property name
* @param locale user locale
* @param request request
* @param value value
* @exception EProfileException failed to get value
*/
- public void setValue(String name, Locale locale, IRequest request,
- String value) throws EPropertyException;
+ public void setValue(String name, Locale locale, IRequest request,
+ String value) throws EPropertyException;
}
diff --git a/pki/base/common/src/com/netscape/certsrv/profile/IProfileOutput.java b/pki/base/common/src/com/netscape/certsrv/profile/IProfileOutput.java
index 6dbfea51c..b60e4475b 100644
--- a/pki/base/common/src/com/netscape/certsrv/profile/IProfileOutput.java
+++ b/pki/base/common/src/com/netscape/certsrv/profile/IProfileOutput.java
@@ -37,34 +37,34 @@ public interface IProfileOutput extends IConfigTemplate {
/**
* Initializes this default policy.
- *
+ *
* @param profile owner of this policy
* @param config configuration store
* @exception EProfileException failed to initialize
*/
public void init(IProfile profile, IConfigStore config)
- throws EProfileException;
+ throws EProfileException;
/**
* Retrieves configuration store.
- *
+ *
* @return configuration store
*/
public IConfigStore getConfigStore();
/**
* Populates the request with this policy default.
- *
+ *
* @param ctx profile context
* @param request request
* @exception EProfileException failed to populate
*/
public void populate(IProfileContext ctx, IRequest request)
- throws EProfileException;
+ throws EProfileException;
/**
* Retrieves the localizable name of this policy.
- *
+ *
* @param locale user locale
* @return output policy name
*/
@@ -72,7 +72,7 @@ public interface IProfileOutput extends IConfigTemplate {
/**
* Retrieves the localizable description of this policy.
- *
+ *
* @param locale user locale
* @return output policy description
*/
@@ -80,15 +80,15 @@ public interface IProfileOutput extends IConfigTemplate {
/**
* Retrieves a list of names of the value parameter.
- *
+ *
* @return a list of property names
*/
public Enumeration<String> getValueNames();
/**
- * Retrieves the descriptor of the given value
+ * Retrieves the descriptor of the given value
* parameter by name.
- *
+ *
* @param locale user locale
* @param name property name
* @return property descriptor
@@ -97,7 +97,7 @@ public interface IProfileOutput extends IConfigTemplate {
/**
* Retrieves the value of the given value parameter by name.
- *
+ *
* @param name property name
* @param locale user locale
* @param request request
@@ -105,17 +105,17 @@ public interface IProfileOutput extends IConfigTemplate {
* @exception EProfileException failed to retrieve value
*/
public String getValue(String name, Locale locale, IRequest request)
- throws EProfileException;
+ throws EProfileException;
/**
* Sets the value of the given value parameter by name.
- *
+ *
* @param name property name
* @param locale user locale
* @param request request
* @param value property value
* @exception EProfileException failed to retrieve value
*/
- public void setValue(String name, Locale locale, IRequest request,
- String value) throws EPropertyException;
+ public void setValue(String name, Locale locale, IRequest request,
+ String value) throws EPropertyException;
}
diff --git a/pki/base/common/src/com/netscape/certsrv/profile/IProfilePolicy.java b/pki/base/common/src/com/netscape/certsrv/profile/IProfilePolicy.java
index 9577cb08f..d231f8d55 100644
--- a/pki/base/common/src/com/netscape/certsrv/profile/IProfilePolicy.java
+++ b/pki/base/common/src/com/netscape/certsrv/profile/IProfilePolicy.java
@@ -21,28 +21,28 @@ package com.netscape.certsrv.profile;
* This interface represents a profile policy
* which consists a default policy and a
* constraint policy.
- *
+ *
* @version $Revision$, $Date$
*/
public interface IProfilePolicy {
/**
- * Retrieves the policy id
- *
+ * Retrieves the policy id
+ *
* @return policy id
*/
public String getId();
/**
* Retrieves the default policy.
- *
+ *
* @return default policy
*/
public IPolicyDefault getDefault();
/**
* Retrieves the constraint policy.
- *
+ *
* @return constraint policy
*/
public IPolicyConstraint getConstraint();
diff --git a/pki/base/common/src/com/netscape/certsrv/profile/IProfileSubsystem.java b/pki/base/common/src/com/netscape/certsrv/profile/IProfileSubsystem.java
index 6f2fef378..b7a68445b 100644
--- a/pki/base/common/src/com/netscape/certsrv/profile/IProfileSubsystem.java
+++ b/pki/base/common/src/com/netscape/certsrv/profile/IProfileSubsystem.java
@@ -17,16 +17,14 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.profile;
-
import java.util.Enumeration;
import com.netscape.certsrv.base.ISubsystem;
-
/**
- * This represents the profile subsystem that manages
+ * This represents the profile subsystem that manages
* a list of profiles.
- *
+ *
* @version $Revision$, $Date$
*/
public interface IProfileSubsystem extends ISubsystem {
@@ -34,16 +32,16 @@ public interface IProfileSubsystem extends ISubsystem {
/**
* Retrieves a profile by id.
- *
+ *
* @return profile
* @exception EProfileException failed to retrieve
*/
public IProfile getProfile(String id)
- throws EProfileException;
+ throws EProfileException;
/**
* Checks if a profile is approved by an agent or not.
- *
+ *
* @param id profile id
* @return true if profile is approved
*/
@@ -51,7 +49,7 @@ public interface IProfileSubsystem extends ISubsystem {
/**
* Retrieves the approver of the given profile.
- *
+ *
* @param id profile id
* @return user id of the agent who has approved the profile
*/
@@ -59,60 +57,60 @@ public interface IProfileSubsystem extends ISubsystem {
/**
* Creates new profile.
- *
+ *
* @param id profile id
* @param classid implementation id
* @param className class Name
* @param configFile configuration file
* @exception EProfileException failed to create profile
*/
- public IProfile createProfile(String id, String classid,
- String className, String configFile)
- throws EProfileException;
+ public IProfile createProfile(String id, String classid,
+ String className, String configFile)
+ throws EProfileException;
/**
* Deletes profile.
- *
+ *
* @param id profile id
* @param configFile configuration file
* @exception EProfileException failed to delete profile
*/
- public void deleteProfile(String id, String configFile)
- throws EProfileException;
+ public void deleteProfile(String id, String configFile)
+ throws EProfileException;
/**
* Creates a new profile configuration file.
- *
+ *
* @param id profile id
* @param classId implementation id
* @param configPath location to create the configuration file
* @exception failed to create profile
*/
public void createProfileConfig(String id, String classId,
- String configPath) throws EProfileException;
+ String configPath) throws EProfileException;
/**
* Enables a profile.
- *
+ *
* @param id profile id
* @param enableBy agent's user id
* @exception EProfileException failed to enable profile
*/
public void enableProfile(String id, String enableBy)
- throws EProfileException;
+ throws EProfileException;
/**
* Disables a profile.
- *
+ *
* @param id profile id
* @exception EProfileException failed to disable
*/
public void disableProfile(String id)
- throws EProfileException;
+ throws EProfileException;
/**
* Retrieves the id of the implementation of the given profile.
- *
+ *
* @param id profile id
* @return implementation id managed by the registry
*/
@@ -121,14 +119,14 @@ public interface IProfileSubsystem extends ISubsystem {
/**
* Retrieves a list of profile ids. The return
* list is of type String.
- *
+ *
* @return a list of profile ids
*/
- public Enumeration<String> getProfileIds();
+ public Enumeration<String> getProfileIds();
/**
* Checks if owner id should be enforced during profile approval.
- *
+ *
* @return true if approval should be checked
*/
public boolean checkOwner();
diff --git a/pki/base/common/src/com/netscape/certsrv/profile/IProfileUpdater.java b/pki/base/common/src/com/netscape/certsrv/profile/IProfileUpdater.java
index a36ee1969..3749cd1d2 100644
--- a/pki/base/common/src/com/netscape/certsrv/profile/IProfileUpdater.java
+++ b/pki/base/common/src/com/netscape/certsrv/profile/IProfileUpdater.java
@@ -34,34 +34,34 @@ public interface IProfileUpdater extends IConfigTemplate {
/**
* Initializes this default policy.
- *
+ *
* @param profile owner of this policy
* @param config configuration store
* @exception EProfileException failed to initialize
*/
public void init(IProfile profile, IConfigStore config)
- throws EProfileException;
+ throws EProfileException;
/**
* Retrieves configuration store.
- *
+ *
* @return configuration store
*/
public IConfigStore getConfigStore();
/**
* Notifies of state change.
- *
+ *
* @param req request
* @param status The status to check for.
* @exception EProfileException failed to populate
*/
- public void update(IRequest req, RequestStatus status)
- throws EProfileException;
+ public void update(IRequest req, RequestStatus status)
+ throws EProfileException;
/**
* Retrieves the localizable name of this policy.
- *
+ *
* @param locale user locale
* @return output policy name
*/
@@ -69,7 +69,7 @@ public interface IProfileUpdater extends IConfigTemplate {
/**
* Retrieves the localizable description of this policy.
- *
+ *
* @param locale user locale
* @return output policy description
*/