summaryrefslogtreecommitdiffstats
path: root/base/common/src/com/netscape/cms/servlet/profile/model
diff options
context:
space:
mode:
Diffstat (limited to 'base/common/src/com/netscape/cms/servlet/profile/model')
-rw-r--r--base/common/src/com/netscape/cms/servlet/profile/model/PolicyConstraintFactory.java42
-rw-r--r--base/common/src/com/netscape/cms/servlet/profile/model/PolicyDefaultFactory.java65
-rw-r--r--base/common/src/com/netscape/cms/servlet/profile/model/ProfileInputFactory.java40
-rw-r--r--base/common/src/com/netscape/cms/servlet/profile/model/ProfileOutputFactory.java47
4 files changed, 0 insertions, 194 deletions
diff --git a/base/common/src/com/netscape/cms/servlet/profile/model/PolicyConstraintFactory.java b/base/common/src/com/netscape/cms/servlet/profile/model/PolicyConstraintFactory.java
deleted file mode 100644
index bd361a752..000000000
--- a/base/common/src/com/netscape/cms/servlet/profile/model/PolicyConstraintFactory.java
+++ /dev/null
@@ -1,42 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2012 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cms.servlet.profile.model;
-
-import java.util.Enumeration;
-import java.util.Locale;
-
-import com.netscape.certsrv.profile.IPolicyConstraint;
-import com.netscape.certsrv.property.Descriptor;
-
-public class PolicyConstraintFactory {
-
- public static PolicyConstraint create(Locale locale, IPolicyConstraint cons) {
- PolicyConstraint ret = new PolicyConstraint();
- ret.setName(cons.getName(locale));
- ret.setText(cons.getText(locale));
-
- Enumeration<String> conNames = cons.getConfigNames();
- while (conNames.hasMoreElements()) {
- String conName = conNames.nextElement();
- PolicyConstraintValue dataVal =
- new PolicyConstraintValue(conName, (Descriptor) cons.getConfigDescriptor(locale, conName));
- ret.addConstraint(dataVal);
- }
- return ret;
- }
-}
diff --git a/base/common/src/com/netscape/cms/servlet/profile/model/PolicyDefaultFactory.java b/base/common/src/com/netscape/cms/servlet/profile/model/PolicyDefaultFactory.java
deleted file mode 100644
index 6b9379f0b..000000000
--- a/base/common/src/com/netscape/cms/servlet/profile/model/PolicyDefaultFactory.java
+++ /dev/null
@@ -1,65 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2012 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cms.servlet.profile.model;
-
-import java.util.Enumeration;
-import java.util.Locale;
-
-import com.netscape.certsrv.base.IArgBlock;
-import com.netscape.certsrv.profile.IPolicyDefault;
-import com.netscape.certsrv.property.Descriptor;
-import com.netscape.certsrv.property.EPropertyException;
-import com.netscape.certsrv.request.IRequest;
-
-public class PolicyDefaultFactory {
-
- public static PolicyDefault create(IRequest request, Locale locale, IPolicyDefault def) throws EPropertyException {
- PolicyDefault ret = new PolicyDefault();
- ret.setName(def.getName(locale));
- ret.setText(def.getText(locale));
-
- Enumeration<String> defNames = def.getValueNames();
- while (defNames.hasMoreElements()) {
- String defName = defNames.nextElement();
- ProfileAttribute attr = new ProfileAttribute(
- defName,
- def.getValue(defName, locale, request),
- (Descriptor) def.getValueDescriptor(locale, defName));
- ret.addAttribute(attr);
- }
- return ret;
- }
-
- public static PolicyDefault create(IArgBlock params, Locale locale, IPolicyDefault def) throws EPropertyException {
- PolicyDefault ret = new PolicyDefault();
- ret.setName(def.getName(locale));
- ret.setText(def.getText(locale));
-
- Enumeration<String> defNames = def.getValueNames();
- while (defNames.hasMoreElements()) {
- String defName = defNames.nextElement();
- ProfileAttribute attr = new ProfileAttribute(
- defName,
- params.getValueAsString(defName, ""),
- (Descriptor) def.getValueDescriptor(locale, defName));
- ret.addAttribute(attr);
- }
- return ret;
- }
-
-}
diff --git a/base/common/src/com/netscape/cms/servlet/profile/model/ProfileInputFactory.java b/base/common/src/com/netscape/cms/servlet/profile/model/ProfileInputFactory.java
deleted file mode 100644
index 67d3e9a2c..000000000
--- a/base/common/src/com/netscape/cms/servlet/profile/model/ProfileInputFactory.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package com.netscape.cms.servlet.profile.model;
-
-import java.util.Enumeration;
-import java.util.Locale;
-
-import com.netscape.certsrv.base.IArgBlock;
-import com.netscape.certsrv.profile.EProfileException;
-import com.netscape.certsrv.profile.IProfileInput;
-import com.netscape.certsrv.request.IRequest;
-
-public class ProfileInputFactory {
-
- public static ProfileInput create(IProfileInput input, IRequest request, Locale locale) throws EProfileException {
- ProfileInput ret = new ProfileInput();
- ret.setInputId(input.getName(locale));
- Enumeration<String> names = input.getValueNames();
- while (names.hasMoreElements()) {
- String name = names.nextElement();
- String value = input.getValue(name, locale, request);
- if (value != null) {
- ret.setInputAttr(name, value);
- }
- }
- return ret;
- }
-
- public static ProfileInput create(IProfileInput input, IArgBlock params, Locale locale) throws EProfileException {
- ProfileInput ret = new ProfileInput();
- ret.setInputId(input.getName(locale));
- Enumeration<String> names = input.getValueNames();
- while (names.hasMoreElements()) {
- String name = names.nextElement();
- String value = params.getValueAsString(name, null);
- if (value != null) {
- ret.setInputAttr(name, value);
- }
- }
- return ret;
- }
-}
diff --git a/base/common/src/com/netscape/cms/servlet/profile/model/ProfileOutputFactory.java b/base/common/src/com/netscape/cms/servlet/profile/model/ProfileOutputFactory.java
deleted file mode 100644
index 93bbaa2c5..000000000
--- a/base/common/src/com/netscape/cms/servlet/profile/model/ProfileOutputFactory.java
+++ /dev/null
@@ -1,47 +0,0 @@
-//--- BEGIN COPYRIGHT BLOCK ---
-//This program is free software; you can redistribute it and/or modify
-//it under the terms of the GNU General Public License as published by
-//the Free Software Foundation; version 2 of the License.
-//
-//This program is distributed in the hope that it will be useful,
-//but WITHOUT ANY WARRANTY; without even the implied warranty of
-//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-//GNU General Public License for more details.
-//
-//You should have received a copy of the GNU General Public License along
-//with this program; if not, write to the Free Software Foundation, Inc.,
-//51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-//(C) 2012 Red Hat, Inc.
-//All rights reserved.
-//--- END COPYRIGHT BLOCK ---
-package com.netscape.cms.servlet.profile.model;
-
-import java.util.Enumeration;
-import java.util.Locale;
-
-import com.netscape.certsrv.profile.EProfileException;
-import com.netscape.certsrv.profile.IProfileOutput;
-import com.netscape.certsrv.property.Descriptor;
-import com.netscape.certsrv.request.IRequest;
-
-public class ProfileOutputFactory {
-
- public static ProfileOutput create(IProfileOutput output, IRequest request, Locale locale) throws EProfileException {
- ProfileOutput ret = new ProfileOutput();
- ret.setName(output.getName(locale));
- ret.setText(output.getText(locale));
-
- Enumeration<String> attrNames = output.getValueNames();
- while (attrNames.hasMoreElements()) {
- String attrName = attrNames.nextElement();
- ProfileAttribute attr = new ProfileAttribute(
- attrName,
- output.getValue(attrName, locale, request),
- (Descriptor) output.getValueDescriptor(locale, attrName));
- ret.addAttribute(attr);
- }
- return ret;
- }
-
-}