summaryrefslogtreecommitdiffstats
path: root/base/common/src/com/netscape/certsrv/system/SecurityDomainHost.java
diff options
context:
space:
mode:
authorEndi Sukma Dewata <edewata@redhat.com>2013-02-06 16:39:33 -0500
committerEndi Sukma Dewata <edewata@redhat.com>2013-02-06 16:39:33 -0500
commit7de94ec405d633bc6bf9343ac18d86aba5da9ebe (patch)
tree73e9963e18d13224c2bc224a0c6cd2398a084dd8 /base/common/src/com/netscape/certsrv/system/SecurityDomainHost.java
parent456fe95af622e68d77751205532c2e29f2b0a8da (diff)
downloadpki-7de94ec405d633bc6bf9343ac18d86aba5da9ebe.tar.gz
pki-7de94ec405d633bc6bf9343ac18d86aba5da9ebe.tar.xz
pki-7de94ec405d633bc6bf9343ac18d86aba5da9ebe.zip
Fixed conflicting security domain hosts.
The SecurityDomainProcessor has been modified to generate the host ID from the subsystem type, hostname, and secure port instead of relying on the user-configurable SubsystemName attribute. Ticket #503
Diffstat (limited to 'base/common/src/com/netscape/certsrv/system/SecurityDomainHost.java')
-rw-r--r--base/common/src/com/netscape/certsrv/system/SecurityDomainHost.java32
1 files changed, 24 insertions, 8 deletions
diff --git a/base/common/src/com/netscape/certsrv/system/SecurityDomainHost.java b/base/common/src/com/netscape/certsrv/system/SecurityDomainHost.java
index e4357ffe8..730e36cae 100644
--- a/base/common/src/com/netscape/certsrv/system/SecurityDomainHost.java
+++ b/base/common/src/com/netscape/certsrv/system/SecurityDomainHost.java
@@ -41,10 +41,11 @@ public class SecurityDomainHost {
protected String hostname;
protected String port;
protected String securePort;
+ protected String secureEEClientAuthPort;
protected String secureAgentPort;
protected String secureAdminPort;
- protected String secureEEClientAuthPort;
protected String clone;
+ protected String subsystemName;
protected String domainManager;
@XmlAttribute(name="id")
@@ -119,6 +120,15 @@ public class SecurityDomainHost {
this.clone = clone;
}
+ @XmlElement(name="SubsystemName")
+ public String getSubsystemName() {
+ return subsystemName;
+ }
+
+ public void setSubsystemName(String subsystemName) {
+ this.subsystemName = subsystemName;
+ }
+
@XmlElement(name="DomainManager")
public String getDomainManager() {
return domainManager;
@@ -159,10 +169,11 @@ public class SecurityDomainHost {
result = prime * result + ((hostname == null) ? 0 : hostname.hashCode());
result = prime * result + ((id == null) ? 0 : id.hashCode());
result = prime * result + ((port == null) ? 0 : port.hashCode());
- result = prime * result + ((secureAgentPort == null) ? 0 : secureAgentPort.hashCode());
result = prime * result + ((secureAdminPort == null) ? 0 : secureAdminPort.hashCode());
+ result = prime * result + ((secureAgentPort == null) ? 0 : secureAgentPort.hashCode());
result = prime * result + ((secureEEClientAuthPort == null) ? 0 : secureEEClientAuthPort.hashCode());
result = prime * result + ((securePort == null) ? 0 : securePort.hashCode());
+ result = prime * result + ((subsystemName == null) ? 0 : subsystemName.hashCode());
return result;
}
@@ -200,16 +211,16 @@ public class SecurityDomainHost {
return false;
} else if (!port.equals(other.port))
return false;
- if (secureAgentPort == null) {
- if (other.secureAgentPort != null)
- return false;
- } else if (!secureAgentPort.equals(other.secureAgentPort))
- return false;
if (secureAdminPort == null) {
if (other.secureAdminPort != null)
return false;
} else if (!secureAdminPort.equals(other.secureAdminPort))
return false;
+ if (secureAgentPort == null) {
+ if (other.secureAgentPort != null)
+ return false;
+ } else if (!secureAgentPort.equals(other.secureAgentPort))
+ return false;
if (secureEEClientAuthPort == null) {
if (other.secureEEClientAuthPort != null)
return false;
@@ -220,13 +231,18 @@ public class SecurityDomainHost {
return false;
} else if (!securePort.equals(other.securePort))
return false;
+ if (subsystemName == null) {
+ if (other.subsystemName != null)
+ return false;
+ } else if (!subsystemName.equals(other.subsystemName))
+ return false;
return true;
}
public static void main(String args[]) throws Exception {
SecurityDomainHost before = new SecurityDomainHost();
- before.setId("CA localhost:8443");
+ before.setId("CA localhost 8443");
before.setHostname("localhost");
before.setPort("8080");
before.setSecurePort("8443");