Search in sources :

Example 1 with IAuditEntry

use of org.pentaho.platform.api.engine.IAuditEntry in project pentaho-platform by pentaho.

the class AuditEntryTest method testNullAuditEntry.

public void testNullAuditEntry() {
    IAuditEntry auditEntry = new NullAuditEntry();
    // this should not fail, even with all nulls as inputs
    auditEntry.auditAll(null, null, null, null, null, null, null, null, null, 0.0);
}
Also used : IAuditEntry(org.pentaho.platform.api.engine.IAuditEntry) NullAuditEntry(org.pentaho.platform.engine.core.audit.NullAuditEntry)

Example 2 with IAuditEntry

use of org.pentaho.platform.api.engine.IAuditEntry in project pentaho-platform by pentaho.

the class AuditEntry method auditAll.

public static void auditAll(final String jobId, final String instId, final String objId, final String objType, final String actor, final String messageType, final String messageName, final String messageTxtValue, final BigDecimal messageNumValue, final float duration) throws AuditException {
    IAuditEntry auditEntry = null;
    if (PentahoSystem.getObjectFactory().objectDefined(IAuditEntry.class.getSimpleName())) {
        auditEntry = PentahoSystem.get(IAuditEntry.class, null);
        auditEntry.auditAll(jobId, instId, objId, objType, actor, messageType, messageName, messageTxtValue, messageNumValue, duration);
    }
    Long count = messageTypeCountMap.get(messageType);
    if (count == null) {
        messageTypeCountMap.put(messageType, new Long(1));
    } else {
        messageTypeCountMap.put(messageType, new Long(count.longValue() + 1));
    }
}
Also used : IAuditEntry(org.pentaho.platform.api.engine.IAuditEntry)

Aggregations

IAuditEntry (org.pentaho.platform.api.engine.IAuditEntry)2 NullAuditEntry (org.pentaho.platform.engine.core.audit.NullAuditEntry)1