summaryrefslogtreecommitdiffstats
path: root/base/common/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java
diff options
context:
space:
mode:
authorAde Lee <alee@redhat.com>2012-04-30 13:30:34 -0400
committerAde Lee <alee@redhat.com>2012-05-02 16:47:43 -0400
commit29f10d8050e2e401780ec4642f9ea1a4837b4a2d (patch)
tree011cd49a83fc7bbc207a72d076ca8e09b954802a /base/common/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java
parent9aea1e939f6357eadf777c72ae3ef43275829427 (diff)
downloadpki-29f10d8050e2e401780ec4642f9ea1a4837b4a2d.tar.gz
pki-29f10d8050e2e401780ec4642f9ea1a4837b4a2d.tar.xz
pki-29f10d8050e2e401780ec4642f9ea1a4837b4a2d.zip
Removed obsolete installation servlets
Diffstat (limited to 'base/common/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java')
-rw-r--r--base/common/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java37
1 files changed, 37 insertions, 0 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 490911353..d491da07c 100644
--- a/base/common/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java
+++ b/base/common/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java
@@ -121,6 +121,7 @@ import org.mozilla.jss.ssl.SSLCertificateApprovalCallback;
import org.mozilla.jss.util.IncorrectPasswordException;
import org.mozilla.jss.util.Password;
import org.w3c.dom.Document;
+import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
@@ -1944,6 +1945,42 @@ public class ConfigurationUtils {
}
}
+ public static int getSubsystemCount(String hostname, int https_admin_port,
+ boolean https, String type) throws IOException, SAXException, ParserConfigurationException {
+ CMS.debug("getSubsystemCount start");
+ String c = getDomainXML(hostname, https_admin_port, true);
+ if (c != null) {
+ ByteArrayInputStream bis = new ByteArrayInputStream(c.getBytes());
+ XMLObject obj = new XMLObject(bis);
+ String containerName = type + "List";
+ Node n = obj.getContainer(containerName);
+ NodeList nlist = n.getChildNodes();
+ String countS = "";
+ for (int i = 0; i < nlist.getLength(); i++) {
+ Element nn = (Element) nlist.item(i);
+ String tagname = nn.getTagName();
+ if (tagname.equals("SubsystemCount")) {
+ NodeList nlist1 = nn.getChildNodes();
+ Node nn1 = nlist1.item(0);
+ countS = nn1.getNodeValue();
+ break;
+ }
+ }
+ CMS.debug("getSubsystemCount: SubsystemCount=" + countS);
+ int num = 0;
+
+ if (countS != null && !countS.equals("")) {
+ try {
+ num = Integer.parseInt(countS);
+ } catch (Exception ee) {
+ }
+ }
+
+ return num;
+ }
+ return -1;
+ }
+
public static void configCert(HttpServletRequest request, HttpServletResponse response,
Context context, Cert certObj, WizardPanelBase panel) throws IOException {