01: /*
02: * Copyright 2005-2006 The Kuali Foundation.
03: *
04: *
05: * Licensed under the Educational Community License, Version 1.0 (the "License");
06: * you may not use this file except in compliance with the License.
07: * You may obtain a copy of the License at
08: *
09: * http://www.opensource.org/licenses/ecl1.php
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package edu.iu.uis.eden.routetemplate;
18:
19: import edu.iu.uis.eden.KEWServiceLocator;
20: import edu.iu.uis.eden.util.PerformanceLogger;
21:
22: /**
23: * Implementation of the {@link RuleCacheProcessor} which notifies the rule cache of
24: * a change to the specified rule.
25: *
26: * @author ewestfal
27: */
28: public class RuleCacheProcessorImpl implements RuleCacheProcessor {
29:
30: public void clearRuleFromCache(Long ruleId) {
31: PerformanceLogger logger = new PerformanceLogger();
32: RuleBaseValues rule = KEWServiceLocator.getRuleService()
33: .findRuleBaseValuesById(ruleId);
34: if (rule != null) {
35: KEWServiceLocator.getRuleService().notifyCacheOfRuleChange(
36: rule, null);
37: }
38: logger.log("Time to notify cache of rule change for rule "
39: + (rule == null ? "null" : ""
40: + rule.getRuleBaseValuesId()));
41: }
42:
43: }
|