1
2
3
4
5
6
7
8
9
10
11
12
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
73
74 public EventsDao getEventsDao() {
75 return eventsDao;
76 }
77
78
79
80
81 public void setEventsDao(EventsDao eventsDao) {
82 this.eventsDao = eventsDao;
83 }
84 }