logentrydata[ADMINTYPE] = Integer.toString(logentry.getAdminType());
if (logentry.getAdminType() == Admin.TYPE_CLIENTCERT_USER) {
String dnstring = dnproxy.getSubjectDN(logentry.getAdminData());
if ((dnstring !=null) && (!StringUtils.contains(logentry.getAdminData(), "SubjectDN")) ) {
DNFieldExtractor dn = new DNFieldExtractor(dnstring, DNFieldExtractor.TYPE_SUBJECTDN);
logentrydata[ADMINDATA] = dn.getField(DNFieldExtractor.CN,0) + ", " + dn.getField(DNFieldExtractor.O,0);
logentrydata[ADMINCERTSERNO] = logentry.getAdminData();
} else {
logentrydata[ADMINDATA] = logentry.getAdminData();
}
} else {
if (logentry.getAdminType() == Admin.TYPE_PUBLIC_WEB_USER) {
if (logentry.getAdminData() != null) {
logentrydata[ADMINDATA] = "IP : " + logentry.getAdminData();
}
} else {
if (logentry.getAdminData() != null) {
logentrydata[ADMINDATA] = logentry.getAdminData();
}
}
if(logentrydata[ADMINDATA] == null) {
logentrydata[ADMINDATA] = "";
}
}
logentrydata[CA] = caidtonamemap.get(Integer.valueOf(logentry.getCAId()));
logentrydata[MODULE] = localmodulenames[logentry.getModule()];
logentrydata[USERNAME] = logentry.getUsername();
if (logentrydata[USERNAME] != null && logentrydata[USERNAME].trim().equals("")) {
logentrydata[USERNAME] = null;
}
if ( (logentry.getCertificateSNR() != null) && (logentry.getCertificateSNR().trim().equals("")) ) {
logentrydata[CERTIFICATESERNO] = null;
} else {
logentrydata[CERTIFICATESERNO] = logentry.getCertificateSNR();
}
if (logentrydata[CERTIFICATESERNO] != null) {
String dnstring = dnproxy.getSubjectDN(logentry.getCertificateSNR());
if(dnstring != null){
DNFieldExtractor dn = new DNFieldExtractor(dnstring, DNFieldExtractor.TYPE_SUBJECTDN);
logentrydata[CERTIFICATE] = dn.getField(DNFieldExtractor.CN,0) + ", " + dn.getField(DNFieldExtractor.O,0);
}
}
if (logentry.getEvent() < LogConstants.EVENT_ERROR_BOUNDRARY) {
logentrydata[EVENT] = localinfoeventnames[logentry.getEvent()];