summaryrefslogtreecommitdiffstats
path: root/base/common/src/com/netscape/cms/servlet/csadmin
diff options
context:
space:
mode:
Diffstat (limited to 'base/common/src/com/netscape/cms/servlet/csadmin')
-rw-r--r--base/common/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java4
-rw-r--r--base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigResource.java63
-rw-r--r--base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigService.java15
-rw-r--r--base/common/src/com/netscape/cms/servlet/csadmin/model/ConfigurationRequest.java724
-rw-r--r--base/common/src/com/netscape/cms/servlet/csadmin/model/ConfigurationResponse.java121
-rw-r--r--base/common/src/com/netscape/cms/servlet/csadmin/model/DomainInfo.java155
-rw-r--r--base/common/src/com/netscape/cms/servlet/csadmin/model/InstallToken.java50
-rw-r--r--base/common/src/com/netscape/cms/servlet/csadmin/model/InstallTokenRequest.java99
-rw-r--r--base/common/src/com/netscape/cms/servlet/csadmin/model/SecurityDomainHost.java40
-rw-r--r--base/common/src/com/netscape/cms/servlet/csadmin/model/SecurityDomainHostList.java53
-rw-r--r--base/common/src/com/netscape/cms/servlet/csadmin/model/SystemCertData.java270
11 files changed, 10 insertions, 1584 deletions
diff --git a/base/common/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java b/base/common/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java
index 4c9caf5c1..4397251b5 100644
--- a/base/common/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java
+++ b/base/common/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java
@@ -140,13 +140,13 @@ import com.netscape.certsrv.dbs.crldb.ICRLIssuingPointRecord;
import com.netscape.certsrv.ldap.ILdapConnFactory;
import com.netscape.certsrv.ocsp.IDefStore;
import com.netscape.certsrv.ocsp.IOCSPAuthority;
+import com.netscape.certsrv.system.InstallToken;
+import com.netscape.certsrv.system.InstallTokenRequest;
import com.netscape.certsrv.usrgrp.IGroup;
import com.netscape.certsrv.usrgrp.IUGSubsystem;
import com.netscape.certsrv.usrgrp.IUser;
import com.netscape.cms.client.ClientConfig;
import com.netscape.cms.client.system.SystemConfigClient;
-import com.netscape.cms.servlet.csadmin.model.InstallToken;
-import com.netscape.cms.servlet.csadmin.model.InstallTokenRequest;
import com.netscape.cmsutil.crypto.CryptoUtil;
import com.netscape.cmsutil.http.HttpClient;
import com.netscape.cmsutil.http.HttpRequest;
diff --git a/base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigResource.java b/base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigResource.java
deleted file mode 100644
index 9cb6791e3..000000000
--- a/base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigResource.java
+++ /dev/null
@@ -1,63 +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.csadmin;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.MultivaluedMap;
-
-import com.netscape.cms.servlet.csadmin.model.ConfigurationRequest;
-import com.netscape.cms.servlet.csadmin.model.ConfigurationResponse;
-import com.netscape.cms.servlet.csadmin.model.DomainInfo;
-import com.netscape.cms.servlet.csadmin.model.InstallToken;
-import com.netscape.cms.servlet.csadmin.model.InstallTokenRequest;
-
-/**
- * @author alee
- */
-@Path("installer")
-public interface SystemConfigResource {
-
- @POST
- @Path("configure")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- @Consumes({ MediaType.APPLICATION_FORM_URLENCODED })
- public ConfigurationResponse configure(MultivaluedMap<String, String> form);
-
- @POST
- @Path("configure")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- public ConfigurationResponse configure(ConfigurationRequest data);
-
- @POST
- @Path("installToken")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- public InstallToken getInstallToken(InstallTokenRequest data);
-
- @GET
- @Path("domainInfo")
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- public DomainInfo getDomainInfo();
-}
diff --git a/base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigService.java b/base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigService.java
index b17cf1752..c7560fbc4 100644
--- a/base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigService.java
+++ b/base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigService.java
@@ -47,19 +47,20 @@ import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.base.EPropertyNotFound;
import com.netscape.certsrv.base.IConfigStore;
import com.netscape.certsrv.base.ISecurityDomainSessionTable;
+import com.netscape.certsrv.base.PKIException;
import com.netscape.certsrv.ca.ICertificateAuthority;
import com.netscape.certsrv.dbs.certdb.ICertificateRepository;
import com.netscape.certsrv.ocsp.IOCSPAuthority;
+import com.netscape.certsrv.system.ConfigurationRequest;
+import com.netscape.certsrv.system.ConfigurationResponse;
+import com.netscape.certsrv.system.DomainInfo;
+import com.netscape.certsrv.system.InstallToken;
+import com.netscape.certsrv.system.InstallTokenRequest;
+import com.netscape.certsrv.system.SystemCertData;
+import com.netscape.certsrv.system.SystemConfigResource;
import com.netscape.certsrv.usrgrp.IUGSubsystem;
import com.netscape.certsrv.usrgrp.IUser;
-import com.netscape.cms.servlet.base.PKIException;
import com.netscape.cms.servlet.base.PKIService;
-import com.netscape.cms.servlet.csadmin.model.ConfigurationResponse;
-import com.netscape.cms.servlet.csadmin.model.DomainInfo;
-import com.netscape.cms.servlet.csadmin.model.InstallToken;
-import com.netscape.cms.servlet.csadmin.model.InstallTokenRequest;
-import com.netscape.cms.servlet.csadmin.model.SystemCertData;
-import com.netscape.cms.servlet.csadmin.model.ConfigurationRequest;
import com.netscape.cmsutil.crypto.CryptoUtil;
import com.netscape.cmsutil.util.Utils;
diff --git a/base/common/src/com/netscape/cms/servlet/csadmin/model/ConfigurationRequest.java b/base/common/src/com/netscape/cms/servlet/csadmin/model/ConfigurationRequest.java
deleted file mode 100644
index b42403f4e..000000000
--- a/base/common/src/com/netscape/cms/servlet/csadmin/model/ConfigurationRequest.java
+++ /dev/null
@@ -1,724 +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.csadmin.model;
-
-import java.util.Collection;
-
-import javax.ws.rs.core.MultivaluedMap;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementRef;
-import javax.xml.bind.annotation.XmlRootElement;
-
-/**
- * @author alee
- *
- */
-@XmlRootElement(name="ConfigurationRequest")
-@XmlAccessorType(XmlAccessType.FIELD)
-public class ConfigurationRequest {
- private static final String PIN = "pin";
- private static final String TOKEN = "token";
- private static final String TOKEN_PASSWORD = "tokenPassword";
- private static final String SECURITY_DOMAIN_TYPE = "securityDomainType";
- private static final String SECURITY_DOMAIN_URI = "securityDomainUri";
- private static final String SECURITY_DOMAIN_NAME = "securityDomainName";
- private static final String SECURITY_DOMAIN_USER = "securityDomainUser";
- private static final String SECURITY_DOMAIN_PASSWORD = "securityDomainPassword";
- private static final String IS_CLONE = "isClone";
- private static final String CLONE_URI = "cloneUri";
- private static final String SUBSYSTEM_NAME = "subsystemName";
- private static final String P12_FILE = "p12File";
- private static final String P12_PASSWORD = "p12Password";
- private static final String HIERARCHY = "hierarchy";
- private static final String DSHOST = "dsHost";
- private static final String DSPORT = "dsPort";
- private static final String BASEDN = "basedn";
- private static final String BINDDN = "binddn";
- private static final String DATABASE = "database";
- private static final String SECURECONN = "secureConn";
- private static final String REMOVEDATA = "removeData";
- private static final String MASTER_REPLICATION_PORT = "masterReplicationPort";
- private static final String CLONE_REPLICATION_PORT = "cloneReplicationPort";
- private static final String REPLICATION_SECURITY = "replicationSecurity";
- private static final String ISSUING_CA = "issuingCa";
- private static final String BACKUP_KEYS = "backupKeys";
- private static final String BACKUP_FILE = "backupFile";
- private static final String BACKUP_PASSWORD = "backupPassword";
- private static final String ADMIN_UID = "adminUid";
- private static final String ADMIN_EMAIL = "adminEmail";
- private static final String ADMIN_PASSWORD = "adminPassword";
- private static final String ADMIN_CERT_REQUEST = "adminCertRequest";
- private static final String ADMIN_CERT_REQUEST_TYPE = "adminCertRequestType";
- private static final String ADMIN_SUBJECT_DN = "adminSubjectDN";
- private static final String ADMIN_NAME = "adminName";
- private static final String ADMIN_PROFILE_ID = "adminProfileID";
- private static final String STEP_TWO = "stepTwo";
-
- //defaults
- public static final String TOKEN_DEFAULT = "Internal Key Storage Token";
- public static final String NEW_DOMAIN = "newdomain";
- public static final String EXISTING_DOMAIN = "existingdomain";
-
- @XmlElement
- protected String pin;
-
- @XmlElement(defaultValue=TOKEN_DEFAULT)
- protected String token;
-
- @XmlElement
- protected String tokenPassword;
-
- @XmlElement
- protected String securityDomainType;
-
- @XmlElement
- protected String securityDomainUri;
-
- @XmlElement
- protected String securityDomainName;
-
- @XmlElement
- protected String securityDomainUser;
-
- @XmlElement
- protected String securityDomainPassword;
-
- @XmlElement(defaultValue="false")
- protected String isClone;
-
- @XmlElement
- protected String cloneUri;
-
- @XmlElement
- protected String subsystemName;
-
- @XmlElement
- protected String p12File;
-
- @XmlElement
- protected String p12Password;
-
- @XmlElement
- protected String hierarchy;
-
- @XmlElement
- protected String dsHost;
-
- @XmlElement
- protected String dsPort;
-
- @XmlElement
- protected String baseDN;
-
- @XmlElement
- protected String bindDN;
-
- @XmlElement
- protected String bindpwd;
-
- @XmlElement
- protected String database;
-
- @XmlElement(defaultValue = "off")
- protected String secureConn;
-
- @XmlElement
- protected String removeData;
-
- @XmlElement
- protected String masterReplicationPort;
-
- @XmlElement
- protected String cloneReplicationPort;
-
- @XmlElement
- protected String replicationSecurity;
-
- @XmlElementRef
- protected Collection<SystemCertData> systemCerts;
-
- @XmlElement
- protected String issuingCA;
-
- @XmlElement
- protected String backupKeys;
-
- @XmlElement
- protected String backupPassword;
-
- @XmlElement
- protected String backupFile;
-
- @XmlElement
- protected String adminUID;
-
- @XmlElement
- protected String adminPassword;
-
- @XmlElement
- protected String adminEmail;
-
- @XmlElement
- protected String adminCertRequest;
-
- @XmlElement
- protected String adminCertRequestType;
-
- @XmlElement
- protected String adminSubjectDN;
-
- @XmlElement
- protected String adminName;
-
- @XmlElement
- protected String adminProfileID;
-
- @XmlElement
- protected String stepTwo;
-
- public ConfigurationRequest() {
- // required for JAXB
- }
-
- public ConfigurationRequest(MultivaluedMap<String, String> form) {
- pin = form.getFirst(PIN);
- token = form.getFirst(TOKEN);
- tokenPassword = form.getFirst(TOKEN_PASSWORD);
- securityDomainType = form.getFirst(SECURITY_DOMAIN_TYPE);
- securityDomainUri = form.getFirst(SECURITY_DOMAIN_URI);
- securityDomainName = form.getFirst(SECURITY_DOMAIN_NAME);
- securityDomainUser = form.getFirst(SECURITY_DOMAIN_USER);
- securityDomainPassword = form.getFirst(SECURITY_DOMAIN_PASSWORD);
- isClone = form.getFirst(IS_CLONE);
- cloneUri = form.getFirst(CLONE_URI);
- subsystemName = form.getFirst(SUBSYSTEM_NAME);
- p12File = form.getFirst(P12_FILE);
- p12Password = form.getFirst(P12_PASSWORD);
- hierarchy = form.getFirst(HIERARCHY);
- dsHost = form.getFirst(DSHOST);
- dsPort = form.getFirst(DSPORT);
- baseDN = form.getFirst(BASEDN);
- bindDN = form.getFirst(BINDDN);
- database = form.getFirst(DATABASE);
- secureConn = form.getFirst(SECURECONN);
- removeData = form.getFirst(REMOVEDATA);
- masterReplicationPort = form.getFirst(MASTER_REPLICATION_PORT);
- cloneReplicationPort = form.getFirst(CLONE_REPLICATION_PORT);
- replicationSecurity = form.getFirst(REPLICATION_SECURITY);
- //TODO - figure out how to get the cert requests
- issuingCA = form.getFirst(ISSUING_CA);
- backupFile = form.getFirst(BACKUP_FILE);
- backupPassword = form.getFirst(BACKUP_PASSWORD);
- backupKeys = form.getFirst(BACKUP_KEYS);
- adminUID = form.getFirst(ADMIN_UID);
- adminEmail = form.getFirst(ADMIN_EMAIL);
- adminPassword = form.getFirst(ADMIN_PASSWORD);
- adminCertRequest = form.getFirst(ADMIN_CERT_REQUEST);
- adminCertRequestType = form.getFirst(ADMIN_CERT_REQUEST_TYPE);
- adminSubjectDN = form.getFirst(ADMIN_SUBJECT_DN);
- adminName = form.getFirst(ADMIN_NAME);
- adminProfileID = form.getFirst(ADMIN_PROFILE_ID);
- stepTwo = form.getFirst(STEP_TWO);
- }
-
-
- public String getSubsystemName() {
- return subsystemName;
- }
-
- public void setSubsystemName(String subsystemName) {
- this.subsystemName = subsystemName;
- }
-
- public String getPin() {
- return pin;
- }
-
- public void setPin(String pin) {
- this.pin = pin;
- }
-
- public String getToken() {
- return token;
- }
-
- public void setToken(String token) {
- this.token = token;
- }
-
- public String getSecurityDomainType() {
- return securityDomainType;
- }
-
- public void setSecurityDomainType(String securityDomainType) {
- this.securityDomainType = securityDomainType;
- }
-
- public String getSecurityDomainUri() {
- return securityDomainUri;
- }
-
- public void setSecurityDomainUri(String securityDomainUri) {
- this.securityDomainUri = securityDomainUri;
- }
-
- public String getSecurityDomainName() {
- return securityDomainName;
- }
-
- public void setSecurityDomainName(String securityDomainName) {
- this.securityDomainName = securityDomainName;
- }
-
- public String getSecurityDomainUser() {
- return securityDomainUser;
- }
-
- public void setSecurityDomainUser(String securityDomainUser) {
- this.securityDomainUser = securityDomainUser;
- }
-
- public String getSecurityDomainPassword() {
- return securityDomainPassword;
- }
-
- public void setSecurityDomainPassword(String securityDomainPassword) {
- this.securityDomainPassword = securityDomainPassword;
- }
-
- public String getIsClone() {
- return isClone;
- }
-
- public void setIsClone(String isClone) {
- this.isClone = isClone;
- }
-
- public String getCloneUri() {
- return cloneUri;
- }
-
- public void setCloneUri(String cloneUri) {
- this.cloneUri = cloneUri;
- }
-
- /**
- * @return the p12File
- */
- public String getP12File() {
- return p12File;
- }
-
- /**
- * @param p12File the p12File to set
- */
- public void setP12File(String p12File) {
- this.p12File = p12File;
- }
-
- /**
- * @return the p12Password
- */
- public String getP12Password() {
- return p12Password;
- }
-
- /**
- * @param p12Password the p12Password to set
- */
- public void setP12Password(String p12Password) {
- this.p12Password = p12Password;
- }
-
- /**
- * @return the tokenPassword
- */
- public String getTokenPassword() {
- return tokenPassword;
- }
-
- /**
- * @param tokenPassword the tokenPassword to set
- */
- public void setTokenPassword(String tokenPassword) {
- this.tokenPassword = tokenPassword;
- }
-
- /**
- * @return the hierarchy
- */
- public String getHierarchy() {
- return hierarchy;
- }
-
- /**
- * @param hierarchy the hierarchy to set
- */
- public void setHierarchy(String hierarchy) {
- this.hierarchy = hierarchy;
- }
-
- /**
- * @return the dsHost
- */
- public String getDsHost() {
- return dsHost;
- }
-
- /**
- * @param dsHost the dsHost to set
- */
- public void setDsHost(String dsHost) {
- this.dsHost = dsHost;
- }
-
- /**
- * @return the dsPort
- */
- public String getDsPort() {
- return dsPort;
- }
-
- /**
- * @param dsPort the dsPort to set
- */
- public void setDsPort(String dsPort) {
- this.dsPort = dsPort;
- }
-
- /**
- * @return the baseDN
- */
- public String getBaseDN() {
- return baseDN;
- }
-
- /**
- * @param baseDN the baseDN to set
- */
- public void setBaseDN(String baseDN) {
- this.baseDN = baseDN;
- }
-
- /**
- * @return the bindDN
- */
- public String getBindDN() {
- return bindDN;
- }
-
- /**
- * @param bindDN the bindDN to set
- */
- public void setBindDN(String bindDN) {
- this.bindDN = bindDN;
- }
-
- /**
- * @return the bindpwd
- */
- public String getBindpwd() {
- return bindpwd;
- }
-
- /**
- * @param bindpwd the bindpwd to set
- */
- public void setBindpwd(String bindpwd) {
- this.bindpwd = bindpwd;
- }
-
- /**
- * @return the secureConn
- */
- public String getSecureConn() {
- return secureConn;
- }
-
- /**
- * @param secureConn the secureConn to set
- */
- public void setSecureConn(String secureConn) {
- this.secureConn = secureConn;
- }
-
- /**
- * @return the removeData
- */
- public String getRemoveData() {
- return removeData;
- }
-
- /**
- * @param removeData the removeData to set
- */
- public void setRemoveData(String removeData) {
- this.removeData = removeData;
- }
-
- /**
- * @return the masterReplicationPort
- */
- public String getMasterReplicationPort() {
- return masterReplicationPort;
- }
-
- /**
- * @param masterReplicationPort the masterReplicationPort to set
- */
- public void setMasterReplicationPort(String masterReplicationPort) {
- this.masterReplicationPort = masterReplicationPort;
- }
-
- /**
- * @return the cloneReplicationPort
- */
- public String getCloneReplicationPort() {
- return cloneReplicationPort;
- }
-
- /**
- * @param cloneReplicationPort the cloneReplicationPort to set
- */
- public void setCloneReplicationPort(String cloneReplicationPort) {
- this.cloneReplicationPort = cloneReplicationPort;
- }
-
- /**
- * @return the replicationSecurity
- */
- public String getReplicationSecurity() {
- return replicationSecurity;
- }
-
- /**
- * @param replicationSecurity the replicationSecurity to set
- */
- public void setReplicationSecurity(String replicationSecurity) {
- this.replicationSecurity = replicationSecurity;
- }
-
- /**
- * @return the database
- */
- public String getDatabase() {
- return database;
- }
-
- /**
- * @param database the database to set
- */
- public void setDatabase(String database) {
- this.database = database;
- }
-
- /**
- *
- * @return systemCerts
- */
- public Collection<SystemCertData> getSystemCerts() {
- return systemCerts;
- }
-
- /**
- *
- * @param systemCerts
- */
- public void setSystemCerts(Collection<SystemCertData> systemCerts) {
- this.systemCerts = systemCerts;
- }
-
- /**
- * @return the issuingCA
- */
- public String getIssuingCA() {
- return issuingCA;
- }
-
- /**
- * @param issuingCA the issuingCA to set
- */
- public void setIssuingCA(String issuingCA) {
- this.issuingCA = issuingCA;
- }
-
- /**
- * @return the backupKeys
- */
- public String getBackupKeys() {
- return backupKeys;
- }
-
- /**
- * @param backupKeys the backupKeys to set
- */
- public void setBackupKeys(String backupKeys) {
- this.backupKeys = backupKeys;
- }
-
- /**
- * @return the backupFile
- */
- public String getBackupFile() {
- return backupFile;
- }
-
- /**
- * @param backupFile the backupFile to set
- */
- public void setBackupFile(String backupFile) {
- this.backupFile = backupFile;
- }
-
- /**
- * @return the backupPassword
- */
- public String getBackupPassword() {
- return backupPassword;
- }
-
- /**
- * @param backupPassword the backupPassword to set
- */
- public void setBackupPassword(String backupPassword) {
- this.backupPassword = backupPassword;
- }
-
- /**
- * @return the adminUID
- */
- public String getAdminUID() {
- return adminUID;
- }
-
- /**
- * @param adminUID the adminUID to set
- */
- public void setAdminUID(String adminUID) {
- this.adminUID = adminUID;
- }
-
- /**
- * @return the adminPassword
- */
- public String getAdminPassword() {
- return adminPassword;
- }
-
- /**
- * @param adminPassword the adminPassword to set
- */
- public void setAdminPassword(String adminPassword) {
- this.adminPassword = adminPassword;
- }
-
- /**
- * @return the adminEmail
- */
- public String getAdminEmail() {
- return adminEmail;
- }
-
- /**
- * @param adminEmail the adminEmail to set
- */
- public void setAdminEmail(String adminEmail) {
- this.adminEmail = adminEmail;
- }
-
- /**
- * @return the adminCertRequest
- */
- public String getAdminCertRequest() {
- return adminCertRequest;
- }
-
- /**
- * @param adminCertRequest the adminCertRequest to set
- */
- public void setAdminCertRequest(String adminCertRequest) {
- this.adminCertRequest = adminCertRequest;
- }
-
- /**
- * @return the adminCertRequestType
- */
- public String getAdminCertRequestType() {
- return adminCertRequestType;
- }
-
- /**
- * @param adminCertRequestType the adminCertRequestType to set
- */
- public void setAdminCertRequestType(String adminCertRequestType) {
- this.adminCertRequestType = adminCertRequestType;
- }
-
- /**
- * @return the adminSubjectDN
- */
- public String getAdminSubjectDN() {
- return adminSubjectDN;
- }
-
- /**
- * @param adminSubjectDN the adminSubjectDN to set
- */
- public void setAdminSubjectDN(String adminSubjectDN) {
- this.adminSubjectDN = adminSubjectDN;
- }
-
- /**
- * @return the adminName
- */
- public String getAdminName() {
- return adminName;
- }
-
- /**
- * @param adminName the adminName to set
- */
- public void setAdminName(String adminName) {
- this.adminName = adminName;
- }
-
- /**
- * @return the adminProfileID
- */
- public String getAdminProfileID() {
- return adminProfileID;
- }
-
- /**
- * @param adminProfileID the adminProfileID to set
- */
- public void setAdminProfileID(String adminProfileID) {
- this.adminProfileID = adminProfileID;
- }
-
- public String getStepTwo() {
- return stepTwo;
- }
-
- public void setStepTwo(String stepTwo) {
- this.stepTwo = stepTwo;
- }
-
-}
diff --git a/base/common/src/com/netscape/cms/servlet/csadmin/model/ConfigurationResponse.java b/base/common/src/com/netscape/cms/servlet/csadmin/model/ConfigurationResponse.java
deleted file mode 100644
index 2fcd37d9d..000000000
--- a/base/common/src/com/netscape/cms/servlet/csadmin/model/ConfigurationResponse.java
+++ /dev/null
@@ -1,121 +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.csadmin.model;
-
-import java.security.cert.CertificateEncodingException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.Vector;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementRef;
-import javax.xml.bind.annotation.XmlRootElement;
-
-import netscape.security.x509.X509CertImpl;
-
-import com.netscape.certsrv.apps.CMS;
-import com.netscape.cms.servlet.csadmin.Cert;
-
-/**
- * @author alee
- *
- */
-@XmlRootElement(name="ConfigurationResponse")
-@XmlAccessorType(XmlAccessType.FIELD)
-public class ConfigurationResponse {
-
- @XmlElementRef
- protected Collection<SystemCertData> systemCerts;
-
- @XmlElement
- protected SystemCertData adminCert;
-
- @XmlElement
- protected String status;
-
- public ConfigurationResponse() {
- systemCerts = new ArrayList<SystemCertData>();
- adminCert = new SystemCertData();
- }
-
- public void setSystemCerts(Vector<Cert> certs) {
- systemCerts.clear();
- Enumeration<Cert> e = certs.elements();
- while (e.hasMoreElements()) {
- Cert cert = e.nextElement();
- SystemCertData cdata = new SystemCertData();
- cdata.setCert(cert.getCert());
- cdata.setRequest(cert.getRequest());
- cdata.setTag(cert.getCertTag());
- cdata.setCertChain(cert.getCertChain());
- systemCerts.add(cdata);
- }
- }
-
- /**
- * @return the systemCerts
- */
- public Collection<SystemCertData> getSystemCerts() {
- return systemCerts;
- }
-
- /**
- * @param systemCerts the systemCerts to set
- */
- public void setSystemCerts(Collection<SystemCertData> systemCerts) {
- this.systemCerts = systemCerts;
- }
-
- /**
- * @return the adminCert
- */
- public SystemCertData getAdminCert() {
- return adminCert;
- }
-
- /**
- * @param adminCert the adminCert to set
- */
- public void setAdminCert(SystemCertData adminCert) {
- this.adminCert = adminCert;
- }
-
- /**
- * @return the status
- */
- public String getStatus() {
- return status;
- }
-
- /**
- * @param status the status to set
- */
- public void setStatus(String status) {
- this.status = status;
- }
-
-
-
- public void setAdminCert(X509CertImpl x509CertImpl) throws CertificateEncodingException {
- adminCert.setCert(CMS.BtoA(x509CertImpl.getEncoded()));
- }
-
-}
diff --git a/base/common/src/com/netscape/cms/servlet/csadmin/model/DomainInfo.java b/base/common/src/com/netscape/cms/servlet/csadmin/model/DomainInfo.java
deleted file mode 100644
index 7ba351cb1..000000000
--- a/base/common/src/com/netscape/cms/servlet/csadmin/model/DomainInfo.java
+++ /dev/null
@@ -1,155 +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.csadmin.model;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-
-/**
- * @author alee
- *
- */
-@XmlRootElement(name="DomainInfo")
-public class DomainInfo {
-
- @XmlElement(name="CAList")
- protected SecurityDomainHostList caList;
-
- @XmlElement(name="KRAList")
- protected SecurityDomainHostList kraList;
-
- @XmlElement(name="OCSPList")
- protected SecurityDomainHostList ocspList;
-
- @XmlElement(name="TKSList")
- protected SecurityDomainHostList tksList;
-
- @XmlElement(name="TPSList")
- protected SecurityDomainHostList tpsList;
-
- @XmlElement(name="RAList")
- protected SecurityDomainHostList raList;
-
- @XmlElement
- protected String name;
-
- /**
- * @return the name
- */
- public String getName() {
- return name;
- }
-
- /**
- * @param name the name to set
- */
- public void setName(String name) {
- this.name = name;
- }
-
- /**
- * @return the caList
- */
- public SecurityDomainHostList getCaList() {
- return caList;
- }
-
- /**
- * @param caList the caList to set
- */
- public void setCaList(SecurityDomainHostList caList) {
- this.caList = caList;
- }
-
- /**
- * @return the kraList
- */
- public SecurityDomainHostList getKraList() {
- return kraList;
- }
-
- /**
- * @param kraList the kraList to set
- */
- public void setKraList(SecurityDomainHostList kraList) {
- this.kraList = kraList;
- }
-
- /**
- * @return the ocspList
- */
- public SecurityDomainHostList getOcspList() {
- return ocspList;
- }
-
- /**
- * @param ocspList the ocspList to set
- */
- public void setOcspList(SecurityDomainHostList ocspList) {
- this.ocspList = ocspList;
- }
-
- /**
- * @return the tksList
- */
- public SecurityDomainHostList getTksList() {
- return tksList;
- }
-
- /**
- * @param tksList the tksList to set
- */
- public void setTksList(SecurityDomainHostList tksList) {
- this.tksList = tksList;
- }
-
- /**
- * @return the tpsList
- */
- public SecurityDomainHostList getTpsList() {
- return tpsList;
- }
-
- /**
- * @param tpsList the tpsList to set
- */
- public void setTpsList(SecurityDomainHostList tpsList) {
- this.tpsList = tpsList;
- }
-
- /**
- * @return the raList
- */
- public SecurityDomainHostList getRaList() {
- return raList;
- }
-
- /**
- * @param raList the raList to set
- */
- public void setRaList(SecurityDomainHostList raList) {
- this.raList = raList;
- }
-
-
-
-
-
-
-
-}
diff --git a/base/common/src/com/netscape/cms/servlet/csadmin/model/InstallToken.java b/base/common/src/com/netscape/cms/servlet/csadmin/model/InstallToken.java
deleted file mode 100644
index 59284de37..000000000
--- a/base/common/src/com/netscape/cms/servlet/csadmin/model/InstallToken.java
+++ /dev/null
@@ -1,50 +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.csadmin.model;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-
-/**
- * @author alee
- *
- */
-@XmlRootElement(name="CertData")
-@XmlAccessorType(XmlAccessType.FIELD)
-public class InstallToken {
- @XmlElement
- private String token;
-
- public InstallToken(String token) {
- this.token = token;
- }
-
- public InstallToken() {
- // required by jaxb
- }
-
- public String getToken() {
- return token;
- }
-
- public void setToken(String token) {
- this.token = token;
- }
-}
diff --git a/base/common/src/com/netscape/cms/servlet/csadmin/model/InstallTokenRequest.java b/base/common/src/com/netscape/cms/servlet/csadmin/model/InstallTokenRequest.java
deleted file mode 100644
index 40be4179d..000000000
--- a/base/common/src/com/netscape/cms/servlet/csadmin/model/InstallTokenRequest.java
+++ /dev/null
@@ -1,99 +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.csadmin.model;
-
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlAccessType;
-
-/**
- * @author alee
- *
- */
-@XmlRootElement(name="InstallTokenRequest")
-@XmlAccessorType(XmlAccessType.FIELD)
-public class InstallTokenRequest {
- @XmlElement
- private String user;
-
- @XmlElement
- private String password;
-
- @XmlElement
- private String subsystem;
-
- @XmlElement
- private String host;
-
- @XmlElement
- private String port;
-
- public InstallTokenRequest(String user, String password, String subsystem, String host, String port) {
- this.user = user;
- this.password = password;
- this.subsystem = subsystem;
- this.host = host;
- this.port = port;
- }
-
- public InstallTokenRequest() {
- // required for jaxb
- }
-
- public String getUser() {
- return user;
- }
-
- public void setUser(String user) {
- this.user = user;
- }
-
- public String getPassword() {
- return password;
- }
-
- public void setPassword(String password) {
- this.password = password;
- }
-
- public String getSubsystem() {
- return subsystem;
- }
-
- public void setSubsystem(String subsystem) {
- this.subsystem = subsystem;
- }
-
- public String getHost() {
- return host;
- }
-
- public void setHost(String host) {
- this.host = host;
- }
-
- public String getPort() {
- return port;
- }
-
- public void setPort(String port) {
- this.port = port;
- }
-
-}
diff --git a/base/common/src/com/netscape/cms/servlet/csadmin/model/SecurityDomainHost.java b/base/common/src/com/netscape/cms/servlet/csadmin/model/SecurityDomainHost.java
deleted file mode 100644
index cd12cfaf2..000000000
--- a/base/common/src/com/netscape/cms/servlet/csadmin/model/SecurityDomainHost.java
+++ /dev/null
@@ -1,40 +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.csadmin.model;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-
-/**
- * @author alee
- *
- */
-@XmlRootElement(name="DomainInfo")
-@XmlAccessorType(XmlAccessType.FIELD)
-public class SecurityDomainHost {
- protected String host;
- protected String securePort;
- protected String secureAgentPort;
- protected String secureAdminPort;
- protected String secureEEClientAuthPort;
- protected String unSecurePort;
- protected String clone;
- protected String subsystemName;
- protected String domainManager;
-}
diff --git a/base/common/src/com/netscape/cms/servlet/csadmin/model/SecurityDomainHostList.java b/base/common/src/com/netscape/cms/servlet/csadmin/model/SecurityDomainHostList.java
deleted file mode 100644
index 71922731e..000000000
--- a/base/common/src/com/netscape/cms/servlet/csadmin/model/SecurityDomainHostList.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- *
- */
-package com.netscape.cms.servlet.csadmin.model;
-
-import java.util.Collection;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementRef;
-import javax.xml.bind.annotation.XmlRootElement;
-
-/**
- * @author alee
- *
- */
-@XmlRootElement
-public class SecurityDomainHostList {
- protected Collection<SecurityDomainHost> systems;
-
- @XmlElement(name="SubsystemCount")
- protected int count;
-
- /**
- * @return the systems
- */
- @XmlElementRef
- public Collection<SecurityDomainHost> getSystems() {
- return systems;
- }
-
- /**
- * @param systems the systems to set
- */
- public void setSystems(Collection<SecurityDomainHost> systems) {
- this.systems = systems;
- }
-
- /**
- * @return the count
- */
- public int getCount() {
- return count;
- }
-
- /**
- * @param count the count to set
- */
- public void setCount(int count) {
- this.count = count;
- }
-
-
-}
diff --git a/base/common/src/com/netscape/cms/servlet/csadmin/model/SystemCertData.java b/base/common/src/com/netscape/cms/servlet/csadmin/model/SystemCertData.java
deleted file mode 100644
index bd98fe95c..000000000
--- a/base/common/src/com/netscape/cms/servlet/csadmin/model/SystemCertData.java
+++ /dev/null
@@ -1,270 +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.csadmin.model;
-
-import javax.ws.rs.core.MultivaluedMap;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-
-/**
- * @author alee
- *
- */
-@XmlRootElement(name="SystemCertData")
-@XmlAccessorType(XmlAccessType.FIELD)
-public class SystemCertData {
- public static final String TAG = "tag";
- public static final String NICKNAME = "nickname";
- public static final String TOKEN = "token";
- public static final String KEY_TYPE = "keyType";
- public static final String KEY_ALGORITHM = "keyAlgorithm";
- public static final String SIGNING_ALGORITHM = "signingAlgorithm";
- public static final String KEY_SIZE = "keySize";
- public static final String KEY_CURVENAME = "keyCurveName";
- public static final String REQUEST = "request";
- public static final String SUBJECT_DN = "subjectDN";
- public static final String CERT = "cert";
- public static final String CERT_CHAIN = "certChain";
-
- @XmlElement
- protected String tag;
-
- @XmlElement
- protected String nickname;
-
- @XmlElement
- protected String token;
-
- @XmlElement
- protected String keyType;
-
- @XmlElement
- protected String keyAlgorithm;
-
- @XmlElement
- protected String signingAlgorithm;
-
- @XmlElement
- protected String keySize;
-
- @XmlElement
- protected String keyCurveName;
-
- @XmlElement
- protected String request;
-
- @XmlElement
- protected String subjectDN;
-
- @XmlElement
- protected String cert;
-
- @XmlElement
- protected String certChain;
-
- public SystemCertData() {
- // required for JAXB
- }
-
- public SystemCertData(MultivaluedMap<String, String> form) {
- tag = form.getFirst(TAG);
- nickname = form.getFirst(NICKNAME);
- token = form.getFirst(TOKEN);
- keyType = form.getFirst(KEY_TYPE);
- keyAlgorithm = form.getFirst(KEY_ALGORITHM);
- signingAlgorithm = form.getFirst(SIGNING_ALGORITHM);
- keySize = form.getFirst(KEY_SIZE);
- keyCurveName = form.getFirst(KEY_CURVENAME);
- request = form.getFirst(REQUEST);
- subjectDN = form.getFirst(SUBJECT_DN);
- cert = form.getFirst(CERT);
- certChain = form.getFirst(CERT_CHAIN);
- }
-
- /**
- * @return the tag
- */
- public String getTag() {
- return tag;
- }
-
- /**
- * @param tag the tag to set
- */
- public void setTag(String tag) {
- this.tag = tag;
- }
-
- /**
- * @return the nickname
- */
- public String getNickname() {
- return nickname;
- }
-
- /**
- * @param nickname the nickname to set
- */
- public void setNickname(String nickname) {
- this.nickname = nickname;
- }
-
- /**
- * @return the token
- */
- public String getToken() {
- return token;
- }
-
- /**
- * @param token the token to set
- */
- public void setToken(String token) {
- this.token = token;
- }
-
- /**
- * @return the keyType
- */
- public String getKeyType() {
- return keyType;
- }
-
- /**
- * @param keyType the keyType to set
- */
- public void setKeyType(String keyType) {
- this.keyType = keyType;
- }
-
- /**
- * @return the keyAlgorithm
- */
- public String getKeyAlgorithm() {
- return keyAlgorithm;
- }
-
- /**
- * @param keyAlgorithm the keyAlgorithm to set
- */
- public void setKeyAlgorithm(String keyAlgorithm) {
- this.keyAlgorithm = keyAlgorithm;
- }
-
- /**
- * @return the signingAlgorithm
- */
- public String getSigningAlgorithm() {
- return signingAlgorithm;
- }
-
- /**
- * @param signingAlgorithm the signingAlgorithm to set
- */
- public void setSigningAlgorithm(String signingAlgorithm) {
- this.signingAlgorithm = signingAlgorithm;
- }
-
- /**
- * @return the keySize
- */
- public String getKeySize() {
- return keySize;
- }
-
- /**
- * @param keySize the keySize to set
- */
- public void setKeySize(String keySize) {
- this.keySize = keySize;
- }
-
- /**
- * @return the keyCurveName
- */
- public String getKeyCurveName() {
- return keyCurveName;
- }
-
- /**
- * @param keyCurveName the keyCurveName to set
- */
- public void setKeyCurveName(String keyCurveName) {
- this.keyCurveName = keyCurveName;
- }
-
- /**
- * @return the request
- */
- public String getRequest() {
- return request;
- }
-
- /**
- * @param request the request to set
- */
- public void setRequest(String request) {
- this.request = request;
- }
-
- /**
- * @return the subjectDN
- */
- public String getSubjectDN() {
- return subjectDN;
- }
-
- /**
- * @param subjectDN the subjectDN to set
- */
- public void setSubjectDN(String subjectDN) {
- this.subjectDN = subjectDN;
- }
-
- /**
- * @return the cert
- */
- public String getCert() {
- return cert;
- }
-
- /**
- * @param cert the cert to set
- */
- public void setCert(String cert) {
- this.cert = cert;
- }
-
- /**
- * @return the certChain
- */
- public String getCertChain() {
- return certChain;
- }
-
- /**
- * @param certChain the certChain to set
- */
- public void setCertChain(String certChain) {
- this.certChain = certChain;
- }
-
-}