Coverage Report - org.kuali.rice.kew.api.KewApiServiceLocator
 
Classes in this File Line Coverage Branch Coverage Complexity
KewApiServiceLocator
0%
0/6
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.api;
 17  
 
 18  
 import org.kuali.rice.core.api.resourceloader.GlobalResourceLoader;
 19  
 import org.kuali.rice.kew.api.action.WorkflowDocumentActionsService;
 20  
 import org.kuali.rice.kew.api.doctype.DocumentTypeService;
 21  
 import org.kuali.rice.kew.api.document.WorkflowDocumentService;
 22  
 import org.kuali.rice.kew.api.note.NoteService;
 23  
 
 24  
 /**
 25  
  * A static service locator which aids in locating the various services that
 26  
  * form the Kuali Service Bus API.
 27  
  */
 28  0
 public class KewApiServiceLocator {
 29  
 
 30  
         public static final String WORKFLOW_DOCUMENT_ACTIONS_SERVICE = "rice.kew.workflowDocumentActionsService";
 31  
         public static final String WORKFLOW_DOCUMENT_SERVICE = "rice.kew.workflowDocumentService";
 32  
         public static final String DOCUMENT_TYPE_SERVICE = "rice.kew.documentTypeService";
 33  
         public static final String NOTE_SERVICE = "rice.kew.noteService";
 34  
 
 35  
     static <T> T getService(String serviceName) {
 36  0
         return GlobalResourceLoader.<T>getService(serviceName);
 37  
     }
 38  
 
 39  
     public static WorkflowDocumentActionsService getWorkflowDocumentActionsService() {
 40  0
         return getService(WORKFLOW_DOCUMENT_ACTIONS_SERVICE);
 41  
     }
 42  
     
 43  
     public static WorkflowDocumentService getWorkflowDocumentService() {
 44  0
         return getService(WORKFLOW_DOCUMENT_SERVICE);
 45  
     }
 46  
     
 47  
     public static DocumentTypeService getDocumentTypeService() {
 48  0
         return getService(DOCUMENT_TYPE_SERVICE);
 49  
     }
 50  
     
 51  
     public static NoteService getNoteService() {
 52  0
             return getService(NOTE_SERVICE);
 53  
     }
 54  
     
 55  
 }