org.jwall.web.audit.rules
Class AuditEventRule
java.lang.Object
org.jwall.web.audit.rules.AuditEventRule
- All Implemented Interfaces:
- EventRule<AuditEvent>
public class AuditEventRule
- extends Object
- implements EventRule<AuditEvent>
This class implements a simple rule, which can be applied to an audit-event and may
trigger a set of actions. Thus, basically an event-rule is an event-filter plus some
event-actions.
- Author:
- Christian Bockermann <chris@jwall.org>
MATCH_ANY_FILTER
public static final String MATCH_ANY_FILTER
- See Also:
- Constant Field Values
MATCH_ALL_FILTERS
public static final String MATCH_ALL_FILTERS
- See Also:
- Constant Field Values
CLASSES
public static final Class<?>[] CLASSES
AuditEventRule
public AuditEventRule()
matches
public boolean matches(AuditEvent evt,
RuleContext ctx)
- This method checks whether the rule triggers for the given event.
- Specified by:
matches in interface EventRule<AuditEvent>
- Parameters:
evt - The event to test the rule on.
- Returns:
true if the rule matches the given event, false otherwise.
isEnabled
public boolean isEnabled()
- Returns:
- the enabled
setEnabled
public void setEnabled(boolean enabled)
- Parameters:
enabled - the enabled to set
getComment
public String getComment()
- Returns:
- the comment
setComment
public void setComment(String comment)
- Parameters:
comment - the comment to set
getMatch
public String getMatch()
- Returns:
- the match
setMatch
public void setMatch(String match)
- Parameters:
match - the match to set
isMatchAll
public boolean isMatchAll()
setMatchAll
public void setMatchAll(boolean b)
getConditions
public List<Condition> getConditions()
- Returns:
- the filters
setConditions
public void setConditions(List<Condition> filters)
- Parameters:
filters - the filters to set
add
public boolean add(Condition filter)
remove
public boolean remove(Condition filter)
removeCondition
public boolean removeCondition(int i)
add
public boolean add(EventAction action)
remove
public boolean remove(EventAction action)
removeAction
public boolean removeAction(int i)
getActions
public List<EventAction> getActions()
- Returns:
- the actions
setActions
public void setActions(Set<EventAction> actions)
- Parameters:
actions - the actions to set
equals
public boolean equals(Object o)
- Overrides:
equals in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
readResolve
public Object readResolve()
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2012 jwall.org. All Rights Reserved.