View Javadoc

1   /**
2    * Copyright 2005-2013 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.ksb.testclient1;
17  
18  import org.kuali.rice.ksb.messaging.remotedservices.Inbox;
19  import org.kuali.rice.ksb.messaging.remotedservices.InboxResource;
20  import org.kuali.rice.ksb.messaging.remotedservices.MessageResource;
21  
22  /**
23   * service implementation for {@link InboxResource}
24   *
25   * @author Kuali Rice Team (rice.collab@kuali.org)
26   *
27   */
28  public class InboxResourceImpl implements InboxResource {
29  
30  	private Storage storage;
31  	private MessageResource messageResource;
32  
33  	/**
34  	 * @see org.kuali.rice.ksb.messaging.remotedservices.InboxResource#createInbox(org.kuali.rice.ksb.messaging.remotedservices.Inbox)
35  	 */
36  	public Inbox createInbox(Inbox inbox) {
37  		return storage.storeInbox(inbox);
38  	}
39  
40  	/**
41  	 * @see org.kuali.rice.ksb.messaging.remotedservices.InboxResource#deleteInbox(java.lang.String)
42  	 */
43  	public void deleteInbox(String id) {
44  		storage.deleteInbox(id);
45  	}
46  
47  	/**
48  	 * @see org.kuali.rice.ksb.messaging.remotedservices.InboxResource#retrieveInbox(java.lang.String)
49  	 */
50  	public Inbox retrieveInbox(String id) {
51  		return storage.retrieveInbox(id);
52  	}
53  
54  	/**
55  	 * @see org.kuali.rice.ksb.messaging.remotedservices.InboxResource#updateInbox(org.kuali.rice.ksb.messaging.remotedservices.Inbox)
56  	 */
57  	public void updateInbox(Inbox inbox) {
58  		storage.storeInbox(inbox);
59  	}
60  
61  	/**
62  	 * @return the storage
63  	 */
64  	public Storage getStorage() {
65  		return this.storage;
66  	}
67  
68  	/**
69  	 * @param storage the storage to set
70  	 */
71  	public void setStorage(Storage storage) {
72  		this.storage = storage;
73  	}
74  
75  	/**
76  	 * @return the messageResource
77  	 */
78  	public MessageResource getMessageResource() {
79  		return this.messageResource;
80  	}
81  
82  	/**
83  	 * @param messageResource the messageResource to set
84  	 */
85  	public void setMessageResource(MessageResource messageResource) {
86  		this.messageResource = messageResource;
87  	}
88  
89  }