1
2
3
4
5
6
7
8 package com.buckosoft.PicMan.service;
9
10 import java.util.List;
11
12 import javax.jws.WebService;
13 import javax.ws.rs.Consumes;
14 import javax.ws.rs.GET;
15 import javax.ws.rs.POST;
16 import javax.ws.rs.Path;
17 import javax.ws.rs.Produces;
18 import javax.ws.rs.core.MediaType;
19
20 import com.buckosoft.PicMan.domain.SyncClient;
21 import com.buckosoft.PicMan.domain.SyncServer;
22
23
24
25
26
27
28 @WebService
29 @Path("/sync")
30 @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
31 @Produces({ MediaType.APPLICATION_JSON })
32 public interface SyncService {
33 @GET
34 @Path("/servers")
35 public List<SyncServer> getServers();
36
37 @POST
38 @Path("/persist/server")
39 public void persistServer(SyncServer syncServer);
40
41 @GET
42 @Path("/clients")
43 public List<SyncClient> getClients();
44
45 @POST
46 @Path("/persist/client")
47 public void persistClient(SyncClient syncClient);
48
49
50 }