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 2005-2011 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.kns.service;
 17  
 
 18  
 import org.kuali.rice.core.api.resourceloader.GlobalResourceLoader;
 19  
 import org.kuali.rice.kns.inquiry.Inquirable;
 20  
 import org.kuali.rice.kns.lookup.LookupResultsService;
 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  
  * @deprecated As of release 2.0
 28  
  */
 29  
 @Deprecated
 30  0
 public class KNSServiceLocator {
 31  
 
 32  
     public static final String BUSINESS_OBJECT_AUTHORIZATION_SERVICE = "businessObjectAuthorizationService";
 33  
     public static final String BUSINESS_OBJECT_METADATA_SERVICE = "businessObjectMetaDataService";
 34  
     public static final String DATA_DICTIONARY_SERVICE = "dataDictionaryService";
 35  
     public static final String DICTIONARY_VALIDATION_SERVICE = "dictionaryValidationService";
 36  
     public static final String LOOKUP_RESULTS_SERVICE = "lookupResultsService";
 37  
     public static final String KUALI_INQUIRABLE = "kualiInquirable";
 38  
     public static final String KUALI_LOOKUPABLE = "kualiLookupable";
 39  
     public static final String MAINTENANCE_DOCUMENT_DICTIONARY_SERVICE = "maintenanceDocumentDictionaryService";
 40  
     public static final String TRANSACTIONAL_DOCUMENT_DICTIONARY_SERVICE = "transactionalDocumentDictionaryService";
 41  
     public static final String SESSION_DOCUMENT_SERVICE = "knsSessionDocumentService";
 42  
 
 43  
     public static <T extends Object> T getService(String serviceName) {
 44  0
         return GlobalResourceLoader.<T>getService(serviceName);
 45  
     }
 46  
 
 47  
     public static BusinessObjectAuthorizationService getBusinessObjectAuthorizationService() {
 48  0
         return getService(BUSINESS_OBJECT_AUTHORIZATION_SERVICE);
 49  
     }
 50  
 
 51  
     public static BusinessObjectMetaDataService getBusinessObjectMetaDataService() {
 52  0
         return getService(BUSINESS_OBJECT_METADATA_SERVICE);
 53  
     }
 54  
 
 55  
     public static DictionaryValidationService getDictionaryValidationService() {
 56  0
         return (DictionaryValidationService) getService(DICTIONARY_VALIDATION_SERVICE);
 57  
     }
 58  
 
 59  
     public static LookupResultsService getLookupResultsService() {
 60  0
         return (LookupResultsService) getService(LOOKUP_RESULTS_SERVICE);
 61  
     }
 62  
 
 63  
     public static Inquirable getKualiInquirable() {
 64  0
         return getService(KUALI_INQUIRABLE);
 65  
     }
 66  
 
 67  
     public static Lookupable getKualiLookupable() {
 68  0
         return getService(KUALI_LOOKUPABLE);
 69  
     }
 70  
 
 71  
     public static MaintenanceDocumentDictionaryService getMaintenanceDocumentDictionaryService() {
 72  0
         return getService(MAINTENANCE_DOCUMENT_DICTIONARY_SERVICE);
 73  
     }
 74  
 
 75  
     public static TransactionalDocumentDictionaryService getTransactionalDocumentDictionaryService() {
 76  0
         return (TransactionalDocumentDictionaryService) getService(TRANSACTIONAL_DOCUMENT_DICTIONARY_SERVICE);
 77  
     }
 78  
 
 79  
     public static SessionDocumentService getSessionDocumentService() {
 80  0
         return  getService(SESSION_DOCUMENT_SERVICE);
 81  
     }
 82  
 
 83  
     public static Lookupable getLookupable(String lookupableName) {
 84  0
         return getService(lookupableName);
 85  
     }
 86  
 
 87  
     public static DataDictionaryService getDataDictionaryService() {
 88  0
         return getService(DATA_DICTIONARY_SERVICE);
 89  
     }
 90  
 }