Java Reference
In-Depth Information
Listing 6-20.
public class AuditRule {
private String ruleDefinition;
private boolean applyRule = true;
public boolean isApplyRule() {
return applyRule;
public void setApplyRule(boolean applyRule) {
this.applyRule = applyRule;
public String getRuleDefinition() {
return ruleDefinition;
public void setRuleDefinition(String ruleDefinition) {
this.ruleDefinition = ruleDefinition;
The AuditEvent class is a simple bean that stores the data that has to be logged as part
of audit trail. It is shown in Listing 6-21. The ToStringBuilder class is part of the Jakarta
Commons-lang project and can be used to simplify the toString method.
Listing 6-21.
public class AuditEvent {
private String eventCode;
private String fullMethodName;
private Object arguments[];
private Object result;
public String toString(){
return ToStringBuilder.reflectionToString(this);
Search WWH ::

Custom Search