From 7c7b9d023cd466c1771068badc020dab36beb553 Mon Sep 17 00:00:00 2001 From: Endi Sukma Dewata Date: Thu, 5 Apr 2012 14:49:11 -0500 Subject: Removed whitespaces from Java code. Whitespaces in Java code have been removed with the following command: find . -not -path .git -name *.java -exec sed -i 's/[[:blank:]]\+$//' {} \; Ticket #134 --- .../cms/servlet/key/ConfirmRecoverBySerial.java | 4 ++-- .../netscape/cms/servlet/key/DisplayBySerial.java | 8 +++---- .../servlet/key/DisplayBySerialForRecovery.java | 8 +++---- .../netscape/cms/servlet/key/DisplayTransport.java | 4 ++-- .../netscape/cms/servlet/key/ExamineRecovery.java | 6 ++--- .../cms/servlet/key/GetApprovalStatus.java | 8 +++---- .../com/netscape/cms/servlet/key/GetAsyncPk12.java | 8 +++---- .../src/com/netscape/cms/servlet/key/GetPk12.java | 6 ++--- .../cms/servlet/key/GrantAsyncRecovery.java | 12 +++++----- .../netscape/cms/servlet/key/GrantRecovery.java | 12 +++++----- .../netscape/cms/servlet/key/KeyRecordParser.java | 4 ++-- .../com/netscape/cms/servlet/key/KeyResource.java | 4 ++-- .../cms/servlet/key/KeyResourceService.java | 20 ++++++++--------- .../com/netscape/cms/servlet/key/KeysResource.java | 6 ++--- .../cms/servlet/key/KeysResourceService.java | 24 ++++++++++---------- .../netscape/cms/servlet/key/RecoverBySerial.java | 2 +- .../src/com/netscape/cms/servlet/key/SrchKey.java | 6 ++--- .../cms/servlet/key/SrchKeyForRecovery.java | 10 ++++----- .../com/netscape/cms/servlet/key/model/KeyDAO.java | 26 +++++++++++----------- .../netscape/cms/servlet/key/model/KeyData.java | 6 ++--- .../cms/servlet/key/model/KeyDataInfo.java | 8 +++---- .../cms/servlet/key/model/KeyDataInfos.java | 6 ++--- 22 files changed, 99 insertions(+), 99 deletions(-) (limited to 'base/common/src/com/netscape/cms/servlet/key') diff --git a/base/common/src/com/netscape/cms/servlet/key/ConfirmRecoverBySerial.java b/base/common/src/com/netscape/cms/servlet/key/ConfirmRecoverBySerial.java index 59b01f26a..aa51ec35f 100644 --- a/base/common/src/com/netscape/cms/servlet/key/ConfirmRecoverBySerial.java +++ b/base/common/src/com/netscape/cms/servlet/key/ConfirmRecoverBySerial.java @@ -46,7 +46,7 @@ import com.netscape.cms.servlet.common.ECMSGWException; * shows key information and presents a list of text boxes * so that recovery agents can type in their identifiers * and passwords. - * + * * @version $Revision$, $Date$ */ public class ConfirmRecoverBySerial extends CMSServlet { @@ -105,7 +105,7 @@ public class ConfirmRecoverBySerial extends CMSServlet { public void process(CMSRequest cmsReq) throws EBaseException { // Note that we should try to handle all the exceptions - // instead of passing it up back to the servlet + // instead of passing it up back to the servlet // framework. HttpServletRequest req = cmsReq.getHttpReq(); diff --git a/base/common/src/com/netscape/cms/servlet/key/DisplayBySerial.java b/base/common/src/com/netscape/cms/servlet/key/DisplayBySerial.java index 8876d9350..e414dde9a 100644 --- a/base/common/src/com/netscape/cms/servlet/key/DisplayBySerial.java +++ b/base/common/src/com/netscape/cms/servlet/key/DisplayBySerial.java @@ -46,7 +46,7 @@ import com.netscape.cms.servlet.common.ECMSGWException; /** * Display a specific Key Archival Request *

- * + * * @version $Revision$, $Date$ */ public class DisplayBySerial extends CMSServlet { @@ -76,7 +76,7 @@ public class DisplayBySerial extends CMSServlet { /** * initialize the servlet. This servlet uses the template file * "displayBySerial.template" to process the response. - * + * * @param sc servlet configuration, read from the web.xml file */ public void init(ServletConfig sc) throws ServletException { @@ -101,7 +101,7 @@ public class DisplayBySerial extends CMSServlet { *

- * + * * @param cmsReq the object holding the request and response information */ public void process(CMSRequest cmsReq) throws EBaseException { @@ -141,7 +141,7 @@ public class DisplayBySerial extends CMSServlet { } // Note that we should try to handle all the exceptions - // instead of passing it up back to the servlet + // instead of passing it up back to the servlet // framework. IArgBlock header = CMS.createArgBlock(); diff --git a/base/common/src/com/netscape/cms/servlet/key/DisplayBySerialForRecovery.java b/base/common/src/com/netscape/cms/servlet/key/DisplayBySerialForRecovery.java index 29cc2b3b3..9bc1c1b4f 100644 --- a/base/common/src/com/netscape/cms/servlet/key/DisplayBySerialForRecovery.java +++ b/base/common/src/com/netscape/cms/servlet/key/DisplayBySerialForRecovery.java @@ -47,7 +47,7 @@ import com.netscape.cms.servlet.common.ECMSGWException; /** * Display a Specific Key Archival Request, and initiate * key recovery process - * + * * @version $Revision$, $Date$ */ public class DisplayBySerialForRecovery extends CMSServlet { @@ -78,7 +78,7 @@ public class DisplayBySerialForRecovery extends CMSServlet { /** * initialize the servlet. This servlet uses the template file * "displayBySerialForRecovery.template" to process the response. - * + * * @param sc servlet configuration, read from the web.xml file */ public void init(ServletConfig sc) throws ServletException { @@ -103,7 +103,7 @@ public class DisplayBySerialForRecovery extends CMSServlet { *
  • http.param serialNumber request ID of key archival request *
  • http.param publicKeyData * - * + * * @param cmsReq the object holding the request and response information */ public void process(CMSRequest cmsReq) throws EBaseException { @@ -143,7 +143,7 @@ public class DisplayBySerialForRecovery extends CMSServlet { } // Note that we should try to handle all the exceptions - // instead of passing it up back to the servlet + // instead of passing it up back to the servlet // framework. IArgBlock header = CMS.createArgBlock(); diff --git a/base/common/src/com/netscape/cms/servlet/key/DisplayTransport.java b/base/common/src/com/netscape/cms/servlet/key/DisplayTransport.java index dd224cc8a..5c0fc73e9 100644 --- a/base/common/src/com/netscape/cms/servlet/key/DisplayTransport.java +++ b/base/common/src/com/netscape/cms/servlet/key/DisplayTransport.java @@ -35,7 +35,7 @@ import com.netscape.cms.servlet.common.ECMSGWException; /** * Retrieve Transport Certificate used to * wrap Private key Archival requests - * + * * @version $Revision$, $Date$ */ public class DisplayTransport extends CMSServlet { @@ -70,7 +70,7 @@ public class DisplayTransport extends CMSServlet { /** * Process the HTTP request. - * + * * @param cmsReq the object holding the request and response information */ public void process(CMSRequest cmsReq) throws EBaseException { diff --git a/base/common/src/com/netscape/cms/servlet/key/ExamineRecovery.java b/base/common/src/com/netscape/cms/servlet/key/ExamineRecovery.java index cd440da08..630ef1b14 100644 --- a/base/common/src/com/netscape/cms/servlet/key/ExamineRecovery.java +++ b/base/common/src/com/netscape/cms/servlet/key/ExamineRecovery.java @@ -47,7 +47,7 @@ import com.netscape.cms.servlet.common.ECMSGWException; /** * View the Key Recovery Request - * + * * @version $Revision$, $Date$ */ public class ExamineRecovery extends CMSServlet { @@ -107,7 +107,7 @@ public class ExamineRecovery extends CMSServlet { * - * + * * @param cmsReq the object holding the request and response information */ @@ -167,7 +167,7 @@ public class ExamineRecovery extends CMSServlet { /* catch (NumberFormatException e) { error = eBaseException( - + header.addStringValue(OUT_ERROR, MessageFormatter.getLocalizedString( locale[0], diff --git a/base/common/src/com/netscape/cms/servlet/key/GetApprovalStatus.java b/base/common/src/com/netscape/cms/servlet/key/GetApprovalStatus.java index 55d79b1ab..4989c1245 100644 --- a/base/common/src/com/netscape/cms/servlet/key/GetApprovalStatus.java +++ b/base/common/src/com/netscape/cms/servlet/key/GetApprovalStatus.java @@ -46,7 +46,7 @@ import com.netscape.cms.servlet.common.ECMSGWException; /** * Check to see if a Key Recovery Request has been approved - * + * * @version $Revision$, $Date$ */ public class GetApprovalStatus extends CMSServlet { @@ -79,7 +79,7 @@ public class GetApprovalStatus extends CMSServlet { * initialize the servlet. This servlet uses the template files * "getApprovalStatus.template" and "finishRecovery.template" * to process the response. - * + * * @param sc servlet configuration, read from the web.xml file */ public void init(ServletConfig sc) throws ServletException { @@ -102,7 +102,7 @@ public class GetApprovalStatus extends CMSServlet { * - * + * * @param cmsReq the object holding the request and response information */ public void process(CMSRequest cmsReq) throws EBaseException { @@ -189,7 +189,7 @@ public class GetApprovalStatus extends CMSServlet { } */ } else if (((IKeyRecoveryAuthority) mService).getError(recoveryID) != null) { - // error in recovery process + // error in recovery process header.addStringValue(OUT_ERROR, ((IKeyRecoveryAuthority) mService).getError(recoveryID)); rComplete = 1; diff --git a/base/common/src/com/netscape/cms/servlet/key/GetAsyncPk12.java b/base/common/src/com/netscape/cms/servlet/key/GetAsyncPk12.java index 9d67cab8d..dfc7d4d3b 100644 --- a/base/common/src/com/netscape/cms/servlet/key/GetAsyncPk12.java +++ b/base/common/src/com/netscape/cms/servlet/key/GetAsyncPk12.java @@ -44,7 +44,7 @@ import com.netscape.cms.servlet.common.ECMSGWException; /** * Get the recovered key in PKCS#12 format * - for asynchronous key recovery only - * + * */ public class GetAsyncPk12 extends CMSServlet { @@ -83,7 +83,7 @@ public class GetAsyncPk12 extends CMSServlet { /** * initialize the servlet. This servlet uses the template file * "finishAsyncRecovery.template" to process the response. - * + * * @param sc servlet configuration, read from the web.xml file */ public void init(ServletConfig sc) throws ServletException { @@ -108,7 +108,7 @@ public class GetAsyncPk12 extends CMSServlet { * - * + * * @param cmsReq the object holding the request and response information */ public void process(CMSRequest cmsReq) throws EBaseException { @@ -228,7 +228,7 @@ public class GetAsyncPk12 extends CMSServlet { CMS.getUserMessage(locale[0], "CMS_BASE_INTERNAL_ERROR", e.toString())); } } else if (((IKeyRecoveryAuthority) mService).getError(reqID) != null) { - // error in recovery process + // error in recovery process header.addStringValue(OUT_ERROR, ((IKeyRecoveryAuthority) mService).getError(reqID)); } else { diff --git a/base/common/src/com/netscape/cms/servlet/key/GetPk12.java b/base/common/src/com/netscape/cms/servlet/key/GetPk12.java index 96fe7c85d..fdcbf40bc 100644 --- a/base/common/src/com/netscape/cms/servlet/key/GetPk12.java +++ b/base/common/src/com/netscape/cms/servlet/key/GetPk12.java @@ -44,7 +44,7 @@ import com.netscape.cms.servlet.common.ECMSGWException; /** * Get the recovered key in PKCS#12 format - * + * * @version $Revision$, $Date$ */ public class GetPk12 extends CMSServlet { @@ -82,7 +82,7 @@ public class GetPk12 extends CMSServlet { /** * initialize the servlet. This servlet uses the template file * "finishRecovery.template" to process the response. - * + * * @param sc servlet configuration, read from the web.xml file */ public void init(ServletConfig sc) throws ServletException { @@ -107,7 +107,7 @@ public class GetPk12 extends CMSServlet { * - * + * * @param cmsReq the object holding the request and response information */ public void process(CMSRequest cmsReq) throws EBaseException { diff --git a/base/common/src/com/netscape/cms/servlet/key/GrantAsyncRecovery.java b/base/common/src/com/netscape/cms/servlet/key/GrantAsyncRecovery.java index 7c0c0cb1c..fee739f29 100644 --- a/base/common/src/com/netscape/cms/servlet/key/GrantAsyncRecovery.java +++ b/base/common/src/com/netscape/cms/servlet/key/GrantAsyncRecovery.java @@ -42,7 +42,7 @@ import com.netscape.cms.servlet.common.ECMSGWException; /** * Approve an asynchronous key recovery request - * + * */ public class GrantAsyncRecovery extends CMSServlet { @@ -80,7 +80,7 @@ public class GrantAsyncRecovery extends CMSServlet { /** * initialize the servlet. This servlet uses the template file * 'grantAsyncRecovery.template' to process the response. - * + * * @param sc servlet configuration, read from the web.xml file */ public void init(ServletConfig sc) throws ServletException { @@ -106,9 +106,9 @@ public class GrantAsyncRecovery extends CMSServlet { * - * + * * @param cmsReq the object holding the request and response information */ public void process(CMSRequest cmsReq) throws EBaseException { @@ -183,12 +183,12 @@ public class GrantAsyncRecovery extends CMSServlet { /** * Update agent approval list *

    - * + * *

    - * + * * @param argSet CMS template parameters * @param header argument block * @param reqID string containing the recovery request ID diff --git a/base/common/src/com/netscape/cms/servlet/key/GrantRecovery.java b/base/common/src/com/netscape/cms/servlet/key/GrantRecovery.java index 02aacc31c..9c4ccc8be 100644 --- a/base/common/src/com/netscape/cms/servlet/key/GrantRecovery.java +++ b/base/common/src/com/netscape/cms/servlet/key/GrantRecovery.java @@ -43,7 +43,7 @@ import com.netscape.cms.servlet.common.ECMSGWException; /** * Approve a key recovery request - * + * * @version $Revision$, $Date$ */ public class GrantRecovery extends CMSServlet { @@ -84,7 +84,7 @@ public class GrantRecovery extends CMSServlet { /** * initialize the servlet. This servlet uses the template file * 'grantRecovery.template' to process the response. - * + * * @param sc servlet configuration, read from the web.xml file */ public void init(ServletConfig sc) throws ServletException { @@ -111,9 +111,9 @@ public class GrantRecovery extends CMSServlet { *
  • http.param recoveryID ID of the request to approve *
  • http.param agentID User ID of the agent approving the request *
  • http.param agentPWD Password of the agent approving the request - * + * * - * + * * @param cmsReq the object holding the request and response information */ public void process(CMSRequest cmsReq) throws EBaseException { @@ -189,12 +189,12 @@ public class GrantRecovery extends CMSServlet { * Recovers a key. The p12 will be protected by the password * provided by the administrator. *

    - * + * *

    - * + * * @param argSet CMS template parameters * @param header argument block * @param recoveryID string containing the recovery ID diff --git a/base/common/src/com/netscape/cms/servlet/key/KeyRecordParser.java b/base/common/src/com/netscape/cms/servlet/key/KeyRecordParser.java index ed770ea91..b599cc7f5 100644 --- a/base/common/src/com/netscape/cms/servlet/key/KeyRecordParser.java +++ b/base/common/src/com/netscape/cms/servlet/key/KeyRecordParser.java @@ -28,7 +28,7 @@ import com.netscape.certsrv.dbs.keydb.IKeyRecord; /** * Output a 'pretty print' of a Key Archival record - * + * * @version $Revision$, $Date$ */ public class KeyRecordParser { @@ -60,7 +60,7 @@ public class KeyRecordParser { rec.getSerialNumber(), 10); rarg.addStringValue(OUT_KEY_ALGORITHM, rec.getAlgorithm()); - // Possible Enhancement: sun's BASE64Encode is not + // Possible Enhancement: sun's BASE64Encode is not // fast. We may may to have our native implmenetation. IPrettyPrintFormat pp = CMS.getPrettyPrintFormat(":"); diff --git a/base/common/src/com/netscape/cms/servlet/key/KeyResource.java b/base/common/src/com/netscape/cms/servlet/key/KeyResource.java index a47c46d86..13960b23e 100644 --- a/base/common/src/com/netscape/cms/servlet/key/KeyResource.java +++ b/base/common/src/com/netscape/cms/servlet/key/KeyResource.java @@ -12,7 +12,7 @@ import com.netscape.cms.servlet.request.model.RecoveryRequestData; @Path("/key") public interface KeyResource { - + /** * Used to retrieve a key * @param data @@ -23,7 +23,7 @@ public interface KeyResource { @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, MediaType.TEXT_XML }) @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public KeyData retrieveKey(RecoveryRequestData data); - + // retrieval - used to test integration with a browser @POST @Path("retrieve") diff --git a/base/common/src/com/netscape/cms/servlet/key/KeyResourceService.java b/base/common/src/com/netscape/cms/servlet/key/KeyResourceService.java index 88f2f8a82..0ec84b8f6 100644 --- a/base/common/src/com/netscape/cms/servlet/key/KeyResourceService.java +++ b/base/common/src/com/netscape/cms/servlet/key/KeyResourceService.java @@ -37,10 +37,10 @@ import com.netscape.certsrv.dbs.keydb.KeyId; /** * @author alee - * + * */ public class KeyResourceService extends CMSResourceService implements KeyResource{ - + /** * Used to retrieve a key * @param data @@ -64,15 +64,15 @@ public class KeyResourceService extends CMSResourceService implements KeyResourc } return keyData; } - + // retrieval - used to test integration with a browser public KeyData retrieveKey(MultivaluedMap form) { RecoveryRequestData data = new RecoveryRequestData(form); return retrieveKey(data); } - + private KeyId validateRequest(RecoveryRequestData data) { - + // confirm request exists RequestId reqId = data.getRequestId(); if (reqId == null) { @@ -100,24 +100,24 @@ public class KeyResourceService extends CMSResourceService implements KeyResourc // request not found throw new WebApplicationException(Response.Status.GONE); } - + //confirm request is of the right type String type = reqInfo.getRequestType(); if (!type.equals(IRequest.SECURITY_DATA_RECOVERY_REQUEST)) { // log error throw new WebApplicationException(Response.Status.BAD_REQUEST); } - - //confirm that agent is originator of request, else throw 401 + + //confirm that agent is originator of request, else throw 401 // TO-DO - + // confirm request is in approved state String status = reqInfo.getRequestStatus(); if (!status.equals(RequestStatus.APPROVED.toString())) { // log error throw new WebApplicationException(Response.Status.UNAUTHORIZED); } - + return reqInfo.getKeyId(); } diff --git a/base/common/src/com/netscape/cms/servlet/key/KeysResource.java b/base/common/src/com/netscape/cms/servlet/key/KeysResource.java index c93ffa4c9..67d29cc52 100644 --- a/base/common/src/com/netscape/cms/servlet/key/KeysResource.java +++ b/base/common/src/com/netscape/cms/servlet/key/KeysResource.java @@ -7,17 +7,17 @@ import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; import com.netscape.cms.servlet.key.model.KeyDataInfos; - + @Path("/keys") public interface KeysResource { public static final int DEFAULT_MAXTIME = 10; public static final int DEFAULT_MAXRESULTS = 100; - + @GET @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, MediaType.TEXT_XML }) public KeyDataInfos listKeys(@QueryParam("clientID") String clientID, @QueryParam("status") String status, @DefaultValue(""+DEFAULT_MAXRESULTS) @QueryParam("maxResults") int maxResults, @DefaultValue(""+DEFAULT_MAXTIME) @QueryParam("maxTime") int maxTime); - + } diff --git a/base/common/src/com/netscape/cms/servlet/key/KeysResourceService.java b/base/common/src/com/netscape/cms/servlet/key/KeysResourceService.java index d525d5a77..080d4871b 100644 --- a/base/common/src/com/netscape/cms/servlet/key/KeysResourceService.java +++ b/base/common/src/com/netscape/cms/servlet/key/KeysResourceService.java @@ -16,13 +16,13 @@ // All rights reserved. // --- END COPYRIGHT BLOCK --- /** - * + * */ package com.netscape.cms.servlet.key; import javax.ws.rs.WebApplicationException; import javax.ws.rs.core.Response; - + import com.netscape.certsrv.apps.CMS; import com.netscape.certsrv.base.EBaseException; import com.netscape.cms.servlet.base.CMSResourceService; @@ -32,20 +32,20 @@ import com.netscape.cmsutil.ldap.LDAPUtil; /** * @author alee - * + * */ public class KeysResourceService extends CMSResourceService implements KeysResource { /** * Used to generate list of key infos based on the search parameters */ - public KeyDataInfos listKeys(String clientID, String status, int maxResults, int maxTime) { + public KeyDataInfos listKeys(String clientID, String status, int maxResults, int maxTime) { // auth and authz - + // get ldap filter String filter = createSearchFilter(status, clientID); CMS.debug("listKeys: filter is " + filter); - + KeyDAO dao = new KeyDAO(); KeyDataInfos infos; try { @@ -56,30 +56,30 @@ public class KeysResourceService extends CMSResourceService implements KeysResou } return infos; } - + private String createSearchFilter(String status, String clientID) { String filter = ""; int matches = 0; - + if ((status == null) && (clientID == null)) { filter = "(serialno=*)"; return filter; } - + if (status != null) { filter += "(status=" + LDAPUtil.escape(status) + ")"; matches ++; } - + if (clientID != null) { filter += "(clientID=" + LDAPUtil.escape(clientID) + ")"; matches ++; } - + if (matches > 1) { filter = "(&" + filter + ")"; } - + return filter; } diff --git a/base/common/src/com/netscape/cms/servlet/key/RecoverBySerial.java b/base/common/src/com/netscape/cms/servlet/key/RecoverBySerial.java index 28ff30803..bedfa911d 100644 --- a/base/common/src/com/netscape/cms/servlet/key/RecoverBySerial.java +++ b/base/common/src/com/netscape/cms/servlet/key/RecoverBySerial.java @@ -50,7 +50,7 @@ import com.netscape.cmsutil.util.Cert; /** * A class representing a recoverBySerial servlet. - * + * * @version $Revision$, $Date$ */ public class RecoverBySerial extends CMSServlet { diff --git a/base/common/src/com/netscape/cms/servlet/key/SrchKey.java b/base/common/src/com/netscape/cms/servlet/key/SrchKey.java index bff14e9f2..b249b663f 100644 --- a/base/common/src/com/netscape/cms/servlet/key/SrchKey.java +++ b/base/common/src/com/netscape/cms/servlet/key/SrchKey.java @@ -47,7 +47,7 @@ import com.netscape.cms.servlet.common.ECMSGWException; /** * Retrieve archived keys matching search criteria - * + * * @version $Revision$, $Date$ */ public class SrchKey extends CMSServlet { @@ -92,7 +92,7 @@ public class SrchKey extends CMSServlet { /** * initialize the servlet. This servlet uses the template file * "srchKey.template" to process the response. - * + * * @param sc servlet configuration, read from the web.xml file */ public void init(ServletConfig sc) throws ServletException { @@ -144,7 +144,7 @@ public class SrchKey extends CMSServlet { *
  • http.param querySentinel ID of first request to show *
  • http.param timeLimit number of seconds to limit ldap search to * - * + * * @param cmsReq the object holding the request and response information */ public void process(CMSRequest cmsReq) throws EBaseException { diff --git a/base/common/src/com/netscape/cms/servlet/key/SrchKeyForRecovery.java b/base/common/src/com/netscape/cms/servlet/key/SrchKeyForRecovery.java index 95c777701..c3e6bba53 100644 --- a/base/common/src/com/netscape/cms/servlet/key/SrchKeyForRecovery.java +++ b/base/common/src/com/netscape/cms/servlet/key/SrchKeyForRecovery.java @@ -47,8 +47,8 @@ import com.netscape.cms.servlet.common.ECMSGWException; /** * Retrieve archived keys matching given public key material - * - * + * + * * @version $Revision$, $Date$ */ public class SrchKeyForRecovery extends CMSServlet { @@ -93,7 +93,7 @@ public class SrchKeyForRecovery extends CMSServlet { /** * initialize the servlet. This servlet uses the template file * "srchKeyForRecovery.template" to process the response. - * + * * @param sc servlet configuration, read from the web.xml file */ public void init(ServletConfig sc) throws ServletException { @@ -143,7 +143,7 @@ public class SrchKeyForRecovery extends CMSServlet { *
  • http.param querySentinel ID of first request to show *
  • http.param timeLimit number of seconds to limit ldap search to * - * + * * @param cmsReq the object holding the request and response information */ @@ -295,7 +295,7 @@ public class SrchKeyForRecovery extends CMSServlet { IKeyRecord rec = e.nextElement(); // rec is null when we specify maxResults // DS will return an err=4, which triggers - // a LDAPException.SIZE_LIMIT_ExCEEDED + // a LDAPException.SIZE_LIMIT_ExCEEDED // in DSSearchResults.java if (rec != null) { IArgBlock rarg = CMS.createArgBlock(); diff --git a/base/common/src/com/netscape/cms/servlet/key/model/KeyDAO.java b/base/common/src/com/netscape/cms/servlet/key/model/KeyDAO.java index f479c6f0d..c34c1752f 100644 --- a/base/common/src/com/netscape/cms/servlet/key/model/KeyDAO.java +++ b/base/common/src/com/netscape/cms/servlet/key/model/KeyDAO.java @@ -48,7 +48,7 @@ public class KeyDAO { private IKeyRepository repo; private IKeyRecoveryAuthority kra; private IRequestQueue queue; - + public KeyDAO() { kra = ( IKeyRecoveryAuthority ) CMS.getSubsystem( "kra" ); repo = kra.getKeyRepository(); @@ -57,7 +57,7 @@ public class KeyDAO { /** * Returns list of keys meeting specified search filter. * Currently, vlv searches are not used for keys. - * + * * @param filter * @param maxResults * @param maxTime @@ -65,29 +65,29 @@ public class KeyDAO { * @return * @throws EBaseException */ - public KeyDataInfos listKeys(String filter, int maxResults, int maxTime, UriInfo uriInfo) + public KeyDataInfos listKeys(String filter, int maxResults, int maxTime, UriInfo uriInfo) throws EBaseException { List list = new ArrayList(); Enumeration e = null; - - e = repo.searchKeys(filter, maxResults, maxTime); + + e = repo.searchKeys(filter, maxResults, maxTime); if (e == null) { throw new EBaseException("search results are null"); } - + while (e.hasMoreElements()) { IKeyRecord rec = e.nextElement(); if (rec != null) { list.add(createKeyDataInfo(rec, uriInfo)); } } - + KeyDataInfos ret = new KeyDataInfos(); ret.setKeyInfos(list); - + return ret; } - + public KeyData getKey(KeyId keyId, RecoveryRequestData data) throws EBaseException { KeyData keyData; @@ -105,7 +105,7 @@ public class KeyDAO { // get wrapped key IKeyRecord rec = repo.readKeyRecord(keyId.toBigInteger()); if (rec == null) { - return null; + return null; } Hashtable requestParams = kra.getVolatileRequest( @@ -182,10 +182,10 @@ public class KeyDAO { kra.destroyVolatileRequest(request.getRequestId()); queue.markAsServiced(request); - + return keyData; } - + public KeyDataInfo createKeyDataInfo(IKeyRecord rec, UriInfo uriInfo) throws EBaseException { KeyDataInfo ret = new KeyDataInfo(); @@ -198,5 +198,5 @@ public class KeyDAO { return ret; } - + } diff --git a/base/common/src/com/netscape/cms/servlet/key/model/KeyData.java b/base/common/src/com/netscape/cms/servlet/key/model/KeyData.java index 4f303e27d..2ff2b5d0c 100644 --- a/base/common/src/com/netscape/cms/servlet/key/model/KeyData.java +++ b/base/common/src/com/netscape/cms/servlet/key/model/KeyData.java @@ -17,7 +17,7 @@ // --- END COPYRIGHT BLOCK --- /** - * + * */ package com.netscape.cms.servlet.key.model; @@ -35,7 +35,7 @@ import javax.xml.bind.annotation.XmlElement; public class KeyData { @XmlElement String wrappedPrivateData; - + @XmlElement String nonceData; @@ -56,7 +56,7 @@ public class KeyData { public void setWrappedPrivateData(String wrappedPrivateData) { this.wrappedPrivateData = wrappedPrivateData; } - + /** * @return the nonceData */ diff --git a/base/common/src/com/netscape/cms/servlet/key/model/KeyDataInfo.java b/base/common/src/com/netscape/cms/servlet/key/model/KeyDataInfo.java index 88b31b4d1..6fd9649fb 100644 --- a/base/common/src/com/netscape/cms/servlet/key/model/KeyDataInfo.java +++ b/base/common/src/com/netscape/cms/servlet/key/model/KeyDataInfo.java @@ -16,11 +16,11 @@ // All rights reserved. // --- END COPYRIGHT BLOCK --- /** - * + * */ package com.netscape.cms.servlet.key.model; - + import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; @@ -35,13 +35,13 @@ import com.netscape.certsrv.dbs.keydb.KeyId; @XmlRootElement(name="SecurityDataInfo") @XmlAccessorType(XmlAccessType.FIELD) public class KeyDataInfo { - + @XmlElement protected String keyURL; @XmlElement protected String clientID; - + public KeyDataInfo() { // required for JAXB (defaults) } diff --git a/base/common/src/com/netscape/cms/servlet/key/model/KeyDataInfos.java b/base/common/src/com/netscape/cms/servlet/key/model/KeyDataInfos.java index b01184708..79e5add95 100644 --- a/base/common/src/com/netscape/cms/servlet/key/model/KeyDataInfos.java +++ b/base/common/src/com/netscape/cms/servlet/key/model/KeyDataInfos.java @@ -28,10 +28,10 @@ import com.netscape.cms.servlet.base.model.Link; @XmlRootElement(name = "SecurityDataInfos") public class KeyDataInfos { - + protected Collection keyInfos; protected List links; - + /** * @return the keyInfos */ @@ -58,7 +58,7 @@ public class KeyDataInfos { public void setLinks(List links) { this.links = links; } - + @XmlTransient public String getNext() { if (links == null) { -- cgit