01: package org.osbl.orga;
02:
03: import org.osbl.*;
04: import org.osbl.orga.model.*;
05: import org.osbl.identity.model.*;
06: import org.osbl.plugin.PluginManager;
07:
08: public class OrgaModule implements Module {
09: PluginManager pluginManager;
10: ReferenceCheckers referenceCheckers;
11: ObjectLocators objectLocators;
12:
13: public void setPluginManager(PluginManager pluginManager) {
14: this .pluginManager = pluginManager;
15: }
16:
17: public void setObjectLocators(ObjectLocators objectLocators) {
18: this .objectLocators = objectLocators;
19: }
20:
21: public void setReferenceCheckers(ReferenceCheckers referenceCheckers) {
22: this .referenceCheckers = referenceCheckers;
23: }
24:
25: public void initialize() {
26: referenceCheckers.registerReferenceChecker(Identity.class,
27: new MemberToIdentityReferenceChecker());
28: referenceCheckers.registerReferenceChecker(Identity.class,
29: new GroupToIdentityReferenceChecker());
30:
31: objectLocators.registerObjectLocator(Group.class,
32: new GroupLocator());
33: objectLocators.registerObjectLocator(Organisation.class,
34: new OrganisationLocator());
35: objectLocators.registerObjectLocator(Membership.class,
36: new MembershipLocator());
37: }
38: }
|