001/** 002 * Copyright 2005-2018 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.kuali.rice.krad.service; 017 018import java.util.List; 019 020import org.kuali.rice.krad.exception.ModuleServiceNotFoundException; 021 022public interface KualiModuleService { 023 024 /** 025 * get the list of all installed module services 026 * 027 * @return list of installed module services 028 */ 029 List<ModuleService> getInstalledModuleServices(); 030 031 /** 032 * Returns the module service with the given ID or null if the module ID is not found. 033 * 034 * @param moduleId 035 * @return module service 036 */ 037 ModuleService getModuleService(String moduleId); 038 039 /** 040 * Returns the module service with the given moduleCode or null if the moduleCode is not found. 041 * 042 * @param namespaceCode 043 * @return module service 044 */ 045 ModuleService getModuleServiceByNamespaceCode(String namespaceCode); 046 047 boolean isModuleServiceInstalled(String namespaceCode); 048 049 /** 050 * Given a class, this method will return the module service which is responsible for authorizing access to it. It returns null if no 051 * module is found. 052 * 053 * @param boClass 054 * @return ModuleService representing the service responsible for the passed in Class 055 * @throws ModuleServiceNotFoundException if boClass is an ExternalizableBusinessObject that no ModuleService is responsible for. 056 */ 057 ModuleService getResponsibleModuleService(Class boClass); 058 059 public void setInstalledModuleServices(List<ModuleService> moduleServices); 060 061 public List<String> getDataDictionaryPackages(); 062 063 /** 064 * 065 * This method gets namespace name for the given namespace code 066 * 067 * @param namespaceCode namespace code 068 * @return namespace name 069 */ 070 public String getNamespaceName(String namespaceCode); 071 072 String getNamespaceCode(Class<?> documentOrStepClass); 073 String getComponentCode(Class<?> documentOrStepClass); 074 075} 076