View Javadoc

1   package org.kuali.ole.factory;
2   
3   import org.kuali.ole.OLEConstants;
4   import org.kuali.ole.service.OverlayOutputService;
5   import org.kuali.rice.core.api.resourceloader.GlobalResourceLoader;
6   
7   /**
8    * Created by IntelliJ IDEA.
9    * User: premkb
10   * Date: 2/24/13
11   * Time: 6:17 PM
12   * To change this template use File | Settings | File Templates.
13   */
14  public class OverlayOutputServiceFactory {
15  
16      private OverlayOutputService overlayDocstoreOutputService;
17      private OverlayOutputService overlayTransactionOutputService;
18  
19      public OverlayOutputService getOverlayTransactionOutputService() {
20          return overlayTransactionOutputService;
21      }
22  
23      public void setOverlayTransactionOutputService(OverlayOutputService overlayTransactionOutputService) {
24          this.overlayTransactionOutputService = overlayTransactionOutputService;
25      }
26  
27      public OverlayOutputService getOverlayDocstoreOutputService() {
28          return overlayDocstoreOutputService;
29      }
30  
31      public void setOverlayDocstoreOutputService(OverlayOutputService overlayDocstoreOutputService) {
32          this.overlayDocstoreOutputService = overlayDocstoreOutputService;
33      }
34  
35      public OverlayOutputService getOverlayOutputServiceFactory(String outputTargetObject){
36          if(outputTargetObject!=null && outputTargetObject.equalsIgnoreCase(OLEConstants.OVERLAY_DOCSTORE_OUTPUT_TARGET_OBJECT)){
37              overlayDocstoreOutputService = GlobalResourceLoader.getService(OLEConstants.OVERLAY_DOCSTORE_OUTPUT_SERVICE);
38              return overlayDocstoreOutputService;
39          } else if (outputTargetObject!=null && outputTargetObject.equalsIgnoreCase(OLEConstants.OVERLAY_ORDERRECORD)){
40              return overlayTransactionOutputService;
41          }
42          return null;
43      }
44  }