use of org.akaza.openclinica.bean.odmbeans.AuditLogBean in project OpenClinica by OpenClinica.
the class ClinicalDataReportBean method addAuditLogs.
protected void addAuditLogs(AuditLogsBean auditLogs, String currentIndent, String entity) {
int count = 0;
if (auditLogs != null) {
ArrayList<AuditLogBean> audits = auditLogs.getAuditLogs();
if (audits != null && audits.size() > 0) {
for (AuditLogBean audit : audits) {
if (entity == "item" && audit.getOldValue().equals("") && audit.getNewValue().equals("")) {
count++;
}
}
if (count != audits.size()) {
StringBuffer xml = this.getXmlOutput();
String indent = this.getIndent();
String nls = System.getProperty("line.separator");
xml.append(currentIndent + "<OpenClinica:AuditLogs EntityID=\"" + auditLogs.getEntityID() + "\">");
xml.append(nls);
for (AuditLogBean audit : audits) {
if (!(entity == "item" && audit.getOldValue().equals("") && audit.getNewValue().equals(""))) {
this.addOneAuditLog(audit, currentIndent + indent);
}
}
xml.append(currentIndent + "</OpenClinica:AuditLogs>");
xml.append(nls);
}
}
}
}
Aggregations