01: /*
02: * Copyright 2006-2007 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.kuali.core.service;
17:
18: import java.util.List;
19: import java.util.Map;
20:
21: import org.kuali.core.KualiModule;
22: import org.kuali.core.authorization.AuthorizationType;
23: import org.kuali.core.bo.user.KualiModuleUser;
24: import org.kuali.core.bo.user.UniversalUser;
25:
26: public interface KualiModuleService {
27:
28: /**
29: * get the list of all installed modules
30: *
31: * @return
32: */
33: List<KualiModule> getInstalledModules();
34:
35: /**
36: * Returns a map of all KualiModuleUser objects for the given user keyed by the module ID.
37: *
38: * @param user
39: * @return
40: */
41: Map<String, KualiModuleUser> getModuleUsers(UniversalUser user);
42:
43: /**
44: * Returns a list of all KualiModuleUser objects.
45: *
46: * @param user
47: * @return
48: */
49: List<KualiModuleUser> getModuleUserList(UniversalUser user);
50:
51: /**
52: * Returns the module with the given ID or null if the module ID is not found.
53: *
54: * @param moduleId
55: * @return
56: */
57: KualiModule getModule(String moduleId);
58:
59: /**
60: * Returns the module with the given moduleCode or null if the moduleCode is not found.
61: *
62: * @param moduleId
63: * @return
64: */
65: KualiModule getModuleByCode(String moduleCode);
66:
67: boolean isModuleInstalled(String moduleId);
68:
69: /**
70: * Given a class, this method will return the module which is responsible for authorizing access to it. It returns null if no
71: * module is found.
72: *
73: * @param boClass
74: * @return
75: */
76: KualiModule getResponsibleModule(Class boClass);
77:
78: /**
79: * Checks whether the user can perform the requested operation.
80: *
81: * @param user
82: * @param authType
83: * @return
84: */
85: public boolean isAuthorized(UniversalUser user,
86: AuthorizationType authType);
87:
88: public void setInstalledModules(List<KualiModule> modules);
89:
90: public List<String> getDataDictionaryPackages();
91: }
|