X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=datarouter-prov%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fdmaap%2Fdatarouter%2Fprovisioning%2Fbeans%2FEventLogRecord.java;h=d801a5560cb45771f365fdae0c6465af679bcb35;hb=bda6aeaa60607ab4fe5af508156019d7bd5c0ce4;hp=4d0b6acc5e4d56577c5da5bea68cace5e1c075d7;hpb=ee6fa61e2cd7df99891092709765235b6166a041;p=dmaap%2Fdatarouter.git diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/EventLogRecord.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/EventLogRecord.java index 4d0b6acc..d801a556 100644 --- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/EventLogRecord.java +++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/EventLogRecord.java @@ -24,10 +24,8 @@ package org.onap.dmaap.datarouter.provisioning.beans; +import jakarta.servlet.http.HttpServletRequest; import java.security.cert.X509Certificate; - -import javax.servlet.http.HttpServletRequest; - import org.onap.dmaap.datarouter.provisioning.BaseServlet; /** @@ -35,7 +33,7 @@ import org.onap.dmaap.datarouter.provisioning.BaseServlet; * (who made the provisioning request including the IP address, the X-DMAAP-DR-ON-BEHALF-OF * header value, and the client certificate), a what (what request was made; the method * and servlet involved), and a how (how the request was handled; the result code and - * message returned to the client). EventLogRecords are logged using log4j at the INFO level. + * message returned to the client). * * @author Robert Eby * @version $Id: EventLogRecord.java,v 1.1 2013/04/26 21:00:25 eby Exp $ @@ -49,12 +47,16 @@ public class EventLogRecord { private int result; // How private String message; + /** + * EventLogRecord constructor. + * @param request HTTP Request + */ public EventLogRecord(HttpServletRequest request) { // Who is making the request this.ipaddr = request.getRemoteAddr(); - String s = request.getHeader(BaseServlet.BEHALF_HEADER); - this.behalfof = (s != null) ? s : ""; - X509Certificate certs[] = (X509Certificate[]) request.getAttribute(BaseServlet.CERT_ATTRIBUTE); + String str = request.getHeader(BaseServlet.BEHALF_HEADER); + this.behalfof = (str != null) ? str : ""; + X509Certificate [] certs = (X509Certificate[]) request.getAttribute(BaseServlet.CERT_ATTRIBUTE); this.clientSubject = (certs != null && certs.length > 0) ? certs[0].getSubjectX500Principal().getName() : "";