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 public interface KualiModuleService { 21 22 /** 23 * get the list of all installed module services 24 * 25 * @return 26 */ 27 List<ModuleService> getInstalledModuleServices(); 28 29 /** 30 * Returns the module service with the given ID or null if the module ID is not found. 31 * 32 * @param moduleId 33 * @return 34 */ 35 ModuleService getModuleService(String moduleId); 36 37 /** 38 * Returns the module service with the given moduleCode or null if the moduleCode is not found. 39 * 40 * @param namespaceCode 41 * @return 42 */ 43 ModuleService getModuleServiceByNamespaceCode(String namespaceCode); 44 45 boolean isModuleServiceInstalled(String namespaceCode); 46 47 /** 48 * Given a class, this method will return the module service which is responsible for authorizing access to it. It returns null if no 49 * module is found. 50 * 51 * @param boClass 52 * @return ModuleService representing the service responsible for the passed in Class 53 * @throws ModuleServiceNotFoundException if boClass is an ExternalizableBusinessObject that no ModuleService is responsible for. 54 */ 55 ModuleService getResponsibleModuleService(Class boClass); 56 57 /** 58 * Given a job name, this method will return the module service which is responsible for handling it. It returns null if no 59 * module is found. 60 * 61 * @param jobName 62 * @return 63 */ 64 ModuleService getResponsibleModuleServiceForJob(String jobName); 65 66 public void setInstalledModuleServices(List<ModuleService> moduleServices); 67 68 public List<String> getDataDictionaryPackages(); 69 70 /** 71 * 72 * This method gets namespace name for the given namespace code 73 * 74 * @param namespaceCode 75 * @return 76 */ 77 public String getNamespaceName(String namespaceCode); 78 79 String getNamespaceCode(Class<?> documentOrStepClass); 80 String getComponentCode(Class<?> documentOrStepClass); 81 82 } 83