public class DefaultRule extends AbstractRule
Default rule that returns false for all event types.
Override the specific isApplicable() methods for events associated with your
trigger rule.
Example:
public boolean isApplicable(CreateResourceEvent event) {
IResource resource = event.getResource();
if (resource.isFolder()) {
//do not apply to folders in this case
return false;
} else {
//do business logic to evaluate if resource applies or not
return evaluate((IGRCObject) resource);
}
}
Custom rules should extend this class rather than directly extending from
AbstractRule.
| Constructor and Description |
|---|
DefaultRule()
Default constructor
|
DefaultRule(java.util.Map<java.lang.String,java.lang.String> ruleAttributes)
Constructor with the Map of all attributes of the rule from
the _trigger_config_.xml configuration file.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isApplicable(AbstractEvent event)
Determines whether or not the current operation satisfies the rule.
|
boolean |
isApplicable(AssociateResourceEvent event)
Default isApplicable() method for AssociateResourceEvent type.
|
boolean |
isApplicable(CopyResourceEvent event)
Default isApplicable() method for CopyResourceEvent type.
|
boolean |
isApplicable(CreateResourceEvent event)
Default isApplicable() method for CreateResourceEvent type.
|
boolean |
isApplicable(CreateResourceWithRelationsEvent event)
Default isApplicable() method for CreateResourceWithRelationsEvent type.
|
boolean |
isApplicable(DeleteResourceEvent event)
Default isApplicable() method for DeleteResourceEvent type.
|
boolean |
isApplicable(DisassociateResourceEvent event)
Default isApplicable() method for DisassociateResourceEvent type.
|
boolean |
isApplicable(MoveResourceEvent event)
Default isApplicable() method for MoveResourceEvent type.
|
boolean |
isApplicable(QueryEvent event)
Default isApplicable() method for QueryEvent type.
|
boolean |
isApplicable(ReassignPrimaryParentEvent event)
Default isApplicable() method for ReassignPrimaryParentEvent type.
|
boolean |
isApplicable(RenameResourceEvent event)
Default isApplicable() method for RenameResourceEvent type.
|
boolean |
isApplicable(SearchEvent event)
Default isApplicable() method for SearchEvent type.
|
boolean |
isApplicable(UpdateResourceEvent event)
Default isApplicable() method for UpdateResourceEvent type.
|
getAttributes, setAttributespublic DefaultRule()
public DefaultRule(java.util.Map<java.lang.String,java.lang.String> ruleAttributes)
ruleAttributes - a Map of attributes that provide configuration to the rulepublic boolean isApplicable(AbstractEvent event)
AbstractRuleisApplicable in class AbstractRuleevent - the current operation to checkpublic boolean isApplicable(CreateResourceEvent event)
event - a create resource event to be handledpublic boolean isApplicable(CreateResourceWithRelationsEvent event)
event - a create resource event to be handledpublic boolean isApplicable(UpdateResourceEvent event)
event - an update resource event to be handledpublic boolean isApplicable(AssociateResourceEvent event)
event - an associate resource event to be handledpublic boolean isApplicable(DisassociateResourceEvent event)
event - a disassociate resource event to be handledpublic boolean isApplicable(ReassignPrimaryParentEvent event)
event - a reassigning primary parent event to be handledpublic boolean isApplicable(CopyResourceEvent event)
event - a copy resource event to be handledpublic boolean isApplicable(MoveResourceEvent event)
event - a move resource event to be handledpublic boolean isApplicable(RenameResourceEvent event)
event - a rename resource event to be handledpublic boolean isApplicable(DeleteResourceEvent event)
event - a delete resource event to be handledpublic boolean isApplicable(QueryEvent event)
event - a query event to be handledpublic boolean isApplicable(SearchEvent event)
event - a search event to be handled
Licensed Materials - Property of IBM
OpenPages with Watson (PID: 5725-D51)
© Copyright IBM Corporation 2013, 2020. All Rights Reserved.
US Government Users Restricted Rights -
Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.