summaryrefslogtreecommitdiffstats
path: root/pki/base/common/src/com/netscape/cms/servlet/cert/DisplayHashUserEnroll.java
diff options
context:
space:
mode:
authorAde Lee <alee@redhat.com>2011-12-08 21:15:59 -0500
committerAde Lee <alee@redhat.com>2011-12-08 21:15:59 -0500
commit171aaece4f23709d33d180cf36eb3af5e454b0c9 (patch)
tree1485f9f0a7bd10de4ff25030db575dbb8dafae74 /pki/base/common/src/com/netscape/cms/servlet/cert/DisplayHashUserEnroll.java
parentadad2fcee8a29fdb82376fbce07dedb11fccc182 (diff)
downloadpki-171aaece4f23709d33d180cf36eb3af5e454b0c9.tar.gz
pki-171aaece4f23709d33d180cf36eb3af5e454b0c9.tar.xz
pki-171aaece4f23709d33d180cf36eb3af5e454b0c9.zip
Revert "Formatting"
This reverts commit 32150d3ee32f8ac27118af7c792794b538c78a2f.
Diffstat (limited to 'pki/base/common/src/com/netscape/cms/servlet/cert/DisplayHashUserEnroll.java')
-rw-r--r--pki/base/common/src/com/netscape/cms/servlet/cert/DisplayHashUserEnroll.java64
1 files changed, 32 insertions, 32 deletions
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/DisplayHashUserEnroll.java b/pki/base/common/src/com/netscape/cms/servlet/cert/DisplayHashUserEnroll.java
index 74c4ff28..6efda2bb 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/DisplayHashUserEnroll.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/DisplayHashUserEnroll.java
@@ -17,6 +17,7 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.cms.servlet.cert;
+
import java.io.IOException;
import java.util.Date;
import java.util.Locale;
@@ -44,10 +45,11 @@ import com.netscape.cms.servlet.common.CMSTemplate;
import com.netscape.cms.servlet.common.CMSTemplateParams;
import com.netscape.cms.servlet.common.ECMSGWException;
+
/**
- * Servlet to report the status, ie, the agent-initiated user enrollment is
- * enabled or disabled.
- *
+ * Servlet to report the status, ie, the agent-initiated user
+ * enrollment is enabled or disabled.
+ *
* @version $Revision$, $Date$
*/
public class DisplayHashUserEnroll extends CMSServlet {
@@ -70,7 +72,8 @@ public class DisplayHashUserEnroll extends CMSServlet {
super.init(sc);
try {
- mFormPath = sc.getInitParameter(PROP_SUCCESS_TEMPLATE);
+ mFormPath = sc.getInitParameter(
+ PROP_SUCCESS_TEMPLATE);
if (mFormPath == null)
mFormPath = TPL_FILE;
} catch (Exception e) {
@@ -86,7 +89,8 @@ public class DisplayHashUserEnroll extends CMSServlet {
/**
* Services the request
*/
- protected void process(CMSRequest cmsReq) throws EBaseException {
+ protected void process(CMSRequest cmsReq)
+ throws EBaseException {
HttpServletRequest httpReq = cmsReq.getHttpReq();
HttpServletResponse httpResp = cmsReq.getHttpResp();
@@ -94,8 +98,8 @@ public class DisplayHashUserEnroll extends CMSServlet {
AuthzToken authzToken = null;
try {
- authzToken = authorize(mAclMethod, authToken, mAuthzResourceName,
- "read");
+ authzToken = authorize(mAclMethod, authToken,
+ mAuthzResourceName, "read");
} catch (Exception e) {
// do nothing for now
}
@@ -111,10 +115,9 @@ public class DisplayHashUserEnroll extends CMSServlet {
IArgBlock args = cmsReq.getHttpParams();
if (!(mAuthority instanceof IRegistrationAuthority)) {
- log(ILogger.LL_FAILURE,
- CMS.getLogMessage("ADMIN_SRVLT_ERR_GET_TEMPLATE"));
- cmsReq.setError(new ECMSGWException(CMS
- .getUserMessage("CMS_GW_NOT_YET_IMPLEMENTED")));
+ log(ILogger.LL_FAILURE, CMS.getLogMessage("ADMIN_SRVLT_ERR_GET_TEMPLATE"));
+ cmsReq.setError(new ECMSGWException(
+ CMS.getUserMessage("CMS_GW_NOT_YET_IMPLEMENTED")));
cmsReq.setStatus(CMSRequest.ERROR);
return;
}
@@ -125,8 +128,7 @@ public class DisplayHashUserEnroll extends CMSServlet {
IConfigStore configStore = CMS.getConfigStore();
String val = configStore.getString("hashDirEnrollment.name");
- IAuthSubsystem authSS = (IAuthSubsystem) CMS
- .getSubsystem(CMS.SUBSYSTEM_AUTH);
+ IAuthSubsystem authSS = (IAuthSubsystem) CMS.getSubsystem(CMS.SUBSYSTEM_AUTH);
IAuthManager authMgr = authSS.get(val);
HashAuthentication mgr = (HashAuthentication) authMgr;
boolean isEnable = mgr.isEnable(reqHost);
@@ -150,7 +152,7 @@ public class DisplayHashUserEnroll extends CMSServlet {
printError(cmsReq, "2");
cmsReq.setStatus(CMSRequest.SUCCESS);
return;
- }
+ }
mgr.setLastLogin(reqHost, currTime);
@@ -160,10 +162,10 @@ public class DisplayHashUserEnroll extends CMSServlet {
try {
form = getTemplate(mFormPath, httpReq, locale);
} catch (IOException e) {
- log(ILogger.LL_FAILURE, CMS.getLogMessage(
- "ADMIN_SRVLT_ERR_GET_TEMPLATE", mFormPath, e.toString()));
- cmsReq.setError(new ECMSGWException(CMS
- .getUserMessage("CMS_GW_DISPLAY_TEMPLATE_ERROR")));
+ log(ILogger.LL_FAILURE,
+ CMS.getLogMessage("ADMIN_SRVLT_ERR_GET_TEMPLATE", mFormPath, e.toString()));
+ cmsReq.setError(new ECMSGWException(
+ CMS.getUserMessage("CMS_GW_DISPLAY_TEMPLATE_ERROR")));
cmsReq.setStatus(CMSRequest.ERROR);
return;
}
@@ -175,11 +177,10 @@ public class DisplayHashUserEnroll extends CMSServlet {
form.renderOutput(out, argSet);
cmsReq.setStatus(CMSRequest.SUCCESS);
} catch (IOException e) {
- log(ILogger.LL_FAILURE,
- CMS.getLogMessage("CMSGW_ERR_OUT_STREAM_TEMPLATE",
- e.toString()));
- cmsReq.setError(new ECMSGWException(CMS
- .getUserMessage("CMS_GW_DISPLAY_TEMPLATE_ERROR")));
+ log(ILogger.LL_FAILURE,
+ CMS.getLogMessage("CMSGW_ERR_OUT_STREAM_TEMPLATE", e.toString()));
+ cmsReq.setError(new ECMSGWException(
+ CMS.getUserMessage("CMS_GW_DISPLAY_TEMPLATE_ERROR")));
cmsReq.setStatus(CMSRequest.ERROR);
}
cmsReq.setStatus(CMSRequest.SUCCESS);
@@ -187,7 +188,7 @@ public class DisplayHashUserEnroll extends CMSServlet {
}
private void printError(CMSRequest cmsReq, String errorCode)
- throws EBaseException {
+ throws EBaseException {
IArgBlock httpParams = cmsReq.getHttpParams();
HttpServletRequest httpReq = cmsReq.getHttpReq();
HttpServletResponse httpResp = cmsReq.getHttpResp();
@@ -206,10 +207,10 @@ public class DisplayHashUserEnroll extends CMSServlet {
try {
form = getTemplate(formPath, httpReq, locale);
} catch (IOException e) {
- log(ILogger.LL_FAILURE, CMS.getLogMessage(
- "ADMIN_SRVLT_ERR_GET_TEMPLATE", formPath, e.toString()));
- cmsReq.setError(new ECMSGWException(CMS
- .getUserMessage("CMS_GW_DISPLAY_TEMPLATE_ERROR")));
+ log(ILogger.LL_FAILURE,
+ CMS.getLogMessage("ADMIN_SRVLT_ERR_GET_TEMPLATE", formPath, e.toString()));
+ cmsReq.setError(new ECMSGWException(
+ CMS.getUserMessage("CMS_GW_DISPLAY_TEMPLATE_ERROR")));
cmsReq.setStatus(CMSRequest.ERROR);
return;
}
@@ -222,11 +223,10 @@ public class DisplayHashUserEnroll extends CMSServlet {
cmsReq.setStatus(CMSRequest.SUCCESS);
} catch (IOException e) {
log(ILogger.LL_FAILURE,
- CMS.getLogMessage("CMSGW_ERR_BAD_SERV_OUT_STREAM", "",
- e.toString()));
+ CMS.getLogMessage("CMSGW_ERR_BAD_SERV_OUT_STREAM", "", e.toString()));
- cmsReq.setError(new ECMSGWException(CMS
- .getUserMessage("CMS_GW_DISPLAY_TEMPLATE_ERROR")));
+ cmsReq.setError(new ECMSGWException(
+ CMS.getUserMessage("CMS_GW_DISPLAY_TEMPLATE_ERROR")));
cmsReq.setStatus(CMSRequest.ERROR);
}
}