001    /**
002     * Copyright 2005-2013 The Kuali Foundation
003     *
004     * Licensed under the Educational Community License, Version 2.0 (the "License");
005     * you may not use this file except in compliance with the License.
006     * You may obtain a copy of the License at
007     *
008     * http://www.opensource.org/licenses/ecl2.php
009     *
010     * Unless required by applicable law or agreed to in writing, software
011     * distributed under the License is distributed on an "AS IS" BASIS,
012     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013     * See the License for the specific language governing permissions and
014     * limitations under the License.
015     */
016    package org.kuali.rice.ksb.testclient1;
017    
018    import org.kuali.rice.ksb.messaging.remotedservices.Inbox;
019    import org.kuali.rice.ksb.messaging.remotedservices.InboxResource;
020    import org.kuali.rice.ksb.messaging.remotedservices.MessageResource;
021    
022    /**
023     * service implementation for {@link InboxResource}
024     *
025     * @author Kuali Rice Team (rice.collab@kuali.org)
026     *
027     */
028    public class InboxResourceImpl implements InboxResource {
029    
030            private Storage storage;
031            private MessageResource messageResource;
032    
033            /**
034             * @see org.kuali.rice.ksb.messaging.remotedservices.InboxResource#createInbox(org.kuali.rice.ksb.messaging.remotedservices.Inbox)
035             */
036            public Inbox createInbox(Inbox inbox) {
037                    return storage.storeInbox(inbox);
038            }
039    
040            /**
041             * @see org.kuali.rice.ksb.messaging.remotedservices.InboxResource#deleteInbox(java.lang.String)
042             */
043            public void deleteInbox(String id) {
044                    storage.deleteInbox(id);
045            }
046    
047            /**
048             * @see org.kuali.rice.ksb.messaging.remotedservices.InboxResource#retrieveInbox(java.lang.String)
049             */
050            public Inbox retrieveInbox(String id) {
051                    return storage.retrieveInbox(id);
052            }
053    
054            /**
055             * @see org.kuali.rice.ksb.messaging.remotedservices.InboxResource#updateInbox(org.kuali.rice.ksb.messaging.remotedservices.Inbox)
056             */
057            public void updateInbox(Inbox inbox) {
058                    storage.storeInbox(inbox);
059            }
060    
061            /**
062             * @return the storage
063             */
064            public Storage getStorage() {
065                    return this.storage;
066            }
067    
068            /**
069             * @param storage the storage to set
070             */
071            public void setStorage(Storage storage) {
072                    this.storage = storage;
073            }
074    
075            /**
076             * @return the messageResource
077             */
078            public MessageResource getMessageResource() {
079                    return this.messageResource;
080            }
081    
082            /**
083             * @param messageResource the messageResource to set
084             */
085            public void setMessageResource(MessageResource messageResource) {
086                    this.messageResource = messageResource;
087            }
088    
089    }