001 /**
002 * Copyright 2005-2013 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 */
016 package org.kuali.rice.krad.service;
017
018 import java.util.List;
019
020 public interface KualiModuleService {
021
022 /**
023 * get the list of all installed module services
024 *
025 * @return
026 */
027 List<ModuleService> getInstalledModuleServices();
028
029 /**
030 * Returns the module service with the given ID or null if the module ID is not found.
031 *
032 * @param moduleId
033 * @return
034 */
035 ModuleService getModuleService(String moduleId);
036
037 /**
038 * Returns the module service with the given moduleCode or null if the moduleCode is not found.
039 *
040 * @param namespaceCode
041 * @return
042 */
043 ModuleService getModuleServiceByNamespaceCode(String namespaceCode);
044
045 boolean isModuleServiceInstalled(String namespaceCode);
046
047 /**
048 * Given a class, this method will return the module service which is responsible for authorizing access to it. It returns null if no
049 * module is found.
050 *
051 * @param boClass
052 * @return ModuleService representing the service responsible for the passed in Class
053 * @throws ModuleServiceNotFoundException if boClass is an ExternalizableBusinessObject that no ModuleService is responsible for.
054 */
055 ModuleService getResponsibleModuleService(Class boClass);
056
057 /**
058 * Given a job name, this method will return the module service which is responsible for handling it. It returns null if no
059 * module is found.
060 *
061 * @param jobName
062 * @return
063 */
064 ModuleService getResponsibleModuleServiceForJob(String jobName);
065
066 public void setInstalledModuleServices(List<ModuleService> moduleServices);
067
068 public List<String> getDataDictionaryPackages();
069
070 /**
071 *
072 * This method gets namespace name for the given namespace code
073 *
074 * @param namespaceCode
075 * @return
076 */
077 public String getNamespaceName(String namespaceCode);
078
079 String getNamespaceCode(Class<?> documentOrStepClass);
080 String getComponentCode(Class<?> documentOrStepClass);
081
082 }
083