Coverage Report - org.kuali.rice.kew.framework.KewFrameworkServiceLocator
 
Classes in this File Line Coverage Branch Coverage Complexity
KewFrameworkServiceLocator
0%
0/5
N/A
1
 
 1  
 /*
 2  
  * Copyright 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/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.kew.framework;
 17  
 
 18  
 import org.kuali.rice.core.api.resourceloader.GlobalResourceLoader;
 19  
 import org.kuali.rice.kew.api.KewApiConstants;
 20  
 import org.kuali.rice.kew.framework.docsearch.DocumentSearchCustomizationService;
 21  
 import org.kuali.rice.ksb.api.KsbApiServiceLocator;
 22  
 
 23  
 import javax.xml.namespace.QName;
 24  
 
 25  
 /**
 26  
  * A static service locator which aids in locating the various KEW framework services.
 27  
  */
 28  0
 public class KewFrameworkServiceLocator {
 29  
 
 30  
     public static final String DOCUMENT_SEARCH_CUSTOMIZATION_SERVICE = "documentSearchCustomizationServiceSoap";
 31  
 
 32  
     static <T> T getService(String serviceName) {
 33  0
         return GlobalResourceLoader.<T>getService(serviceName);
 34  
     }
 35  
 
 36  
     static <T> T getServiceOnBus(String serviceName, String applicationId) {
 37  0
         return (T)KsbApiServiceLocator.getServiceBus().getService(new QName(KewApiConstants.Namespaces.KEW_NAMESPACE_2_0, serviceName), applicationId);
 38  
     }
 39  
 
 40  
     public static DocumentSearchCustomizationService getDocumentSearchCustomizationService() {
 41  0
         return getDocumentSearchCustomizationService(null);
 42  
     }
 43  
 
 44  
     public static DocumentSearchCustomizationService getDocumentSearchCustomizationService(String applicationId) {
 45  0
         return getServiceOnBus(DOCUMENT_SEARCH_CUSTOMIZATION_SERVICE, applicationId);
 46  
     }
 47  
     
 48  
 }