Coverage Report - org.kuali.rice.core.api.CoreApiServiceLocator
 
Classes in this File Line Coverage Branch Coverage Complexity
CoreApiServiceLocator
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.core.api;
 17  
 
 18  
 import org.kuali.rice.core.api.component.ComponentService;
 19  
 import org.kuali.rice.core.api.datetime.DateTimeService;
 20  
 import org.kuali.rice.core.api.encryption.EncryptionService;
 21  
 import org.kuali.rice.core.api.impex.xml.XmlExporterService;
 22  
 import org.kuali.rice.core.api.impex.xml.XmlIngesterService;
 23  
 import org.kuali.rice.core.api.namespace.NamespaceService;
 24  
 import org.kuali.rice.core.api.parameter.ParameterRepositoryService;
 25  
 import org.kuali.rice.core.api.resourceloader.GlobalResourceLoader;
 26  
 import org.kuali.rice.core.api.style.StyleService;
 27  
 
 28  
 import javax.xml.namespace.QName;
 29  
 
 30  0
 public class CoreApiServiceLocator {
 31  
 
 32  
         public static final String NAMESPACE_SERVICE = "namespaceService";
 33  
         public static final String XML_EXPORTER_SERVICE = "xmlExporterService";
 34  
         public static final String XML_INGESTER_SERVICE = "xmlIngesterService";
 35  
         public static final String STYLE_SERVICE = "styleService";
 36  
 
 37  0
     public static final QName PARAMETER_REPOSITORY_SERVICE = new QName(CoreConstants.Namespaces.CORE_NAMESPACE_2_0, "parameterRepositoryService");
 38  0
     public static final QName COMPONENT_SERVICE = new QName(CoreConstants.Namespaces.CORE_NAMESPACE_2_0, "componentService");
 39  
         
 40  
     static <T> T getService(String serviceName) {
 41  0
         return GlobalResourceLoader.<T>getService(serviceName);
 42  
     }
 43  
 
 44  
     static <T> T getService(QName serviceName) {
 45  0
         return GlobalResourceLoader.<T>getService(serviceName);
 46  
     }
 47  
 
 48  
     public static NamespaceService getNamespaceService() {
 49  0
         return getService(NAMESPACE_SERVICE);
 50  
     }
 51  
     
 52  
     public static XmlExporterService getXmlExporterService() {
 53  0
         return getService(XML_EXPORTER_SERVICE);
 54  
     }
 55  
     
 56  
     public static XmlIngesterService getXmlIngesterService() {
 57  0
         return getService(XML_INGESTER_SERVICE);
 58  
     }
 59  
     
 60  
     public static final EncryptionService getEncryptionService() {
 61  0
         return getService(CoreConstants.Services.ENCRYPTION_SERVICE);
 62  
     }
 63  
     
 64  
     public static StyleService getStyleService() {
 65  0
             return getService(STYLE_SERVICE);
 66  
     }
 67  
 
 68  
         public static DateTimeService getDateTimeService() {
 69  0
             return getService(CoreConstants.Services.DATETIME_SERVICE);
 70  
         }
 71  
 
 72  
     public static ParameterRepositoryService getParameterRepositoryService() {
 73  0
         return getService(PARAMETER_REPOSITORY_SERVICE);
 74  
     }
 75  
 
 76  
     public static ComponentService getComponentService() {
 77  0
         return getService(COMPONENT_SERVICE);
 78  
     }
 79  
     
 80  
 }