Search in sources :

Example 6 with AuditLogBean

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);
            }
        }
    }
}
Also used : AuditLogBean(org.akaza.openclinica.bean.odmbeans.AuditLogBean)

Aggregations

AuditLogBean (org.akaza.openclinica.bean.odmbeans.AuditLogBean)6 ArrayList (java.util.ArrayList)4 Date (java.util.Date)4 HashMap (java.util.HashMap)4 Iterator (java.util.Iterator)4 LinkedHashMap (java.util.LinkedHashMap)4 AuditLogsBean (org.akaza.openclinica.bean.odmbeans.AuditLogsBean)4 SimpleDateFormat (java.text.SimpleDateFormat)1 ExportFormDataBean (org.akaza.openclinica.bean.submit.crfdata.ExportFormDataBean)1 ExportStudyEventDataBean (org.akaza.openclinica.bean.submit.crfdata.ExportStudyEventDataBean)1 ExportSubjectDataBean (org.akaza.openclinica.bean.submit.crfdata.ExportSubjectDataBean)1 ImportItemDataBean (org.akaza.openclinica.bean.submit.crfdata.ImportItemDataBean)1 AuditLogEvent (org.akaza.openclinica.domain.datamap.AuditLogEvent)1