Renaming classi
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
package it.integry.ems.sync.controller;
|
package it.integry.ems.sync.controller;
|
||||||
|
|
||||||
import it.integry.ems.response.ServiceRestResponse;
|
import it.integry.ems.response.ServiceRestResponse;
|
||||||
import it.integry.ems.sync.service.RemoteSyncronizationService;
|
import it.integry.ems.sync.service.RemoteSynchronizationService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Scope;
|
import org.springframework.context.annotation.Scope;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
@@ -12,20 +12,20 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
@RestController
|
@RestController
|
||||||
@Scope("request")
|
@Scope("request")
|
||||||
@RequestMapping("system/remote-sync")
|
@RequestMapping("system/remote-sync")
|
||||||
public class RemoteSyncronizationController {
|
public class RemoteSynchronizationController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private RemoteSyncronizationService remoteSyncronizationService;
|
private RemoteSynchronizationService remoteSynchronizationService;
|
||||||
|
|
||||||
@RequestMapping(value = "publications/{groupId}/start", method = RequestMethod.GET)
|
@RequestMapping(value = "publications/{groupId}/start", method = RequestMethod.GET)
|
||||||
public ServiceRestResponse startPublication(@PathVariable long groupId) throws Exception {
|
public ServiceRestResponse startPublication(@PathVariable long groupId) throws Exception {
|
||||||
remoteSyncronizationService.startPublication(groupId);
|
remoteSynchronizationService.startPublication(groupId);
|
||||||
return ServiceRestResponse.createPositiveResponse();
|
return ServiceRestResponse.createPositiveResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "publications/status", method = RequestMethod.GET)
|
@RequestMapping(value = "publications/status", method = RequestMethod.GET)
|
||||||
public ServiceRestResponse statusPublication() {
|
public ServiceRestResponse statusPublication() {
|
||||||
return ServiceRestResponse.createPositiveResponse(remoteSyncronizationService.getPublicationStatus());
|
return ServiceRestResponse.createPositiveResponse(remoteSynchronizationService.getPublicationStatus());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -4,7 +4,7 @@ import it.integry.ems.response.ServiceRestResponse;
|
|||||||
import it.integry.ems.sync.dto.InsertPublicationGroupRequestDTO;
|
import it.integry.ems.sync.dto.InsertPublicationGroupRequestDTO;
|
||||||
import it.integry.ems.sync.dto.InsertPublicationItemResponseDTO;
|
import it.integry.ems.sync.dto.InsertPublicationItemResponseDTO;
|
||||||
import it.integry.ems.sync.dto.PublicationDTO;
|
import it.integry.ems.sync.dto.PublicationDTO;
|
||||||
import it.integry.ems.sync.service.RemoteSyncronizationSetupService;
|
import it.integry.ems.sync.service.RemoteSynchronizationSetupService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Scope;
|
import org.springframework.context.annotation.Scope;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -14,28 +14,28 @@ import java.util.Collections;
|
|||||||
@RestController
|
@RestController
|
||||||
@Scope("request")
|
@Scope("request")
|
||||||
@RequestMapping("system/remote-sync/setup")
|
@RequestMapping("system/remote-sync/setup")
|
||||||
public class RemoteSyncronizationSetupController {
|
public class RemoteSynchronizationSetupController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private RemoteSyncronizationSetupService remoteSyncronizationSetupService;
|
private RemoteSynchronizationSetupService remoteSynchronizationSetupService;
|
||||||
|
|
||||||
|
|
||||||
@RequestMapping(value = "publications/retrieve", method = RequestMethod.GET)
|
@RequestMapping(value = "publications/retrieve", method = RequestMethod.GET)
|
||||||
public ServiceRestResponse retrievePublications() throws Exception {
|
public ServiceRestResponse retrievePublications() throws Exception {
|
||||||
return ServiceRestResponse.createPositiveResponse(remoteSyncronizationSetupService.retrievePublications());
|
return ServiceRestResponse.createPositiveResponse(remoteSynchronizationSetupService.retrievePublications());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@RequestMapping(value = "publications/insert-group", method = RequestMethod.POST)
|
@RequestMapping(value = "publications/insert-group", method = RequestMethod.POST)
|
||||||
public ServiceRestResponse insertPublicationGroup(@RequestBody InsertPublicationGroupRequestDTO request) throws Exception {
|
public ServiceRestResponse insertPublicationGroup(@RequestBody InsertPublicationGroupRequestDTO request) throws Exception {
|
||||||
return ServiceRestResponse.createPositiveResponse(remoteSyncronizationSetupService.addPublicationGroup(request.getDescription()));
|
return ServiceRestResponse.createPositiveResponse(remoteSynchronizationSetupService.addPublicationGroup(request.getDescription()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@RequestMapping(value = "publications/{groupId}/insert", method = RequestMethod.POST)
|
@RequestMapping(value = "publications/{groupId}/insert", method = RequestMethod.POST)
|
||||||
public ServiceRestResponse insertPublications(@PathVariable long groupId, @RequestBody PublicationDTO publicationToInsert) throws Exception {
|
public ServiceRestResponse insertPublications(@PathVariable long groupId, @RequestBody PublicationDTO publicationToInsert) throws Exception {
|
||||||
InsertPublicationItemResponseDTO response = new InsertPublicationItemResponseDTO()
|
InsertPublicationItemResponseDTO response = new InsertPublicationItemResponseDTO()
|
||||||
.setId(remoteSyncronizationSetupService.addPublicationItem(groupId, publicationToInsert));
|
.setId(remoteSynchronizationSetupService.addPublicationItem(groupId, publicationToInsert));
|
||||||
|
|
||||||
|
|
||||||
return ServiceRestResponse.createPositiveResponse(response);
|
return ServiceRestResponse.createPositiveResponse(response);
|
||||||
@@ -44,14 +44,14 @@ public class RemoteSyncronizationSetupController {
|
|||||||
|
|
||||||
@RequestMapping(value = "publications/{groupId}/delete-group", method = RequestMethod.POST)
|
@RequestMapping(value = "publications/{groupId}/delete-group", method = RequestMethod.POST)
|
||||||
public ServiceRestResponse deletePublicationGroup(@PathVariable long groupId) throws Exception {
|
public ServiceRestResponse deletePublicationGroup(@PathVariable long groupId) throws Exception {
|
||||||
remoteSyncronizationSetupService.deletePublicationsGroup(groupId);
|
remoteSynchronizationSetupService.deletePublicationsGroup(groupId);
|
||||||
return ServiceRestResponse.createPositiveResponse();
|
return ServiceRestResponse.createPositiveResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@RequestMapping(value = "publications/{publicationId}/delete", method = RequestMethod.POST)
|
@RequestMapping(value = "publications/{publicationId}/delete", method = RequestMethod.POST)
|
||||||
public ServiceRestResponse deletePublication(@PathVariable long publicationId) throws Exception {
|
public ServiceRestResponse deletePublication(@PathVariable long publicationId) throws Exception {
|
||||||
remoteSyncronizationSetupService.deletePublications(Collections.singletonList(publicationId));
|
remoteSynchronizationSetupService.deletePublications(Collections.singletonList(publicationId));
|
||||||
return ServiceRestResponse.createPositiveResponse();
|
return ServiceRestResponse.createPositiveResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@ import java.util.Random;
|
|||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Scope(value = "request")
|
@Scope(value = "request")
|
||||||
public class RemoteSyncronizationService {
|
public class RemoteSynchronizationService {
|
||||||
|
|
||||||
private final Logger logger = LogManager.getLogger();
|
private final Logger logger = LogManager.getLogger();
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ import static java.util.stream.Collectors.toList;
|
|||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Scope(value = "request")
|
@Scope(value = "request")
|
||||||
public class RemoteSyncronizationSetupService {
|
public class RemoteSynchronizationSetupService {
|
||||||
|
|
||||||
private final Logger logger = LogManager.getLogger();
|
private final Logger logger = LogManager.getLogger();
|
||||||
|
|
||||||
Reference in New Issue
Block a user