View Javadoc
1   /******************************************************************************
2    * SyncService.java - Define the sync service endpoint
3    * 
4    * PicMan - The BuckoSoft Picture Manager in Java
5    * Copyright(c) 2014 - Dick Balaska
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  /** Define the sync service endpoint.
24   * @author Dick Balaska
25   * @since 2014/06/07
26   * @see <a href="http://cvs.buckosoft.com/Projects/PicMan/PicMan/src/main/java/com/buckosoft/PicMan/service/sync/SyncService.java">SyncService.java</a>
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  }