001package co.codewizards.cloudstore.rest.server.service;
002
003import javax.ws.rs.Consumes;
004import javax.ws.rs.GET;
005import javax.ws.rs.Path;
006import javax.ws.rs.Produces;
007import javax.ws.rs.core.MediaType;
008
009import co.codewizards.cloudstore.core.dto.RepositoryDto;
010import co.codewizards.cloudstore.core.repo.transport.RepoTransport;
011
012@Path("_getClientRepositoryDto/{repositoryName}")
013@Consumes(MediaType.APPLICATION_XML)
014@Produces(MediaType.APPLICATION_XML)
015public class GetClientRepositoryDtoService extends AbstractServiceWithRepoToRepoAuth {
016
017        @GET
018        public RepositoryDto getClientRepositoryDto()
019        {
020                try (final RepoTransport repoTransport = authenticateAndCreateLocalRepoTransport();) {
021                        RepositoryDto repositoryDto = repoTransport.getClientRepositoryDto();
022                        return repositoryDto;
023                }
024        }
025
026}