View Javadoc

1   /**
2    * Copyright 2011 The Kuali Foundation Licensed under the Educational Community
3    * License, Version 2.0 (the "License"); you may not use this file except in
4    * compliance with the License. You may obtain a copy of the License at
5    *
6    * http://www.osedu.org/licenses/ECL-2.0
7    *
8    * Unless required by applicable law or agreed to in writing, software
9    * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
10   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
11   * License for the specific language governing permissions and limitations under
12   * the License.
13   */
14  package org.kuali.mobility.events.service;
15  
16  import java.util.List;
17  import javax.ws.rs.Path;
18  import org.springframework.stereotype.Service;
19  import javax.ws.rs.FormParam;
20  import javax.ws.rs.POST;
21  import org.kuali.mobility.events.dao.EventsDao;
22  import org.kuali.mobility.events.entity.UserAccount;
23  import org.springframework.context.ApplicationContext;
24  
25  @Service
26  public class EventsServiceImpl implements EventsService {
27  
28      private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(EventsServiceImpl.class);
29      private ApplicationContext applicationContext;
30      private EventsDao eventsDao;
31  
32      public void addEvent(String eventDate, String startTime, String endTime, String title, String eventBody, String user, String timeZoneId) {
33          getEventsDao().addEvent(eventDate, startTime, endTime, title, eventBody, user, timeZoneId);
34      }
35  
36      public List getEvents(String start, String end) {
37          return getEventsDao().getEvents(start, end);
38      }
39  
40      public void updateEvent(int eventId, String startTime, String endTime, String title, String eventBody, String eventDate, String user) {
41          getEventsDao().updateEvent(eventId, startTime, endTime, title, eventBody, eventDate, user);
42      }
43  
44      public void deleteEvent(int eventId) {
45          getEventsDao().deleteEvent(eventId);
46      }
47  
48      public String synchronizeWithGoogleAccount(String emailId, String password) {
49          return getEventsDao().synchronizeWithGoogleAccount(emailId, password);
50      }
51  
52      @POST
53      @Path("/event")
54      public void event(
55              @FormParam("eventDate") final String eventDate,
56              @FormParam("startTime") final String startTime,
57              @FormParam("endTime") final String endTime,
58              @FormParam("title") final String title,
59              @FormParam("eventBody") final String eventBody) {
60          Event event = new Event();
61      }
62  
63      @POST
64      @Path("/userAccount")
65      public void userAccount(
66              @FormParam("emailId") final String emailId,
67              @FormParam("password") final String password) {
68          UserAccount userAccount = new UserAccount();
69      }
70  
71      /**
72       * @return the eventsDao
73       */
74      public EventsDao getEventsDao() {
75          return eventsDao;
76      }
77  
78      /**
79       * @param eventsDao the eventsDao to set
80       */
81      public void setEventsDao(EventsDao eventsDao) {
82          this.eventsDao = eventsDao;
83      }
84  }