Coverage Report - org.kuali.rice.kns.service.KNSServiceLocator
 
Classes in this File Line Coverage Branch Coverage Complexity
KNSServiceLocator
0%
0/13
N/A
1
 
 1  
 /*
 2  
  * Copyright 2007 The Kuali Foundation
 3  
  *
 4  
  * Licensed under the Educational Community License, Version 1.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/ecl1.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.kns.service;
 17  
 
 18  
 import org.kuali.rice.core.api.resourceloader.GlobalResourceLoader;
 19  
 import org.kuali.rice.kns.lookup.LookupResultsService;
 20  
 import org.kuali.rice.kns.inquiry.Inquirable;
 21  
 import org.kuali.rice.kns.lookup.Lookupable;
 22  
 
 23  
 /**
 24  
  * Service locator for the KRAD Web module
 25  
  *
 26  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 27  
  */
 28  0
 public class KNSServiceLocator {
 29  
 
 30  
     public static final String BUSINESS_OBJECT_AUTHORIZATION_SERVICE = "businessObjectAuthorizationService";
 31  
     public static final String BUSINESS_OBJECT_METADATA_SERVICE = "businessObjectMetaDataService";
 32  
     public static final String DATA_DICTIONARY_SERVICE = "dataDictionaryService";
 33  
     public static final String DICTIONARY_VALIDATION_SERVICE = "dictionaryValidationService";
 34  
     public static final String LOOKUP_RESULTS_SERVICE = "lookupResultsService";
 35  
     public static final String KUALI_INQUIRABLE = "kualiInquirable";
 36  
     public static final String KUALI_LOOKUPABLE = "kualiLookupable";
 37  
     public static final String MAINTENANCE_DOCUMENT_DICTIONARY_SERVICE = "maintenanceDocumentDictionaryService";
 38  
     public static final String TRANSACTIONAL_DOCUMENT_DICTIONARY_SERVICE = "transactionalDocumentDictionaryService";
 39  
     public static final String SESSION_DOCUMENT_SERVICE = "knsSessionDocumentService";
 40  
 
 41  
     public static <T extends Object> T getService(String serviceName) {
 42  0
         return GlobalResourceLoader.<T>getService(serviceName);
 43  
     }
 44  
 
 45  
     public static BusinessObjectAuthorizationService getBusinessObjectAuthorizationService() {
 46  0
         return getService(BUSINESS_OBJECT_AUTHORIZATION_SERVICE);
 47  
     }
 48  
 
 49  
     public static BusinessObjectMetaDataService getBusinessObjectMetaDataService() {
 50  0
         return getService(BUSINESS_OBJECT_METADATA_SERVICE);
 51  
     }
 52  
 
 53  
     public static DictionaryValidationService getDictionaryValidationService() {
 54  0
         return (DictionaryValidationService) getService(DICTIONARY_VALIDATION_SERVICE);
 55  
     }
 56  
 
 57  
     public static LookupResultsService getLookupResultsService() {
 58  0
         return (LookupResultsService) getService(LOOKUP_RESULTS_SERVICE);
 59  
     }
 60  
 
 61  
     public static Inquirable getKualiInquirable() {
 62  0
         return getService(KUALI_INQUIRABLE);
 63  
     }
 64  
 
 65  
     public static Lookupable getKualiLookupable() {
 66  0
         return getService(KUALI_LOOKUPABLE);
 67  
     }
 68  
 
 69  
     public static MaintenanceDocumentDictionaryService getMaintenanceDocumentDictionaryService() {
 70  0
         return getService(MAINTENANCE_DOCUMENT_DICTIONARY_SERVICE);
 71  
     }
 72  
 
 73  
     public static TransactionalDocumentDictionaryService getTransactionalDocumentDictionaryService() {
 74  0
         return (TransactionalDocumentDictionaryService) getService(TRANSACTIONAL_DOCUMENT_DICTIONARY_SERVICE);
 75  
     }
 76  
 
 77  
     public static SessionDocumentService getSessionDocumentService() {
 78  0
         return  getService(SESSION_DOCUMENT_SERVICE);
 79  
     }
 80  
 
 81  
     public static Lookupable getLookupable(String lookupableName) {
 82  0
         return getService(lookupableName);
 83  
     }
 84  
 
 85  
     public static DataDictionaryService getDataDictionaryService() {
 86  0
         return getService(DATA_DICTIONARY_SERVICE);
 87  
     }
 88  
 }