/** * @param theScope must be in the form type^event (ie message type and trigger event separated * by a caret) */ public boolean appliesToScope(String theScope) { if (!theScope.matches(".*\\^.*")) { throw new IllegalArgumentException("arg theScope must be of the form type^event"); } StringTokenizer tok = new StringTokenizer(theScope, delim, false); String itemType = tok.nextToken(); String itemEvent = tok.nextToken(); return applies(myMessageType, itemType) && applies(myTriggerEvent, itemEvent); }
@Override protected Collection<RuleBinding<MessageRule>> getRuleBindings(MessageRule rule, String version) { List<RuleBinding<MessageRule>> bindings = new ArrayList<RuleBinding<MessageRule>>(); for (String triggerEvent : triggerEvents) { bindings.add(new MessageRuleBinding(version, messageType, triggerEvent, rule)); } return activate(bindings); }
@Override protected Collection<RuleBinding<MessageRule>> getRuleBindings(MessageRule rule, String version) { List<RuleBinding<MessageRule>> bindings = new ArrayList<RuleBinding<MessageRule>>(); for (String triggerEvent : triggerEvents) { bindings.add(new MessageRuleBinding(version, messageType, triggerEvent, rule)); } return activate(bindings); }
/** * @param theScope must be in the form type^event (ie message type and trigger event separated * by a caret) */ public boolean appliesToScope(String theScope) { if (!theScope.matches(".*\\^.*")) { throw new IllegalArgumentException("arg theScope must be of the form type^event"); } StringTokenizer tok = new StringTokenizer(theScope, delim, false); String itemType = tok.nextToken(); String itemEvent = tok.nextToken(); return applies(myMessageType, itemType) && applies(myTriggerEvent, itemEvent); }