01: package org.osbl.riskmanagement;
02:
03: import org.osbl.*;
04: import org.osbl.riskmanagement.model.RiskType;
05: import org.osbl.riskmanagement.model.Risk;
06: import org.osbl.identity.model.Identity;
07: import org.osbl.plugin.PluginManager;
08:
09: public class RiskManagementModule implements Module {
10: PluginManager pluginManager;
11: ReferenceCheckers referenceCheckers;
12: ObjectLocators objectLocators;
13:
14: public void setPluginManager(PluginManager pluginManager) {
15: this .pluginManager = pluginManager;
16: }
17:
18: public void setObjectLocators(ObjectLocators objectLocators) {
19: this .objectLocators = objectLocators;
20: }
21:
22: public void setReferenceCheckers(ReferenceCheckers referenceCheckers) {
23: this .referenceCheckers = referenceCheckers;
24: }
25:
26: public void initialize() {
27: referenceCheckers.registerReferenceChecker(RiskType.class,
28: new RiskToRiskTypeReferenceChecker());
29: referenceCheckers.registerReferenceChecker(Identity.class,
30: new RiskTypeToIdentityReferenceChecker());
31: referenceCheckers.registerReferenceChecker(Identity.class,
32: new RiskToIdentityReferenceChecker());
33:
34: objectLocators.registerObjectLocator(Risk.class,
35: new RiskLocator());
36: objectLocators.registerObjectLocator(RiskType.class,
37: new RiskTypeLocator());
38: }
39: }
|