View Javadoc
1   /**
2    * Copyright 2005-2014 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
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.rice.krad.service;
17  
18  import java.util.List;
19  
20  import org.kuali.rice.krad.exception.ModuleServiceNotFoundException;
21  
22  public interface KualiModuleService {
23  
24      /**
25       * get the list of all installed module services
26       *
27       * @return list of installed module services
28       */
29      List<ModuleService> getInstalledModuleServices();
30  
31      /**
32       * Returns the module service with the given ID or null if the module ID is not found.
33       *
34       * @param moduleId
35       * @return module service
36       */
37      ModuleService getModuleService(String moduleId);
38  
39      /**
40       * Returns the module service with the given moduleCode or null if the moduleCode is not found.
41       *
42       * @param namespaceCode
43       * @return module service
44       */
45      ModuleService getModuleServiceByNamespaceCode(String namespaceCode);
46  
47      boolean isModuleServiceInstalled(String namespaceCode);
48  
49      /**
50       * Given a class, this method will return the module service which is responsible for authorizing access to it. It returns null if no
51       * module is found.
52       *
53       * @param boClass
54       * @return ModuleService representing the service responsible for the passed in Class
55       * @throws ModuleServiceNotFoundException if boClass is an ExternalizableBusinessObject that no ModuleService is responsible for.
56       */
57      ModuleService getResponsibleModuleService(Class boClass);
58  
59      public void setInstalledModuleServices(List<ModuleService> moduleServices);
60  
61      public List<String> getDataDictionaryPackages();
62  
63      /**
64       *
65       * This method gets namespace name for the given namespace code
66       *
67       * @param namespaceCode namespace code
68       * @return namespace name
69       */
70      public String getNamespaceName(String namespaceCode);
71  
72      String getNamespaceCode(Class<?> documentOrStepClass);
73      String getComponentCode(Class<?> documentOrStepClass);
74  
75  }
76