View Javadoc

1   /*
2    * Copyright 2007-2009 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.ken.service.NotificationService;
19  import org.kuali.rice.kew.actiontaken.service.ActionTakenService;
20  import org.kuali.rice.ksb.messaging.MessageHelper;
21  
22  /**
23   * This object extends the RiceServiceInjectedObject to test that the service injection
24   * via annotation works in derived classes.
25   * 
26   * @author Kuali Rice Team (rice.collab@kuali.org)
27   *
28   */
29  public class RiceServiceInjectedDescendent extends RiceServiceInjectedObject {
30      @RiceService(name="enActionTakenService")
31      public ActionTakenService ats;
32      
33      public MessageHelper messageHelper;
34      
35      public NotificationService ns;
36  
37      // try a service in a different module
38      
39      // for some reason I'm having trouble getting beans from the KSB resource loader
40      // when specifying the loader by name; we'll give it a shot with KEN instead
41      @RiceService(/*resourceLoader="KSB_ROOT_RESOURCE_LOADER", */name="enMessageHelper")
42      public void setMessageHelper(MessageHelper mh) {
43          this.messageHelper = mh;
44      }
45      
46      public MessageHelper getMessageHelper() {
47          return messageHelper;
48      }
49      
50      /*@RiceService(resourceLoader="KEN_SPRING_RESOURCE_LOADER", name="notificationService")*/
51      // looks like they have possibly been all consolidated down?
52      @RiceService(resourceLoader="RICE_SPRING_RESOURCE_LOADER_NAME", name="notificationService")
53      public void setNotificationService(NotificationService ns) {
54          this.ns = ns;
55      }
56      
57      public NotificationService getNotificationService() {
58          return ns;
59      }
60      
61      
62      
63      public void setActionTakenService(ActionTakenService ats) {
64          this.ats = ats;
65      }
66      
67      public ActionTakenService getActionTakenService() {
68          return ats;
69      }
70  }