View Javadoc

1   /*
2    * Copyright 2007-2008 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.util;
17  
18  import org.kuali.rice.kns.dao.DocumentDao;
19  import org.kuali.rice.kns.service.BusinessObjectService;
20  import org.kuali.rice.kns.service.impl.DocumentServiceImpl;
21  import org.kuali.rice.kns.workflow.service.WorkflowDocumentService;
22  import org.springframework.beans.factory.InitializingBean;
23  
24  /**
25   * Extends DocumentServiceImpl to exercise providing an overridden bean in the client
26   * without having to redefine and inject every Rice bean dependency.
27   * {@link RiceService} annotation and {@link GRLServiceInjectionPostProcessor} should
28   * inject everything we need. 
29   * 
30   * @author Kuali Rice Team (rice.collab@kuali.org)
31   */
32  public class ClientDocumentServiceImpl extends DocumentServiceImpl implements InitializingBean {
33      public static ClientDocumentServiceImpl me;
34  
35      public void afterPropertiesSet() throws Exception {
36          me = this;
37      }
38  
39      // some member fields are private at the moment; do the best we can
40  
41      public WorkflowDocumentService getWorkflowDocumentService() {
42          return super.getWorkflowDocumentService();
43      }
44      public BusinessObjectService getBusinessObjectService() {
45          return super.getBusinessObjectService();
46      }
47      public DocumentDao getDocumentDao() {
48          return super.getDocumentDao();
49      }
50  }