mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 16:05:44 +01:00
Merged branch feature/branches_v2_endpoint
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
package sonia.scm.api.v2.resources;
|
||||
|
||||
import javax.ws.rs.DefaultValue;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.QueryParam;
|
||||
import javax.ws.rs.core.Response;
|
||||
|
||||
public class BranchCollectionResource {
|
||||
@GET
|
||||
@Path("")
|
||||
public Response getAll(@DefaultValue("0") @QueryParam("page") int page,
|
||||
@DefaultValue("10") @QueryParam("pageSize") int pageSize,
|
||||
@QueryParam("sortBy") String sortBy,
|
||||
@DefaultValue("false") @QueryParam("desc") boolean desc) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package sonia.scm.api.v2.resources;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import de.otto.edison.hal.Embedded;
|
||||
import de.otto.edison.hal.HalRepresentation;
|
||||
import de.otto.edison.hal.Links;
|
||||
import sonia.scm.repository.Branch;
|
||||
import sonia.scm.repository.NamespaceAndName;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import static de.otto.edison.hal.Embedded.embeddedBuilder;
|
||||
import static de.otto.edison.hal.Links.linkingTo;
|
||||
import static java.util.stream.Collectors.toList;
|
||||
|
||||
public class BranchCollectionToDtoMapper {
|
||||
|
||||
private final ResourceLinks resourceLinks;
|
||||
private final BranchToBranchDtoMapper branchToDtoMapper;
|
||||
|
||||
@Inject
|
||||
public BranchCollectionToDtoMapper(BranchToBranchDtoMapper branchToDtoMapper, ResourceLinks resourceLinks) {
|
||||
this.resourceLinks = resourceLinks;
|
||||
this.branchToDtoMapper = branchToDtoMapper;
|
||||
}
|
||||
|
||||
public HalRepresentation map(String namespace, String name, Collection<Branch> branches) {
|
||||
List<BranchDto> dtos = branches.stream().map(branch -> branchToDtoMapper.map(branch, new NamespaceAndName(namespace, name))).collect(toList());
|
||||
return new HalRepresentation(createLinks(namespace, name), embedDtos(dtos));
|
||||
}
|
||||
|
||||
private Links createLinks(String namespace, String name) {
|
||||
String baseUrl = resourceLinks.branchCollection().self(namespace, name);
|
||||
|
||||
Links.Builder linksBuilder = linkingTo()
|
||||
.with(Links.linkingTo().self(baseUrl).build());
|
||||
return linksBuilder.build();
|
||||
}
|
||||
|
||||
private Embedded embedDtos(List<BranchDto> dtos) {
|
||||
return embeddedBuilder()
|
||||
.with("branches", dtos)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package sonia.scm.api.v2.resources;
|
||||
|
||||
import de.otto.edison.hal.HalRepresentation;
|
||||
import de.otto.edison.hal.Links;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter @Setter @NoArgsConstructor
|
||||
public class BranchDto extends HalRepresentation {
|
||||
|
||||
private String name;
|
||||
private String revision;
|
||||
|
||||
@Override
|
||||
protected HalRepresentation add(Links links) {
|
||||
return super.add(links);
|
||||
}
|
||||
}
|
||||
@@ -1,20 +1,113 @@
|
||||
package sonia.scm.api.v2.resources;
|
||||
|
||||
import com.webcohesion.enunciate.metadata.rs.ResponseCode;
|
||||
import com.webcohesion.enunciate.metadata.rs.StatusCodes;
|
||||
import com.webcohesion.enunciate.metadata.rs.TypeHint;
|
||||
import sonia.scm.repository.Branches;
|
||||
import sonia.scm.repository.NamespaceAndName;
|
||||
import sonia.scm.repository.RepositoryException;
|
||||
import sonia.scm.repository.RepositoryNotFoundException;
|
||||
import sonia.scm.repository.api.CommandNotSupportedException;
|
||||
import sonia.scm.repository.api.RepositoryService;
|
||||
import sonia.scm.repository.api.RepositoryServiceFactory;
|
||||
import sonia.scm.web.VndMediaType;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Provider;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.PathParam;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.Response;
|
||||
import java.io.IOException;
|
||||
|
||||
public class BranchRootResource {
|
||||
|
||||
private final Provider<BranchCollectionResource> branchCollectionResource;
|
||||
private final RepositoryServiceFactory servicefactory;
|
||||
private final BranchToBranchDtoMapper branchToDtoMapper;
|
||||
private final BranchCollectionToDtoMapper branchCollectionToDtoMapper;
|
||||
|
||||
@Inject
|
||||
public BranchRootResource(Provider<BranchCollectionResource> branchCollectionResource) {
|
||||
this.branchCollectionResource = branchCollectionResource;
|
||||
public BranchRootResource(RepositoryServiceFactory servicefactory, BranchToBranchDtoMapper branchToDtoMapper, BranchCollectionToDtoMapper branchCollectionToDtoMapper) {
|
||||
this.servicefactory = servicefactory;
|
||||
this.branchToDtoMapper = branchToDtoMapper;
|
||||
this.branchCollectionToDtoMapper = branchCollectionToDtoMapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a branch for a repository.
|
||||
*
|
||||
* <strong>Note:</strong> This method requires "repository" privilege.
|
||||
*
|
||||
* @param namespace the namespace of the repository
|
||||
* @param name the name of the repository
|
||||
* @param branchName the name of the branch
|
||||
*
|
||||
*/
|
||||
@GET
|
||||
@Path("{branch}")
|
||||
@Produces(VndMediaType.BRANCH)
|
||||
@TypeHint(BranchDto.class)
|
||||
@StatusCodes({
|
||||
@ResponseCode(code = 200, condition = "success"),
|
||||
@ResponseCode(code = 400, condition = "branches not supported for given repository"),
|
||||
@ResponseCode(code = 401, condition = "not authenticated / invalid credentials"),
|
||||
@ResponseCode(code = 403, condition = "not authorized, the current user has no privileges to read the branch"),
|
||||
@ResponseCode(code = 404, condition = "not found, no branch with the specified name for the repository available or repository not found"),
|
||||
@ResponseCode(code = 500, condition = "internal server error")
|
||||
})
|
||||
public Response get(@PathParam("namespace") String namespace, @PathParam("name") String name, @PathParam("branch") String branchName) throws IOException, RepositoryException {
|
||||
try (RepositoryService repositoryService = servicefactory.create(new NamespaceAndName(namespace, name))) {
|
||||
Branches branches = repositoryService.getBranchesCommand().getBranches();
|
||||
return branches.getBranches()
|
||||
.stream()
|
||||
.filter(branch -> branchName.equals(branch.getName()))
|
||||
.findFirst()
|
||||
.map(branch -> branchToDtoMapper.map(branch, new NamespaceAndName(namespace, name)))
|
||||
.map(Response::ok)
|
||||
.orElse(Response.status(Response.Status.NOT_FOUND))
|
||||
.build();
|
||||
} catch (CommandNotSupportedException ex) {
|
||||
return Response.status(Response.Status.BAD_REQUEST).build();
|
||||
} catch (RepositoryNotFoundException e) {
|
||||
return Response.status(Response.Status.NOT_FOUND).build();
|
||||
}
|
||||
}
|
||||
|
||||
@Path("{branch}/changesets/")
|
||||
@GET
|
||||
public Response history(@PathParam("namespace") String namespace, @PathParam("name") String name, @PathParam("branch") String branchName) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the branches for a repository.
|
||||
*
|
||||
* <strong>Note:</strong> This method requires "repository" privilege.
|
||||
*
|
||||
* @param namespace the namespace of the repository
|
||||
* @param name the name of the repository
|
||||
*
|
||||
*/
|
||||
@GET
|
||||
@Path("")
|
||||
public BranchCollectionResource getBranchCollectionResource() {
|
||||
return branchCollectionResource.get();
|
||||
@Produces(VndMediaType.BRANCH_COLLECTION)
|
||||
@TypeHint(CollectionDto.class)
|
||||
@StatusCodes({
|
||||
@ResponseCode(code = 200, condition = "success"),
|
||||
@ResponseCode(code = 400, condition = "branches not supported for given repository"),
|
||||
@ResponseCode(code = 401, condition = "not authenticated / invalid credentials"),
|
||||
@ResponseCode(code = 403, condition = "not authorized, the current user does not have the \"group\" privilege"),
|
||||
@ResponseCode(code = 404, condition = "not found, no repository found for the given namespace and name"),
|
||||
@ResponseCode(code = 500, condition = "internal server error")
|
||||
})
|
||||
public Response getAll(@PathParam("namespace") String namespace, @PathParam("name") String name) throws IOException, RepositoryException {
|
||||
try (RepositoryService repositoryService = servicefactory.create(new NamespaceAndName(namespace, name))) {
|
||||
Branches branches = repositoryService.getBranchesCommand().getBranches();
|
||||
return Response.ok(branchCollectionToDtoMapper.map(namespace, name, branches.getBranches())).build();
|
||||
} catch (CommandNotSupportedException ex) {
|
||||
return Response.status(Response.Status.BAD_REQUEST).build();
|
||||
} catch (RepositoryNotFoundException e) {
|
||||
return Response.status(Response.Status.NOT_FOUND).build();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
package sonia.scm.api.v2.resources;
|
||||
|
||||
import de.otto.edison.hal.Links;
|
||||
import org.mapstruct.AfterMapping;
|
||||
import org.mapstruct.Context;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
import org.mapstruct.MappingTarget;
|
||||
import sonia.scm.repository.Branch;
|
||||
import sonia.scm.repository.NamespaceAndName;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import static de.otto.edison.hal.Link.linkBuilder;
|
||||
import static de.otto.edison.hal.Links.linkingTo;
|
||||
|
||||
@Mapper
|
||||
public abstract class BranchToBranchDtoMapper {
|
||||
|
||||
@Inject
|
||||
private ResourceLinks resourceLinks;
|
||||
|
||||
@Mapping(target = "attributes", ignore = true) // We do not map HAL attributes
|
||||
public abstract BranchDto map(Branch branch, @Context NamespaceAndName namespaceAndName);
|
||||
|
||||
@AfterMapping
|
||||
void appendLinks(@MappingTarget BranchDto target, @Context NamespaceAndName namespaceAndName) {
|
||||
Links.Builder linksBuilder = linkingTo()
|
||||
.self(resourceLinks.branch().self(namespaceAndName, target.getName()))
|
||||
.single(linkBuilder("history", resourceLinks.branch().history(namespaceAndName, target.getName())).build())
|
||||
.single(linkBuilder("changeset", resourceLinks.changeset().changeset(namespaceAndName.getNamespace(), namespaceAndName.getName(), target.getRevision())).build())
|
||||
.single(linkBuilder("source", resourceLinks.source().source(namespaceAndName.getNamespace(), namespaceAndName.getName(), target.getRevision())).build());
|
||||
target.add(linksBuilder.build());
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package sonia.scm.api.v2.resources;
|
||||
|
||||
import javax.ws.rs.DefaultValue;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.QueryParam;
|
||||
import javax.ws.rs.core.Response;
|
||||
|
||||
public class ChangesetCollectionResource {
|
||||
@GET
|
||||
@Path("")
|
||||
public Response getAll(@DefaultValue("0") @QueryParam("page") int page,
|
||||
@DefaultValue("10") @QueryParam("pageSize") int pageSize,
|
||||
@QueryParam("sortBy") String sortBy,
|
||||
@DefaultValue("false") @QueryParam("desc") boolean desc) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
@@ -1,20 +1,25 @@
|
||||
package sonia.scm.api.v2.resources;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Provider;
|
||||
import javax.ws.rs.DefaultValue;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.QueryParam;
|
||||
import javax.ws.rs.core.Response;
|
||||
|
||||
public class ChangesetRootResource {
|
||||
|
||||
private final Provider<ChangesetCollectionResource> changesetCollectionResource;
|
||||
|
||||
@Inject
|
||||
public ChangesetRootResource(Provider<ChangesetCollectionResource> changesetCollectionResource) {
|
||||
this.changesetCollectionResource = changesetCollectionResource;
|
||||
@GET
|
||||
@Path("")
|
||||
public Response getAll(@DefaultValue("0") @QueryParam("page") int page,
|
||||
@DefaultValue("10") @QueryParam("pageSize") int pageSize,
|
||||
@QueryParam("sortBy") String sortBy,
|
||||
@DefaultValue("false") @QueryParam("desc") boolean desc) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Path("")
|
||||
public ChangesetCollectionResource getChangesetCollectionResource() {
|
||||
return changesetCollectionResource.get();
|
||||
@GET
|
||||
@Path("{revision}")
|
||||
public Response get() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,8 @@ public class MapperModule extends AbstractModule {
|
||||
bind(RepositoryTypeToRepositoryTypeDtoMapper.class).to(Mappers.getMapper(RepositoryTypeToRepositoryTypeDtoMapper.class).getClass());
|
||||
bind(RepositoryTypeCollectionToDtoMapper.class);
|
||||
|
||||
bind(BranchToBranchDtoMapper.class).to(Mappers.getMapper(BranchToBranchDtoMapper.class).getClass());
|
||||
|
||||
bind(UriInfoStore.class).in(ServletScopes.REQUEST);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ public class RepositoryResource {
|
||||
}
|
||||
|
||||
@Path("branches/")
|
||||
public BranchRootResource branches() {
|
||||
public BranchRootResource branches(@PathParam("namespace") String namespace, @PathParam("name") String name) {
|
||||
return branchRootResource.get();
|
||||
}
|
||||
|
||||
|
||||
@@ -35,8 +35,8 @@ public abstract class RepositoryToRepositoryDtoMapper extends BaseMapper<Reposit
|
||||
}
|
||||
linksBuilder.single(link("tags", resourceLinks.tagCollection().self(target.getNamespace(), target.getName())));
|
||||
linksBuilder.single(link("branches", resourceLinks.branchCollection().self(target.getNamespace(), target.getName())));
|
||||
linksBuilder.single(link("changesets", resourceLinks.changesetCollection().self(target.getNamespace(), target.getName())));
|
||||
linksBuilder.single(link("sources", resourceLinks.sourceCollection().self(target.getNamespace(), target.getName())));
|
||||
linksBuilder.single(link("changesets", resourceLinks.changeset().self(target.getNamespace(), target.getName())));
|
||||
linksBuilder.single(link("sources", resourceLinks.source().self(target.getNamespace(), target.getName())));
|
||||
target.add(linksBuilder.build());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package sonia.scm.api.v2.resources;
|
||||
|
||||
import sonia.scm.repository.NamespaceAndName;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.ws.rs.core.UriInfo;
|
||||
import java.net.URI;
|
||||
@@ -221,6 +223,26 @@ class ResourceLinks {
|
||||
}
|
||||
}
|
||||
|
||||
public BranchLinks branch() {
|
||||
return new BranchLinks(uriInfoStore.get());
|
||||
}
|
||||
|
||||
static class BranchLinks {
|
||||
private final LinkBuilder branchLinkBuilder;
|
||||
|
||||
BranchLinks(UriInfo uriInfo) {
|
||||
branchLinkBuilder = new LinkBuilder(uriInfo, RepositoryRootResource.class, RepositoryResource.class, BranchRootResource.class);
|
||||
}
|
||||
|
||||
String self(NamespaceAndName namespaceAndName, String branch) {
|
||||
return branchLinkBuilder.method("getRepositoryResource").parameters(namespaceAndName.getNamespace(), namespaceAndName.getName()).method("branches").parameters().method("get").parameters(branch).href();
|
||||
}
|
||||
|
||||
public String history(NamespaceAndName namespaceAndName, String branch) {
|
||||
return branchLinkBuilder.method("getRepositoryResource").parameters(namespaceAndName.getNamespace(), namespaceAndName.getName()).method("branches").parameters().method("history").parameters(branch).href();
|
||||
}
|
||||
}
|
||||
|
||||
public BranchCollectionLinks branchCollection() {
|
||||
return new BranchCollectionLinks(uriInfoStore.get());
|
||||
}
|
||||
@@ -229,43 +251,51 @@ class ResourceLinks {
|
||||
private final LinkBuilder branchLinkBuilder;
|
||||
|
||||
BranchCollectionLinks(UriInfo uriInfo) {
|
||||
branchLinkBuilder = new LinkBuilder(uriInfo, RepositoryRootResource.class, RepositoryResource.class, BranchRootResource.class, BranchCollectionResource.class);
|
||||
branchLinkBuilder = new LinkBuilder(uriInfo, RepositoryRootResource.class, RepositoryResource.class, BranchRootResource.class);
|
||||
}
|
||||
|
||||
String self(String namespace, String name) {
|
||||
return branchLinkBuilder.method("getRepositoryResource").parameters(namespace, name).method("branches").parameters().method("getBranchCollectionResource").parameters().method("getAll").parameters().href();
|
||||
return branchLinkBuilder.method("getRepositoryResource").parameters(namespace, name).method("branches").parameters().method("getAll").parameters().href();
|
||||
}
|
||||
}
|
||||
|
||||
public ChangesetCollectionLinks changesetCollection() {
|
||||
return new ChangesetCollectionLinks(uriInfoStore.get());
|
||||
public ChangesetLinks changeset() {
|
||||
return new ChangesetLinks(uriInfoStore.get());
|
||||
}
|
||||
|
||||
static class ChangesetCollectionLinks {
|
||||
static class ChangesetLinks {
|
||||
private final LinkBuilder changesetLinkBuilder;
|
||||
|
||||
ChangesetCollectionLinks(UriInfo uriInfo) {
|
||||
changesetLinkBuilder = new LinkBuilder(uriInfo, RepositoryRootResource.class, RepositoryResource.class, ChangesetRootResource.class, ChangesetCollectionResource.class);
|
||||
ChangesetLinks(UriInfo uriInfo) {
|
||||
changesetLinkBuilder = new LinkBuilder(uriInfo, RepositoryRootResource.class, RepositoryResource.class, ChangesetRootResource.class);
|
||||
}
|
||||
|
||||
String self(String namespace, String name) {
|
||||
return changesetLinkBuilder.method("getRepositoryResource").parameters(namespace, name).method("changesets").parameters().method("getChangesetCollectionResource").parameters().method("getAll").parameters().href();
|
||||
return changesetLinkBuilder.method("getRepositoryResource").parameters(namespace, name).method("changesets").parameters().method("getAll").parameters().href();
|
||||
}
|
||||
|
||||
public String changeset(String namespace, String name, String revision) {
|
||||
return changesetLinkBuilder.method("getRepositoryResource").parameters(namespace, name).method("changesets").parameters().method("get").parameters(revision).href();
|
||||
}
|
||||
}
|
||||
|
||||
public SourceCollectionLinks sourceCollection() {
|
||||
return new SourceCollectionLinks(uriInfoStore.get());
|
||||
public SourceLinks source() {
|
||||
return new SourceLinks(uriInfoStore.get());
|
||||
}
|
||||
|
||||
static class SourceCollectionLinks {
|
||||
static class SourceLinks {
|
||||
private final LinkBuilder sourceLinkBuilder;
|
||||
|
||||
SourceCollectionLinks(UriInfo uriInfo) {
|
||||
sourceLinkBuilder = new LinkBuilder(uriInfo, RepositoryRootResource.class, RepositoryResource.class, SourceRootResource.class, SourceCollectionResource.class);
|
||||
SourceLinks(UriInfo uriInfo) {
|
||||
sourceLinkBuilder = new LinkBuilder(uriInfo, RepositoryRootResource.class, RepositoryResource.class, SourceRootResource.class);
|
||||
}
|
||||
|
||||
String self(String namespace, String name) {
|
||||
return sourceLinkBuilder.method("getRepositoryResource").parameters(namespace, name).method("sources").parameters().method("getSourceCollectionResource").parameters().method("getAll").parameters().href();
|
||||
return sourceLinkBuilder.method("getRepositoryResource").parameters(namespace, name).method("sources").parameters().method("getAll").parameters().href();
|
||||
}
|
||||
|
||||
public String source(String namespace, String name, String revision) {
|
||||
return sourceLinkBuilder.method("getRepositoryResource").parameters(namespace, name).method("sources").parameters().method("get").parameters(revision).href();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
package sonia.scm.api.v2.resources;
|
||||
|
||||
import javax.ws.rs.DefaultValue;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.QueryParam;
|
||||
import javax.ws.rs.core.Response;
|
||||
|
||||
public class SourceCollectionResource {
|
||||
@GET
|
||||
@Path("")
|
||||
public Response getAll(@DefaultValue("0") @QueryParam("page") int page,
|
||||
@DefaultValue("10") @QueryParam("pageSize") int pageSize,
|
||||
@QueryParam("sortBy") String sortBy,
|
||||
@DefaultValue("false") @QueryParam("desc") boolean desc) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
@@ -1,20 +1,25 @@
|
||||
package sonia.scm.api.v2.resources;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Provider;
|
||||
import javax.ws.rs.DefaultValue;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.QueryParam;
|
||||
import javax.ws.rs.core.Response;
|
||||
|
||||
public class SourceRootResource {
|
||||
|
||||
private final Provider<SourceCollectionResource> sourceCollectionResource;
|
||||
|
||||
@Inject
|
||||
public SourceRootResource(Provider<SourceCollectionResource> sourceCollectionResource) {
|
||||
this.sourceCollectionResource = sourceCollectionResource;
|
||||
@GET
|
||||
@Path("")
|
||||
public Response getAll(@DefaultValue("0") @QueryParam("page") int page,
|
||||
@DefaultValue("10") @QueryParam("pageSize") int pageSize,
|
||||
@QueryParam("sortBy") String sortBy,
|
||||
@DefaultValue("false") @QueryParam("desc") boolean desc) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Path("")
|
||||
public SourceCollectionResource getSourceCollectionResource() {
|
||||
return sourceCollectionResource.get();
|
||||
@GET
|
||||
@Path("{revision}")
|
||||
public Response get() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user