1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 package org.kuali.mobility.push.service.rest;
16
17 import org.kuali.mobility.push.entity.Device;
18 import org.kuali.mobility.push.service.rest.pojo.DeviceResponse;
19 import org.kuali.mobility.push.service.rest.pojo.DevicesResponse;
20
21 import javax.ws.rs.*;
22 import javax.ws.rs.core.MediaType;
23
24
25
26
27 @Path("/")
28 public interface DeviceServiceRest {
29
30
31 public static final String TYPE_ANDROID = "Android";
32
33
34 public static final String TYPE_IOS = "iOS";
35
36
37 public static final String TYPE_BLACKBERRY = "BlackBerry";
38
39
40 public static final String TYPE_WINDOWS = "WindowsMobile";
41
42
43
44
45
46 @POST
47 @Path("/saveDevice")
48 @Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
49 @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
50 DeviceResponse saveDevice(Device device);
51
52
53
54
55
56 @POST
57 @Path("/registerDevice")
58 @Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
59 @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
60 DeviceResponse registerDevice(Device device);
61
62
63
64
65
66 @GET
67 @Path("/devices")
68 @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
69 DevicesResponse getDevices();
70
71
72
73
74
75
76 @GET
77 @Path("/findDeviceByDeviceId")
78 @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
79 DeviceResponse findDeviceByDeviceId(@QueryParam(value="deviceId") String deviceId);
80
81
82 }