summaryrefslogtreecommitdiffstats
path: root/base/console/src/com/netscape/admin/certsrv/task
diff options
context:
space:
mode:
Diffstat (limited to 'base/console/src/com/netscape/admin/certsrv/task')
-rw-r--r--base/console/src/com/netscape/admin/certsrv/task/CGITask.java10
-rw-r--r--base/console/src/com/netscape/admin/certsrv/task/CMSCertRequest.java30
-rw-r--r--base/console/src/com/netscape/admin/certsrv/task/CMSConfigCert.java28
-rw-r--r--base/console/src/com/netscape/admin/certsrv/task/CMSImportCert.java44
-rw-r--r--base/console/src/com/netscape/admin/certsrv/task/CMSMigrateCreate.java84
-rw-r--r--base/console/src/com/netscape/admin/certsrv/task/CMSRequestCert.java30
-rw-r--r--base/console/src/com/netscape/admin/certsrv/task/CMSRestart.java2
-rw-r--r--base/console/src/com/netscape/admin/certsrv/task/CMSStart.java2
-rw-r--r--base/console/src/com/netscape/admin/certsrv/task/CMSStartDaemon.java38
-rw-r--r--base/console/src/com/netscape/admin/certsrv/task/CMSStatus.java22
-rw-r--r--base/console/src/com/netscape/admin/certsrv/task/CMSStop.java2
-rw-r--r--base/console/src/com/netscape/admin/certsrv/task/StatusDialog.java6
12 files changed, 149 insertions, 149 deletions
diff --git a/base/console/src/com/netscape/admin/certsrv/task/CGITask.java b/base/console/src/com/netscape/admin/certsrv/task/CGITask.java
index 8406e1005..5f6871ea1 100644
--- a/base/console/src/com/netscape/admin/certsrv/task/CGITask.java
+++ b/base/console/src/com/netscape/admin/certsrv/task/CGITask.java
@@ -41,8 +41,8 @@ public class CGITask extends CMSTaskObject
/*==========================================================
* variables
*==========================================================*/
- private static final String PREFIX = "CGITASK";
-
+ private static final String PREFIX = "CGITASK";
+
protected boolean mFinished = false;
protected String mCmd = null;
protected String mAdminURL = null;
@@ -264,7 +264,7 @@ public class CGITask extends CMSTaskObject
{
int code = Integer.parseInt(sValue);
mSuccess = (code == 0);
- Debug.println("Parse input: code=" + code + " mSuccess=" +
+ Debug.println("Parse input: code=" + code + " mSuccess=" +
mSuccess);
} else if (sName.equalsIgnoreCase("NMC_ERRINFO")) {
mErrorMsg = sValue;
@@ -308,7 +308,7 @@ public class CGITask extends CMSTaskObject
return "bin/" + s;
return null;
}
-
+
/**
* pass the username to the admin server
*/
@@ -325,7 +325,7 @@ public class CGITask extends CMSTaskObject
Debug.println( "password = " +
(String)_consoleInfo.get( "AdminUserPassword" ) );
return (String)_consoleInfo.get( "AdminUserPassword" );
- }
+ }
/*
protected void showDialog( JFrame frame, String msg, String item,
diff --git a/base/console/src/com/netscape/admin/certsrv/task/CMSCertRequest.java b/base/console/src/com/netscape/admin/certsrv/task/CMSCertRequest.java
index bf391c4e4..fd949e97c 100644
--- a/base/console/src/com/netscape/admin/certsrv/task/CMSCertRequest.java
+++ b/base/console/src/com/netscape/admin/certsrv/task/CMSCertRequest.java
@@ -47,11 +47,11 @@ public class CMSCertRequest extends CGITask {
/*==========================================================
* variables
*==========================================================*/
- private static final String PREFIX = "CGITASK";
+ private static final String PREFIX = "CGITASK";
private String mCgiTask = null; // CGI task to call
private CertSetupWizardInfo mWizardInfo;
private String mPolicyMsg = null;
-
+
/*==========================================================
* constructors
*==========================================================*/
@@ -66,18 +66,18 @@ public class CMSCertRequest extends CGITask {
Debug.println("CMSRequestCert: initialize()");
_consoleInfo = info.getAdminConsoleInfo();
- // the results coming back from the daemon will be added to the
+ // the results coming back from the daemon will be added to the
// wizard information.
mWizardInfo = info;
}
-
+
/**
- * Collect the data in name value pairs format and then send them to the
+ * Collect the data in name value pairs format and then send them to the
* cgi process.
*/
public boolean requestCert(Hashtable data) {
boolean status = false; // return value
-
+
try {
status = run(data);
} catch (Exception e) {
@@ -89,7 +89,7 @@ public class CMSCertRequest extends CGITask {
return mSuccess;
}
-
+
/**
* the operation is finished after we receive the http stream
*/
@@ -134,13 +134,13 @@ public class CMSCertRequest extends CGITask {
} catch (Exception e) {
Debug.println("RequestCert.Exception : " + e.toString());
}
-
+
Debug.println("RequestCert.replyHandler: finished, mSuccess=" +
mSuccess);
finish();
}
-
+
private void parse2(String s)
{
int iIndex;
@@ -202,7 +202,7 @@ public class CMSCertRequest extends CGITask {
+ sValue + " index=" + iIndex);
if (sValue != null && !sValue.equals("")) {
mWizardInfo.setRequestStatus(sValue);
- if (sValue.equals("2") || sValue.equals("3")
+ if (sValue.equals("2") || sValue.equals("3")
|| sValue.equals("4"))
// success, pending, svcPending
mSuccess = true;
@@ -286,7 +286,7 @@ public class CMSCertRequest extends CGITask {
mPolicyMsg = mPolicyMsg + "\n " + sValue;
}
}
-
+
Debug.println("Parse finished");
}
@@ -307,7 +307,7 @@ public class CMSCertRequest extends CGITask {
try {
mSuccess = false;
mFinished = false;
-
+
ByteArrayInputStream data = null;
if (args != null && !args.isEmpty())
data = encode(args);
@@ -369,11 +369,11 @@ public class CMSCertRequest extends CGITask {
(detail.indexOf("Connection timed out") > -1) ) {
// java.net.NoRouteToHostException: Connection timed out
// double insurance
- mErrorMsg =
+ mErrorMsg =
mResource.getString("CGITASK_DIALOG_CMSDOWN_MESSAGE");
} else {
// need to determine case by case
- mErrorMsg =
+ mErrorMsg =
mResource.getString("CGITASK_DIALOG_CMSDOWN_MESSAGE")+ " java.net.SocketException: " + detail;
}
@@ -404,7 +404,7 @@ public class CMSCertRequest extends CGITask {
} else {
// need to determine case by case
mErrorMsg =
- mResource.getString("CGITASK_DIALOG_CMSDOWN_MESSAGE")
+ mResource.getString("CGITASK_DIALOG_CMSDOWN_MESSAGE")
+ " Exception: " + detail;
}
Debug.println( "Command " + fullCmd + " failed: " + e );
diff --git a/base/console/src/com/netscape/admin/certsrv/task/CMSConfigCert.java b/base/console/src/com/netscape/admin/certsrv/task/CMSConfigCert.java
index 7d85d161f..572c0b609 100644
--- a/base/console/src/com/netscape/admin/certsrv/task/CMSConfigCert.java
+++ b/base/console/src/com/netscape/admin/certsrv/task/CMSConfigCert.java
@@ -49,14 +49,14 @@ public class CMSConfigCert extends CGITask {
* variables
*==========================================================*/
private static final String PREFIX = "CMSCONFIGCERT";
-
+
public static final String CONFIG_CERT_CGI = "Tasks/Operation/config-cert";
-
+
//private boolean mSuccess = false; // status of last executed CGI
//private Hashtable mCgiResponse = null; // holds parsed contents of CGI return
private String mCgiTask = null; // CGI task to call
private InstallWizardInfo mWizardInfo;
-
+
/*==========================================================
* constructors
*==========================================================*/
@@ -70,15 +70,15 @@ public class CMSConfigCert extends CGITask {
public void initialize(InstallWizardInfo info) {
_consoleInfo = info.getAdminConsoleInfo();
- // the results coming back from the daemon will be added to the
+ // the results coming back from the daemon will be added to the
// wizard information.
mWizardInfo = info;
setForceBasicAuth(true);
}
-
+
/**
- * Collect the data in name value pairs format and then send them to the
+ * Collect the data in name value pairs format and then send them to the
* cgi process.
*/
public boolean configCert(Hashtable data) {
@@ -90,15 +90,15 @@ public class CMSConfigCert extends CGITask {
if (_consoleInfo.get("AdminUserPassword") == null)
_consoleInfo.put("AdminUserPassword",
_consoleInfo.getAuthenticationPassword());
- Debug.println("AdminUserPassword = " + _consoleInfo.get("AdminUserPassword"));
+ Debug.println("AdminUserPassword = " + _consoleInfo.get("AdminUserPassword"));
data.put("AdminUserPassword", _consoleInfo.getAuthenticationPassword());
_consoleInfo.put("arguments", data);
- // Send Random value for RNG entropy
+ // Send Random value for RNG entropy
data.put(ConfigConstants.PR_CMS_SEED, new Long(WizardBasePanel.mSeed).toString());
-
+
boolean status = false; // return value
-
+
Cursor cursor = mActiveFrame.getCursor();
int type = cursor.getType();
cursor = new Cursor(Cursor.WAIT_CURSOR);
@@ -132,7 +132,7 @@ public class CMSConfigCert extends CGITask {
return mSuccess;
}
-
+
/**
* the operation is finished after we receive the http stream
*/
@@ -142,7 +142,7 @@ public class CMSConfigCert extends CGITask {
if (mCgiResponse != null)
mCgiResponse.clear();
*/
-
+
try {
BufferedReader rspStream =
new BufferedReader(new InputStreamReader(response, "UTF8"));
@@ -164,13 +164,13 @@ public class CMSConfigCert extends CGITask {
} catch (Exception e) {
Debug.println("ConfigCert.Exception : " + e.toString());
}
-
+
Debug.println("ConfigCert.replyHandler: finished, mSuccess=" +
mSuccess);
finish();
}
-
+
/**
* return the value for the given keyword in the reply
*/
diff --git a/base/console/src/com/netscape/admin/certsrv/task/CMSImportCert.java b/base/console/src/com/netscape/admin/certsrv/task/CMSImportCert.java
index b285b2284..bd95041e4 100644
--- a/base/console/src/com/netscape/admin/certsrv/task/CMSImportCert.java
+++ b/base/console/src/com/netscape/admin/certsrv/task/CMSImportCert.java
@@ -47,15 +47,15 @@ public class CMSImportCert extends CGITask {
/*==========================================================
* variables
*==========================================================*/
- private static final String PREFIX = "CGITASK";
+ private static final String PREFIX = "CGITASK";
private String mCgiTask = null; // CGI task to call
private InstallWizardInfo mWizardInfo;
private String mPolicyMsg = null;
-
+
// To support Thawte's header and footer
- public static final String BEGIN_PKCS7_HEADER =
+ public static final String BEGIN_PKCS7_HEADER =
"-----BEGIN PKCS #7 SIGNED DATA-----";
- public static final String END_PKCS7_HEADER =
+ public static final String END_PKCS7_HEADER =
"-----END PKCS #7 SIGNED DATA-----";
public static final String BEGIN_HEADER = "-----BEGIN CERTIFICATE-----";
public static final String END_HEADER = "-----END CERTIFICATE-----";
@@ -74,13 +74,13 @@ public class CMSImportCert extends CGITask {
Debug.println("CMSImportCert: initialize()");
_consoleInfo = info.getAdminConsoleInfo();
- // the results coming back from the daemon will be added to the
+ // the results coming back from the daemon will be added to the
// wizard information.
mWizardInfo = info;
}
-
+
/**
- * Collect the data in name value pairs format and then send them to the
+ * Collect the data in name value pairs format and then send them to the
* cgi process.
*/
public boolean importCert(Hashtable data) {
@@ -97,7 +97,7 @@ public class CMSImportCert extends CGITask {
return mSuccess;
}
-
+
/**
* the operation is finished after we receive the http stream
*/
@@ -130,13 +130,13 @@ public class CMSImportCert extends CGITask {
} catch (Exception e) {
Debug.println("ImportCert.Exception : " + e.toString());
}
-
+
Debug.println("ImportCert.replyHandler: finished, mSuccess=" +
mSuccess);
finish();
}
-
+
/**
* return the value for the given keyword in the reply
*/
@@ -160,8 +160,8 @@ public class CMSImportCert extends CGITask {
sValue.equals(ConfigConstants.APPROVED_STRING) ||
sValue.equals(ConfigConstants.SVC_PENDING_STRING)) {
mWizardInfo.setImportError("Request " +
- mWizardInfo.getRequestID() +
- " is " + sValue +
+ mWizardInfo.getRequestID() +
+ " is " + sValue +
".\nYou can contact an authorized agent or local administrator for further assistance by referring to the request ID.");
mSuccess = true;
} else if (sValue.equals(ConfigConstants.CANCELED_STRING) ||
@@ -171,8 +171,8 @@ public class CMSImportCert extends CGITask {
if (stage != null)
mWizardInfo.put(stage, ConfigConstants.FALSE);
mWizardInfo.setImportError("Request " +
- mWizardInfo.getRequestID() +
- " is " + sValue +
+ mWizardInfo.getRequestID() +
+ " is " + sValue +
".\nYou can contact an authorized agent or local administrator for further assistance by referring to the request ID." + "\nYou will be able to regenerate a new request if you click back." );
mSuccess = true;
}
@@ -191,9 +191,9 @@ public class CMSImportCert extends CGITask {
String result = normalizeCertStr(val);
Debug.println("After removing all the carriage returns:");
Debug.println(result);
- mWizardInfo.setPKCS10(result);
+ mWizardInfo.setPKCS10(result);
mSuccess = true;
-
+
}
}
else if ((iIndex=s.indexOf("unexpectedError = ")) != (-1))
@@ -261,7 +261,7 @@ public class CMSImportCert extends CGITask {
mPolicyMsg = mPolicyMsg + "\n " + sValue;
}
}
-
+
Debug.println("Parse finished");
}
@@ -282,7 +282,7 @@ public class CMSImportCert extends CGITask {
try {
mSuccess = false;
mFinished = false;
-
+
ByteArrayInputStream data = null;
if (args != null && !args.isEmpty())
data = encode(args);
@@ -344,11 +344,11 @@ public class CMSImportCert extends CGITask {
(detail.indexOf("Connection timed out") > -1) ) {
// java.net.NoRouteToHostException: Connection timed out
// double insurance
- mErrorMsg =
+ mErrorMsg =
mResource.getString("CGITASK_DIALOG_CMSDOWN_MESSAGE");
} else {
// need to determine case by case
- mErrorMsg =
+ mErrorMsg =
mResource.getString("CGITASK_DIALOG_CMSDOWN_MESSAGE")+ " java.net.SocketException: " + detail;
}
@@ -379,7 +379,7 @@ public class CMSImportCert extends CGITask {
} else {
// need to determine case by case
mErrorMsg =
- mResource.getString("CGITASK_DIALOG_CMSDOWN_MESSAGE")
+ mResource.getString("CGITASK_DIALOG_CMSDOWN_MESSAGE")
+ " Exception: " + detail;
}
Debug.println( "Command " + fullCmd + " failed: " + e );
@@ -388,7 +388,7 @@ public class CMSImportCert extends CGITask {
}
String getStage(String reqType){
- if (reqType.equals(Constants.PR_CA_SIGNING_CERT)){
+ if (reqType.equals(Constants.PR_CA_SIGNING_CERT)){
return ConfigConstants.STAGE_CA_REQ_SUCCESS;
}else if (reqType.equals(Constants.PR_SERVER_CERT)){
return ConfigConstants.STAGE_SSL_REQ_SUCCESS;
diff --git a/base/console/src/com/netscape/admin/certsrv/task/CMSMigrateCreate.java b/base/console/src/com/netscape/admin/certsrv/task/CMSMigrateCreate.java
index c7ff02c36..bc71dd152 100644
--- a/base/console/src/com/netscape/admin/certsrv/task/CMSMigrateCreate.java
+++ b/base/console/src/com/netscape/admin/certsrv/task/CMSMigrateCreate.java
@@ -49,13 +49,13 @@ public class CMSMigrateCreate extends CGITask
* variables
*==========================================================*/
private static final String PREFIX = "CMSMIGRATECREATE";
-
+
private static final String CREATE_CGI_NAME = "Tasks/Operation/Create";
-
+
//private boolean mSuccess = false; // status of last executed CGI
private Hashtable mCgiResponse = null; // holds parsed contents of CGI return
private String mCgiTask = null; // CGI task to call
-
+
/*==========================================================
* constructors
*==========================================================*/
@@ -70,17 +70,17 @@ public class CMSMigrateCreate extends CGITask
Debug.println("CMSMigrateCreate: initialize()");
_consoleInfo = info;
}
-
+
public boolean migrate(String serverRoot,
String server,
String targetDN,
boolean flag) {
-
- Debug.println("CMSMigrateCreate: migrate()");
-
+
+ Debug.println("CMSMigrateCreate: migrate()");
+
return false;
- }
-
+ }
+
/**
* Starts the server specific creation code, providing the DN for the
* target admin group. The method returns true or false depending
@@ -94,7 +94,7 @@ public class CMSMigrateCreate extends CGITask
public boolean createNewInstance(String targetDN) {
//Debug.println("CMSMigrateCreate: createNewInstance()- "+targetDN);
//targetDN: cn=Server Group, cn=cynthiar.mcom.com, ou=mcom.com, o=NetscapeRoot
-
+
JFrame mActiveFrame = UtilConsoleGlobals.getActivatedFrame();
boolean status = false; // return value
//show dialog
@@ -104,54 +104,54 @@ public class CMSMigrateCreate extends CGITask
if (dialog.isCancel()) {
return status;
}
-
+
//construct the rest of the configuration parameters
//serverName=cynthiar.mcom.com
- //sieURL=ldap://laiking.mcom.com:389/o=netscapeRoot
- //adminUID=admin
- //adminPWD=admin
- //instanceID=cert-data
- //serverRoot=/u/thomask/s4
- //adminDomain=mcom.com
-
+ //sieURL=ldap://laiking.mcom.com:389/o=netscapeRoot
+ //adminUID=admin
+ //adminPWD=admin
+ //instanceID=cert-data
+ //serverRoot=/u/thomask/s4
+ //adminDomain=mcom.com
+
Hashtable configParams = new Hashtable();
-
+
configParams.put("instanceID",dialog.getInstanceName());
-
+
String[] entries = LDAPDN.explodeDN(targetDN, false);
String DN = entries[entries.length-3] + ", " +
entries[entries.length-2] + ", " +
entries[entries.length-1];
-
+
//DN: cn=cynthiar.mcom.com, ou=mcom.com, o=NetscapeRoot
configParams.put("machineName", getValue(DN, "serverHostName",
LDAPConnection.SCOPE_BASE, null));
configParams.put("serverRoot", getValue(targetDN, "nsconfigroot",
- LDAPConnection.SCOPE_BASE, null));
+ LDAPConnection.SCOPE_BASE, null));
LDAPConnection ldc = _consoleInfo.getLDAPConnection();
String ssdn = ldc.getAuthenticationDN();
String[] avas = LDAPDN.explodeDN(ssdn, false);
String uid = avas[0];
if (!uid.startsWith("uid")) {
- CMSAdminUtil.showMessageDialog(mActiveFrame,
- mResource, PREFIX, "RESTARTADMINERROR",
+ CMSAdminUtil.showMessageDialog(mActiveFrame,
+ mResource, PREFIX, "RESTARTADMINERROR",
CMSAdminUtil.ERROR_MESSAGE);
return false;
}
configParams.put("adminUID", uid.substring(4,uid.length()));
-
- configParams.put("adminPWD",ldc.getAuthenticationPassword());
- String ldapUrl = "ldap://" + ldc.getHost() + ":" +
- Integer.toString(ldc.getPort()) + "/" +
+
+ configParams.put("adminPWD",ldc.getAuthenticationPassword());
+ String ldapUrl = "ldap://" + ldc.getHost() + ":" +
+ Integer.toString(ldc.getPort()) + "/" +
(String)_consoleInfo.get("BaseDN");
configParams.put("sieURL", ldapUrl);
-
+
String searchDN = entries[entries.length-2];
configParams.put("adminDomain", searchDN.substring(3,searchDN.length()));
-
+
Debug.println("CMSMigrateCreate: createNewInstance()- "+configParams.toString());
-
+
// set the arguments for the CGI call
_consoleInfo.put("arguments", configParams);
_consoleInfo.put(CREATE_CGI_NAME, "cert");
@@ -162,8 +162,8 @@ public class CMSMigrateCreate extends CGITask
if (_consoleInfo.get("AdminUserPassword") == null)
_consoleInfo.put("AdminUserPassword",
_consoleInfo.getAuthenticationPassword());
- Debug.println("AdminUserPassword = " + _consoleInfo.get("AdminUserPassword"));
-
+ Debug.println("AdminUserPassword = " + _consoleInfo.get("AdminUserPassword"));
+
// call the CGI program
Debug.println("CMSMigrateCreate: createNewInstance() before run task="+CREATE_CGI_NAME);
mCgiTask = CREATE_CGI_NAME;
@@ -191,7 +191,7 @@ public class CMSMigrateCreate extends CGITask
"SYSTEMERROR", CMSAdminUtil.ERROR_MESSAGE);
else
JOptionPane.showMessageDialog(mActiveFrame, errorMsg,
- "Error", CMSAdminUtil.ERROR_MESSAGE,
+ "Error", CMSAdminUtil.ERROR_MESSAGE,
CMSAdminUtil.getImage(CMSAdminResources.IMAGE_ERROR_ICON));
}
@@ -200,7 +200,7 @@ public class CMSMigrateCreate extends CGITask
return mSuccess;
}
-
+
/**
* the operation is finished after we receive the http stream
*/
@@ -208,7 +208,7 @@ public class CMSMigrateCreate extends CGITask
mSuccess = false;
if (mCgiResponse != null)
mCgiResponse.clear();
-
+
try {
BufferedReader rspStream =
new BufferedReader(new InputStreamReader(response, "UTF8"));
@@ -230,13 +230,13 @@ public class CMSMigrateCreate extends CGITask
} catch (Exception e) {
Debug.println("MigrateCreate.replyHandler: " + e.toString());
}
-
+
Debug.println("MigrateCreate.replyHandler: finished, mSuccess=" +
mSuccess);
finish();
}
-
+
/**
* return the value for the given keyword in the reply
*/
@@ -266,7 +266,7 @@ public class CMSMigrateCreate extends CGITask
Debug.println("Parse finished");
}
-
+
/**
* Get one value for one specified attribute from the given DN.
* If there is more than 1 entry which matches the given criteria, the
@@ -289,7 +289,7 @@ public class CMSMigrateCreate extends CGITask
return null;
}
-
+
/**
* Get the values for several specified attributes from the given DN.
* If there is more than 1 entry which matches the given criteria, the
@@ -335,6 +335,6 @@ public class CMSMigrateCreate extends CGITask
}
return values;
- }
-
+ }
+
}
diff --git a/base/console/src/com/netscape/admin/certsrv/task/CMSRequestCert.java b/base/console/src/com/netscape/admin/certsrv/task/CMSRequestCert.java
index 8b3cfef6b..1ef7f87de 100644
--- a/base/console/src/com/netscape/admin/certsrv/task/CMSRequestCert.java
+++ b/base/console/src/com/netscape/admin/certsrv/task/CMSRequestCert.java
@@ -47,11 +47,11 @@ public class CMSRequestCert extends CGITask {
/*==========================================================
* variables
*==========================================================*/
- private static final String PREFIX = "CGITASK";
+ private static final String PREFIX = "CGITASK";
private String mCgiTask = null; // CGI task to call
private InstallWizardInfo mWizardInfo;
private String mPolicyMsg = null;
-
+
/*==========================================================
* constructors
*==========================================================*/
@@ -66,18 +66,18 @@ public class CMSRequestCert extends CGITask {
Debug.println("CMSRequestCert: initialize()");
_consoleInfo = info.getAdminConsoleInfo();
- // the results coming back from the daemon will be added to the
+ // the results coming back from the daemon will be added to the
// wizard information.
mWizardInfo = info;
}
-
+
/**
- * Collect the data in name value pairs format and then send them to the
+ * Collect the data in name value pairs format and then send them to the
* cgi process.
*/
public boolean requestCert(Hashtable data) {
boolean status = false; // return value
-
+
try {
status = run(data);
} catch (Exception e) {
@@ -89,7 +89,7 @@ public class CMSRequestCert extends CGITask {
return mSuccess;
}
-
+
/**
* the operation is finished after we receive the http stream
*/
@@ -134,7 +134,7 @@ public class CMSRequestCert extends CGITask {
} catch (Exception e) {
Debug.println("RequestCert.Exception : " + e.toString());
}
-
+
Debug.println("RequestCert.replyHandler: finished, mSuccess=" +
mSuccess);
@@ -182,7 +182,7 @@ public class CMSRequestCert extends CGITask {
}
-
+
/**
* return the value for the given keyword in the reply
*/
@@ -203,7 +203,7 @@ public class CMSRequestCert extends CGITask {
+ sValue + " index=" + iIndex);
if (sValue != null && !sValue.equals("")) {
mWizardInfo.setRequestStatus(sValue);
- if (sValue.equals("2") || sValue.equals("3")
+ if (sValue.equals("2") || sValue.equals("3")
|| sValue.equals("4")){
//mSuccess = true;
}
@@ -289,7 +289,7 @@ public class CMSRequestCert extends CGITask {
}
else if ((iIndex=s.indexOf("/HTML")) != (-1))
mSuccess = true; // no need to parse further
-
+
Debug.println("Parse finished");
}
@@ -310,7 +310,7 @@ public class CMSRequestCert extends CGITask {
try {
mSuccess = false;
mFinished = false;
-
+
ByteArrayInputStream data = null;
if (args != null && !args.isEmpty())
data = encode(args);
@@ -372,11 +372,11 @@ public class CMSRequestCert extends CGITask {
(detail.indexOf("Connection timed out") > -1) ) {
// java.net.NoRouteToHostException: Connection timed out
// double insurance
- mErrorMsg =
+ mErrorMsg =
mResource.getString("CGITASK_DIALOG_CMSDOWN_MESSAGE");
} else {
// need to determine case by case
- mErrorMsg =
+ mErrorMsg =
mResource.getString("CGITASK_DIALOG_CMSDOWN_MESSAGE")+ " java.net.SocketException: " + detail;
}
@@ -407,7 +407,7 @@ public class CMSRequestCert extends CGITask {
} else {
// need to determine case by case
mErrorMsg =
- mResource.getString("CGITASK_DIALOG_CMSDOWN_MESSAGE")
+ mResource.getString("CGITASK_DIALOG_CMSDOWN_MESSAGE")
+ " Exception: " + detail;
}
Debug.println( "Command " + fullCmd + " failed: " + e );
diff --git a/base/console/src/com/netscape/admin/certsrv/task/CMSRestart.java b/base/console/src/com/netscape/admin/certsrv/task/CMSRestart.java
index fa9d59ddd..9c52d80c6 100644
--- a/base/console/src/com/netscape/admin/certsrv/task/CMSRestart.java
+++ b/base/console/src/com/netscape/admin/certsrv/task/CMSRestart.java
@@ -74,7 +74,7 @@ public class CMSRestart extends CGITask
Hashtable configParams = new Hashtable();
configParams.put("serverRoot",_consoleInfo.get("serverRoot"));
-
+
String servid = (String)_consoleInfo.get("servid");
int index = servid.indexOf("-");
if (index != -1) {
diff --git a/base/console/src/com/netscape/admin/certsrv/task/CMSStart.java b/base/console/src/com/netscape/admin/certsrv/task/CMSStart.java
index 2122145c3..c47cbd164 100644
--- a/base/console/src/com/netscape/admin/certsrv/task/CMSStart.java
+++ b/base/console/src/com/netscape/admin/certsrv/task/CMSStart.java
@@ -145,7 +145,7 @@ public class CMSStart extends CGITask
UtilConsoleGlobals.getActivatedFrame(),
mResource, PREFIX, "SYSTEMERROR", CMSAdminUtil.ERROR_MESSAGE);
else {
- String errorMsg =
+ String errorMsg =
mResource.getString("STARTRESULTDIALOG_FAILED_TEXT")+mErrorMsg;
Icon icon = CMSAdminUtil.getImage(CMSAdminResources.IMAGE_ERROR_ICON);
JOptionPane.showMessageDialog(UtilConsoleGlobals.getActivatedFrame(),
diff --git a/base/console/src/com/netscape/admin/certsrv/task/CMSStartDaemon.java b/base/console/src/com/netscape/admin/certsrv/task/CMSStartDaemon.java
index 510bf0661..1d8dd2ef7 100644
--- a/base/console/src/com/netscape/admin/certsrv/task/CMSStartDaemon.java
+++ b/base/console/src/com/netscape/admin/certsrv/task/CMSStartDaemon.java
@@ -47,13 +47,13 @@ public class CMSStartDaemon extends CGITask {
* variables
*==========================================================*/
private static final String PREFIX = "CMSSTARTDAEMON";
-
+
public static final String START_DAEMON_CGI = "Tasks/Operation/start-daemon";
-
+
private boolean mSuccess = false; // status of last executed CGI
private Hashtable mCgiResponse = null; // holds parsed contents of CGI return
private String mCgiTask = null; // CGI task to call
-
+
/*==========================================================
* constructors
*==========================================================*/
@@ -68,7 +68,7 @@ public class CMSStartDaemon extends CGITask {
Debug.println("CMSStartDaemon: initialize()");
_consoleInfo = info;
}
-
+
/**
* Starts the server specific creation code, providing the DN for the
* target admin group. The method returns true or false depending
@@ -80,7 +80,7 @@ public class CMSStartDaemon extends CGITask {
* or failed (false).
*/
public boolean runDaemon(Hashtable configParams) {
- String response = null;
+ String response = null;
/*
LDAPConnection ldc = _consoleInfo.getLDAPConnection();
String ssdn = ldc.getAuthenticationDN();
@@ -101,7 +101,7 @@ public class CMSStartDaemon extends CGITask {
if (_consoleInfo.get("AdminUserPassword") == null)
_consoleInfo.put("AdminUserPassword",
_consoleInfo.getAuthenticationPassword());
- Debug.println("AdminUserPassword = " + _consoleInfo.get("AdminUserPassword"));
+ Debug.println("AdminUserPassword = " + _consoleInfo.get("AdminUserPassword"));
Debug.println("Current DN = "+_consoleInfo.getCurrentDN());
boolean status = false; // return value
@@ -114,11 +114,11 @@ public class CMSStartDaemon extends CGITask {
}
Debug.println("CMSStartDaemon: startDaemon() after run status=" +
status + " mSuccess=" + mSuccess);
-again:
+again:
if (!mSuccess) {
response = (String) mCgiResponse.get("NMC_ERRINFO");
if ((response != null) && response.equalsIgnoreCase("daemon found lock file")) {
- int result = CMSAdminUtil.showConfirmDialog(mResource, "CMSSTARTDAEMON"/*PREFIX*/,
+ int result = CMSAdminUtil.showConfirmDialog(mResource, "CMSSTARTDAEMON"/*PREFIX*/,
"LOCKDELETECONFIRM", CMSAdminUtil.WARNING_MESSAGE);
if (result == CMSAdminUtil.OK_OPTION) {
Debug.println("User wants to delete lock file.");
@@ -135,10 +135,10 @@ again:
"SYSTEMERROR", CMSAdminUtil.ERROR_MESSAGE);
}
}
-
+
return mSuccess;
}
-
+
/**
* the operation is finished after we receive the http stream
*/
@@ -146,7 +146,7 @@ again:
mSuccess = false;
if (mCgiResponse != null)
mCgiResponse.clear();
-
+
try {
BufferedReader rspStream =
new BufferedReader(new InputStreamReader(response, "UTF8"));
@@ -168,13 +168,13 @@ again:
} catch (Exception e) {
Debug.println("StartDaemon.replyHandler: " + e.toString());
}
-
+
Debug.println("StartDaemon.replyHandler: finished, mSuccess=" +
mSuccess);
finish();
}
-
+
/**
* return the value for the given keyword in the reply
*/
@@ -203,14 +203,14 @@ again:
Debug.println("Parse finished");
}
-
+
/**
* return the value for the response
*/
public Hashtable getResponse() {
- return mCgiResponse;
+ return mCgiResponse;
}
-
+
/**
* Get one value for one specified attribute from the given DN.
* If there is more than 1 entry which matches the given criteria, the
@@ -233,7 +233,7 @@ again:
return null;
}
-
+
/**
* Get the values for several specified attributes from the given DN.
* If there is more than 1 entry which matches the given criteria, the
@@ -279,6 +279,6 @@ again:
}
return values;
- }
-
+ }
+
}
diff --git a/base/console/src/com/netscape/admin/certsrv/task/CMSStatus.java b/base/console/src/com/netscape/admin/certsrv/task/CMSStatus.java
index edd80b5b2..e052e157e 100644
--- a/base/console/src/com/netscape/admin/certsrv/task/CMSStatus.java
+++ b/base/console/src/com/netscape/admin/certsrv/task/CMSStatus.java
@@ -112,7 +112,7 @@ public class CMSStatus extends CGITask
configDN);
}
_consoleInfo.put("arguments", configParams);
-
+
if (_consoleInfo.get("AdminUsername") == null)
_consoleInfo.put("AdminUsername", _consoleInfo.getAuthenticationDN()
);
@@ -132,7 +132,7 @@ public class CMSStatus extends CGITask
status = false;
}
Debug.println("CMSStatus: status() after run status="+status);
-
+
if (!status) {
Debug.println("Status task returned false");
} else {
@@ -143,10 +143,10 @@ public class CMSStatus extends CGITask
/**
- * Send an http request to the server.
- * if the admin serever is down do
+ * Send an http request to the server.
+ * if the admin serever is down do
* Return true if we're sure it
- * succeeded, otherwise false.
+ * succeeded, otherwise false.
*
* @param viewInstance The calling page
* @param cmd Command to execute
@@ -158,22 +158,22 @@ public class CMSStatus extends CGITask
Debug.println( "Could not get adminURL for " + getDN() );
return false;
}
-
+
// Allow specifying e.g. "slapd-install" for instance
String instance = (String)_consoleInfo.get( cmd );
-
+
if ( instance == null )
instance = (String)_consoleInfo.get( "ServerInstance" );
String fullCmd = mAdminURL + instance + "/" + cmd;
-
+
HttpManager h = new HttpManager();
// tell the http manager to use UTF8 encoding
h.setSendUTF8(true);
-
+
try {
mSuccess = false;
mFinished = false;
-
+
// _consoleInfo.get("arguments") is a hashtable of key/value pairs
// to use as the arguments to the CGI
Hashtable args = (Hashtable)_consoleInfo.get("arguments");
@@ -199,7 +199,7 @@ public class CMSStatus extends CGITask
mSuccess = cmsAdmin.getStatusFromAgentPort();
}
Debug.println( "Falling back to get status by connecting to the server");
-
+
}
return mSuccess;
}
diff --git a/base/console/src/com/netscape/admin/certsrv/task/CMSStop.java b/base/console/src/com/netscape/admin/certsrv/task/CMSStop.java
index b2a909633..7bbf7472d 100644
--- a/base/console/src/com/netscape/admin/certsrv/task/CMSStop.java
+++ b/base/console/src/com/netscape/admin/certsrv/task/CMSStop.java
@@ -142,7 +142,7 @@ public class CMSStop extends CGITask
UtilConsoleGlobals.getActivatedFrame(),
mResource, PREFIX, "SYSTEMERROR", CMSAdminUtil.ERROR_MESSAGE);
else {
- String errorMsg =
+ String errorMsg =
mResource.getString("STOPRESULTDIALOG_FAILED_TEXT")+mErrorMsg;
Icon icon = CMSAdminUtil.getImage(CMSAdminResources.IMAGE_ERROR_ICON);
JOptionPane.showMessageDialog(UtilConsoleGlobals.getActivatedFrame(),
diff --git a/base/console/src/com/netscape/admin/certsrv/task/StatusDialog.java b/base/console/src/com/netscape/admin/certsrv/task/StatusDialog.java
index 0cd11beb5..a959262f7 100644
--- a/base/console/src/com/netscape/admin/certsrv/task/StatusDialog.java
+++ b/base/console/src/com/netscape/admin/certsrv/task/StatusDialog.java
@@ -30,7 +30,7 @@ import javax.swing.table.*;
import com.netscape.certsrv.common.*;
/**
- * Policy Implementation Information viewer
+ * Policy Implementation Information viewer
*
* @author Jack Pan-Chen
* @version $Revision$, $Date$
@@ -160,7 +160,7 @@ public class StatusDialog extends JDialog
gbc.insets = new Insets(CMSAdminUtil.COMPONENT_SPACE,CMSAdminUtil.COMPONENT_SPACE, CMSAdminUtil.COMPONENT_SPACE,CMSAdminUtil.COMPONENT_SPACE);
gb3.setConstraints(mDetails, gbc);
content.add(mDetails);
-
+
CMSAdminUtil.resetGBC(gbc);
mTextArea = new JTextArea("",3,50);
mTextArea.setFont(mTitle.getFont());
@@ -180,7 +180,7 @@ public class StatusDialog extends JDialog
gbc.weighty=1.0;
gb3.setConstraints(scrollPanel, gbc);
content.add(scrollPanel);
-
+
return content;
}
}