summaryrefslogtreecommitdiffstats
path: root/base/server/cms/src/com/netscape/cms/servlet/admin
diff options
context:
space:
mode:
authorFraser Tweedale <ftweedal@redhat.com>2014-07-17 00:24:06 -0400
committerFraser Tweedale <frase@frase.id.au>2015-04-07 22:38:10 -0400
commit4785f08b9fa14e2abd60533542d763bdea8082a0 (patch)
tree94ed0549d16ef39e71b8f6d4349055de98ad44b8 /base/server/cms/src/com/netscape/cms/servlet/admin
parent1b44dcbdac86f5545431be4f47e6d98a743225b8 (diff)
downloadpki-4785f08b9fa14e2abd60533542d763bdea8082a0.tar.gz
pki-4785f08b9fa14e2abd60533542d763bdea8082a0.tar.xz
pki-4785f08b9fa14e2abd60533542d763bdea8082a0.zip
Add LDAPProfileSubsystem to store profiles in LDAP
Add the LDAPProfileSubsystem as another IProfileSubsystem implementation that can be used instead of ProfileSubsystem (which stores profiles on the file system) to store files in LDAP so that changes can be replicated. Extract common behaviour in to new AbstractProfileSubsystem superclass. Also address the minor issue #1220.
Diffstat (limited to 'base/server/cms/src/com/netscape/cms/servlet/admin')
-rw-r--r--base/server/cms/src/com/netscape/cms/servlet/admin/ProfileAdminServlet.java30
1 files changed, 2 insertions, 28 deletions
diff --git a/base/server/cms/src/com/netscape/cms/servlet/admin/ProfileAdminServlet.java b/base/server/cms/src/com/netscape/cms/servlet/admin/ProfileAdminServlet.java
index 3d25b8b71..b418baf41 100644
--- a/base/server/cms/src/com/netscape/cms/servlet/admin/ProfileAdminServlet.java
+++ b/base/server/cms/src/com/netscape/cms/servlet/admin/ProfileAdminServlet.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.cms.servlet.admin;
-import java.io.File;
import java.io.IOException;
import java.util.Enumeration;
import java.util.StringTokenizer;
@@ -2290,26 +2289,8 @@ public class ProfileAdminServlet extends AdminServlet {
return;
}
- String config = null;
-
try {
- config = CMS.getConfigStore().getString("profile." + id + ".config");
- } catch (EBaseException e) {
- // store a message in the signed audit log file
- auditMessage = CMS.getLogMessage(
- LOGGING_SIGNED_AUDIT_CONFIG_CERT_PROFILE,
- auditSubjectID,
- ILogger.FAILURE,
- auditParams(req));
-
- audit(auditMessage);
-
- sendResponse(ERROR, null, null, resp);
- return;
- }
-
- try {
- mProfileSub.deleteProfile(id, config);
+ mProfileSub.deleteProfile(id);
} catch (EProfileException e) {
// store a message in the signed audit log file
auditMessage = CMS.getLogMessage(
@@ -2475,16 +2456,10 @@ public class ProfileAdminServlet extends AdminServlet {
IProfile profile = null;
- // create configuration file
- File configFile = new File(config);
-
- configFile.createNewFile();
-
// create profile
try {
profile = mProfileSub.createProfile(id, impl,
- info.getClassName(),
- config);
+ info.getClassName());
profile.setName(getLocale(req), name);
profile.setDescription(getLocale(req), name);
if (visible != null && visible.equals("true")) {
@@ -2495,7 +2470,6 @@ public class ProfileAdminServlet extends AdminServlet {
profile.setAuthenticatorId(auth);
profile.getConfigStore().commit(false);
- mProfileSub.createProfileConfig(id, impl, config);
if (profile instanceof IProfileEx) {
// populates profile specific plugins such as
// policies, inputs and outputs