Search in sources :

Example 46 with ArtifactStore

use of org.commonjava.indy.model.core.ArtifactStore in project indy by Commonjava.

the class DeprecatedStoreAdminHandler method create.

@ApiOperation("Create a new store")
@ApiResponses({ @ApiResponse(code = 201, response = ArtifactStore.class, message = "The store was created"), @ApiResponse(code = 409, message = "A store with the specified type and name already exists") })
@ApiImplicitParams({ @ApiImplicitParam(allowMultiple = false, paramType = "body", name = "body", required = true, dataType = "org.commonjava.indy.model.core.ArtifactStore", value = "The artifact store definition JSON") })
@POST
@Consumes(ApplicationContent.application_json)
@Produces(ApplicationContent.application_json)
public Response create(@ApiParam(allowableValues = "hosted,group,remote", required = true) @PathParam("type") final String type, @Context final UriInfo uriInfo, @Context final HttpServletRequest request, @Context final SecurityContext securityContext) {
    String altPath = Paths.get(MavenPackageTypeDescriptor.MAVEN_ADMIN_REST_BASE_PATH, type).toString();
    Consumer<Response.ResponseBuilder> modifier = (rb) -> markDeprecated(rb, altPath);
    final StoreType st = StoreType.get(type);
    Response response = null;
    String json = null;
    try {
        json = IOUtils.toString(request.getInputStream());
        json = objectMapper.patchLegacyStoreJson(json);
    } catch (final IOException e) {
        final String message = "Failed to read " + st.getStoreClass().getSimpleName() + " from request body.";
        logger.error(message, e);
        response = formatResponse(e, message, modifier);
    }
    if (response != null) {
        return response;
    }
    ArtifactStore store = null;
    try {
        store = objectMapper.readValue(json, st.getStoreClass());
    } catch (final IOException e) {
        final String message = "Failed to parse " + st.getStoreClass().getSimpleName() + " from request body.";
        logger.error(message, e);
        response = formatResponse(e, message, modifier);
    }
    if (response != null) {
        return response;
    }
    logger.info("\n\nGot artifact store: {}\n\n", store);
    try {
        String user = securityManager.getUser(securityContext, request);
        if (adminController.store(store, user, false)) {
            final URI uri = uriInfo.getBaseUriBuilder().path(getClass()).path(store.getName()).build(store.getKey().getType().singularEndpointName());
            response = formatCreatedResponseWithJsonEntity(uri, store, objectMapper, modifier);
        } else {
            response = markDeprecated(status(CONFLICT).entity("{\"error\": \"Store already exists.\"}").type(application_json), altPath).build();
        }
    } catch (final IndyWorkflowException e) {
        logger.error(e.getMessage(), e);
        response = formatResponse(e, modifier);
    }
    return response;
}
Also used : Produces(javax.ws.rs.Produces) LoggerFactory(org.slf4j.LoggerFactory) Path(javax.ws.rs.Path) SecurityContext(javax.ws.rs.core.SecurityContext) ApiParam(io.swagger.annotations.ApiParam) StoreListingDTO(org.commonjava.indy.model.core.dto.StoreListingDTO) ApiOperation(io.swagger.annotations.ApiOperation) Consumes(javax.ws.rs.Consumes) Response.noContent(javax.ws.rs.core.Response.noContent) Response.status(javax.ws.rs.core.Response.status) URI(java.net.URI) StoreKey(org.commonjava.indy.model.core.StoreKey) DELETE(javax.ws.rs.DELETE) Context(javax.ws.rs.core.Context) StringUtils.isEmpty(org.apache.commons.lang.StringUtils.isEmpty) IndyObjectMapper(org.commonjava.indy.model.core.io.IndyObjectMapper) ApiImplicitParam(io.swagger.annotations.ApiImplicitParam) CONFLICT(javax.ws.rs.core.Response.Status.CONFLICT) StoreType(org.commonjava.indy.model.core.StoreType) IndyResources(org.commonjava.indy.bind.jaxrs.IndyResources) ResponseUtils.markDeprecated(org.commonjava.indy.bind.jaxrs.util.ResponseUtils.markDeprecated) Response.notModified(javax.ws.rs.core.Response.notModified) IOUtils(org.apache.commons.io.IOUtils) ApplicationContent(org.commonjava.indy.util.ApplicationContent) List(java.util.List) Response(javax.ws.rs.core.Response) Response.ok(javax.ws.rs.core.Response.ok) ApplicationScoped(javax.enterprise.context.ApplicationScoped) UriInfo(javax.ws.rs.core.UriInfo) ApiImplicitParams(io.swagger.annotations.ApiImplicitParams) HEAD(javax.ws.rs.HEAD) PathParam(javax.ws.rs.PathParam) GET(javax.ws.rs.GET) ApplicationContent.application_json(org.commonjava.indy.util.ApplicationContent.application_json) ApiResponses(io.swagger.annotations.ApiResponses) Inject(javax.inject.Inject) HttpServletRequest(javax.servlet.http.HttpServletRequest) MavenPackageTypeDescriptor(org.commonjava.indy.pkg.maven.model.MavenPackageTypeDescriptor) ResponseUtils.formatOkResponseWithJsonEntity(org.commonjava.indy.bind.jaxrs.util.ResponseUtils.formatOkResponseWithJsonEntity) IndyWorkflowException(org.commonjava.indy.IndyWorkflowException) SecurityManager(org.commonjava.indy.bind.jaxrs.SecurityManager) ResponseUtils.formatCreatedResponseWithJsonEntity(org.commonjava.indy.bind.jaxrs.util.ResponseUtils.formatCreatedResponseWithJsonEntity) Api(io.swagger.annotations.Api) Status(javax.ws.rs.core.Response.Status) JoinString(org.commonjava.maven.atlas.ident.util.JoinString) Logger(org.slf4j.Logger) POST(javax.ws.rs.POST) ArtifactStore(org.commonjava.indy.model.core.ArtifactStore) ResponseUtils.formatResponse(org.commonjava.indy.bind.jaxrs.util.ResponseUtils.formatResponse) METADATA_CHANGELOG(org.commonjava.indy.model.core.ArtifactStore.METADATA_CHANGELOG) IOException(java.io.IOException) Consumer(java.util.function.Consumer) Paths(java.nio.file.Paths) ApiResponse(io.swagger.annotations.ApiResponse) AdminController(org.commonjava.indy.core.ctl.AdminController) PUT(javax.ws.rs.PUT) StoreType(org.commonjava.indy.model.core.StoreType) Response(javax.ws.rs.core.Response) ResponseUtils.formatResponse(org.commonjava.indy.bind.jaxrs.util.ResponseUtils.formatResponse) ApiResponse(io.swagger.annotations.ApiResponse) ArtifactStore(org.commonjava.indy.model.core.ArtifactStore) IndyWorkflowException(org.commonjava.indy.IndyWorkflowException) JoinString(org.commonjava.maven.atlas.ident.util.JoinString) IOException(java.io.IOException) URI(java.net.URI) ApiImplicitParams(io.swagger.annotations.ApiImplicitParams) POST(javax.ws.rs.POST) Consumes(javax.ws.rs.Consumes) Produces(javax.ws.rs.Produces) ApiOperation(io.swagger.annotations.ApiOperation) ApiResponses(io.swagger.annotations.ApiResponses)

Example 47 with ArtifactStore

use of org.commonjava.indy.model.core.ArtifactStore in project indy by Commonjava.

the class DeprecatedStoreAdminHandler method get.

@ApiOperation("Retrieve the definition of a specific artifact store")
@ApiResponses({ @ApiResponse(code = 200, response = ArtifactStore.class, message = "The store definition"), @ApiResponse(code = 404, message = "The store doesn't exist") })
@Path("/{name}")
@GET
@Produces(ApplicationContent.application_json)
public Response get(@ApiParam(allowableValues = "hosted,group,remote", required = true) @PathParam("type") final String type, @ApiParam(required = true) @PathParam("name") final String name) {
    String altPath = Paths.get(MavenPackageTypeDescriptor.MAVEN_ADMIN_REST_BASE_PATH, type, name).toString();
    Consumer<Response.ResponseBuilder> modifier = (rb) -> markDeprecated(rb, altPath);
    final StoreType st = StoreType.get(type);
    final StoreKey key = new StoreKey(st, name);
    Response response;
    try {
        final ArtifactStore store = adminController.get(key);
        logger.info("Returning repository: {}", store);
        if (store == null) {
            response = markDeprecated(Response.status(Status.NOT_FOUND), altPath).build();
        } else {
            response = formatOkResponseWithJsonEntity(store, objectMapper, modifier);
        }
    } catch (final IndyWorkflowException e) {
        logger.error(e.getMessage(), e);
        response = formatResponse(e, modifier);
    }
    return response;
}
Also used : Produces(javax.ws.rs.Produces) LoggerFactory(org.slf4j.LoggerFactory) Path(javax.ws.rs.Path) SecurityContext(javax.ws.rs.core.SecurityContext) ApiParam(io.swagger.annotations.ApiParam) StoreListingDTO(org.commonjava.indy.model.core.dto.StoreListingDTO) ApiOperation(io.swagger.annotations.ApiOperation) Consumes(javax.ws.rs.Consumes) Response.noContent(javax.ws.rs.core.Response.noContent) Response.status(javax.ws.rs.core.Response.status) URI(java.net.URI) StoreKey(org.commonjava.indy.model.core.StoreKey) DELETE(javax.ws.rs.DELETE) Context(javax.ws.rs.core.Context) StringUtils.isEmpty(org.apache.commons.lang.StringUtils.isEmpty) IndyObjectMapper(org.commonjava.indy.model.core.io.IndyObjectMapper) ApiImplicitParam(io.swagger.annotations.ApiImplicitParam) CONFLICT(javax.ws.rs.core.Response.Status.CONFLICT) StoreType(org.commonjava.indy.model.core.StoreType) IndyResources(org.commonjava.indy.bind.jaxrs.IndyResources) ResponseUtils.markDeprecated(org.commonjava.indy.bind.jaxrs.util.ResponseUtils.markDeprecated) Response.notModified(javax.ws.rs.core.Response.notModified) IOUtils(org.apache.commons.io.IOUtils) ApplicationContent(org.commonjava.indy.util.ApplicationContent) List(java.util.List) Response(javax.ws.rs.core.Response) Response.ok(javax.ws.rs.core.Response.ok) ApplicationScoped(javax.enterprise.context.ApplicationScoped) UriInfo(javax.ws.rs.core.UriInfo) ApiImplicitParams(io.swagger.annotations.ApiImplicitParams) HEAD(javax.ws.rs.HEAD) PathParam(javax.ws.rs.PathParam) GET(javax.ws.rs.GET) ApplicationContent.application_json(org.commonjava.indy.util.ApplicationContent.application_json) ApiResponses(io.swagger.annotations.ApiResponses) Inject(javax.inject.Inject) HttpServletRequest(javax.servlet.http.HttpServletRequest) MavenPackageTypeDescriptor(org.commonjava.indy.pkg.maven.model.MavenPackageTypeDescriptor) ResponseUtils.formatOkResponseWithJsonEntity(org.commonjava.indy.bind.jaxrs.util.ResponseUtils.formatOkResponseWithJsonEntity) IndyWorkflowException(org.commonjava.indy.IndyWorkflowException) SecurityManager(org.commonjava.indy.bind.jaxrs.SecurityManager) ResponseUtils.formatCreatedResponseWithJsonEntity(org.commonjava.indy.bind.jaxrs.util.ResponseUtils.formatCreatedResponseWithJsonEntity) Api(io.swagger.annotations.Api) Status(javax.ws.rs.core.Response.Status) JoinString(org.commonjava.maven.atlas.ident.util.JoinString) Logger(org.slf4j.Logger) POST(javax.ws.rs.POST) ArtifactStore(org.commonjava.indy.model.core.ArtifactStore) ResponseUtils.formatResponse(org.commonjava.indy.bind.jaxrs.util.ResponseUtils.formatResponse) METADATA_CHANGELOG(org.commonjava.indy.model.core.ArtifactStore.METADATA_CHANGELOG) IOException(java.io.IOException) Consumer(java.util.function.Consumer) Paths(java.nio.file.Paths) ApiResponse(io.swagger.annotations.ApiResponse) AdminController(org.commonjava.indy.core.ctl.AdminController) PUT(javax.ws.rs.PUT) StoreType(org.commonjava.indy.model.core.StoreType) Response(javax.ws.rs.core.Response) ResponseUtils.formatResponse(org.commonjava.indy.bind.jaxrs.util.ResponseUtils.formatResponse) ApiResponse(io.swagger.annotations.ApiResponse) ArtifactStore(org.commonjava.indy.model.core.ArtifactStore) IndyWorkflowException(org.commonjava.indy.IndyWorkflowException) JoinString(org.commonjava.maven.atlas.ident.util.JoinString) StoreKey(org.commonjava.indy.model.core.StoreKey) Path(javax.ws.rs.Path) Produces(javax.ws.rs.Produces) GET(javax.ws.rs.GET) ApiOperation(io.swagger.annotations.ApiOperation) ApiResponses(io.swagger.annotations.ApiResponses)

Example 48 with ArtifactStore

use of org.commonjava.indy.model.core.ArtifactStore in project indy by Commonjava.

the class DeprecatedStoreAdminHandler method store.

/*
     * (non-Javadoc)
     * @see org.commonjava.indy.core.rest.admin.DeployPointAdminResource#store(java.lang.String)
     */
@ApiOperation("Update an existing store")
@ApiResponses({ @ApiResponse(code = 200, message = "The store was updated"), @ApiResponse(code = 400, message = "The store specified in the body JSON didn't match the URL parameters") })
@ApiImplicitParams({ @ApiImplicitParam(allowMultiple = false, paramType = "body", name = "body", required = true, dataType = "org.commonjava.indy.model.core.ArtifactStore", value = "The artifact store definition JSON") })
@Path("/{name}")
@PUT
@Consumes(ApplicationContent.application_json)
public Response store(@ApiParam(allowableValues = "hosted,group,remote", required = true) @PathParam("type") final String type, @ApiParam(required = true) @PathParam("name") final String name, @Context final HttpServletRequest request, @Context final SecurityContext securityContext) {
    String altPath = Paths.get(MavenPackageTypeDescriptor.MAVEN_ADMIN_REST_BASE_PATH, type, name).toString();
    Consumer<Response.ResponseBuilder> modifier = (rb) -> markDeprecated(rb, altPath);
    final StoreType st = StoreType.get(type);
    Response response = null;
    String json = null;
    try {
        json = IOUtils.toString(request.getInputStream());
        json = objectMapper.patchLegacyStoreJson(json);
    } catch (final IOException e) {
        final String message = "Failed to read " + st.getStoreClass().getSimpleName() + " from request body.";
        logger.error(message, e);
        response = formatResponse(e, message, modifier);
    }
    if (response != null) {
        return response;
    }
    ArtifactStore store = null;
    try {
        store = objectMapper.readValue(json, st.getStoreClass());
    } catch (final IOException e) {
        final String message = "Failed to parse " + st.getStoreClass().getSimpleName() + " from request body.";
        logger.error(message, e);
        response = formatResponse(e, message, modifier);
    }
    if (response != null) {
        return response;
    }
    if (!name.equals(store.getName())) {
        response = markDeprecated(Response.status(Status.BAD_REQUEST).entity(String.format("Store in URL path is: '%s' but in JSON it is: '%s'", name, store.getName())), altPath).build();
    }
    try {
        String user = securityManager.getUser(securityContext, request);
        logger.info("Storing: {}", store);
        if (adminController.store(store, user, false)) {
            response = markDeprecated(ok(), altPath).build();
        } else {
            logger.warn("{} NOT modified!", store);
            response = markDeprecated(notModified(), altPath).build();
        }
    } catch (final IndyWorkflowException e) {
        logger.error(e.getMessage(), e);
        response = formatResponse(e, modifier);
    }
    return response;
}
Also used : Produces(javax.ws.rs.Produces) LoggerFactory(org.slf4j.LoggerFactory) Path(javax.ws.rs.Path) SecurityContext(javax.ws.rs.core.SecurityContext) ApiParam(io.swagger.annotations.ApiParam) StoreListingDTO(org.commonjava.indy.model.core.dto.StoreListingDTO) ApiOperation(io.swagger.annotations.ApiOperation) Consumes(javax.ws.rs.Consumes) Response.noContent(javax.ws.rs.core.Response.noContent) Response.status(javax.ws.rs.core.Response.status) URI(java.net.URI) StoreKey(org.commonjava.indy.model.core.StoreKey) DELETE(javax.ws.rs.DELETE) Context(javax.ws.rs.core.Context) StringUtils.isEmpty(org.apache.commons.lang.StringUtils.isEmpty) IndyObjectMapper(org.commonjava.indy.model.core.io.IndyObjectMapper) ApiImplicitParam(io.swagger.annotations.ApiImplicitParam) CONFLICT(javax.ws.rs.core.Response.Status.CONFLICT) StoreType(org.commonjava.indy.model.core.StoreType) IndyResources(org.commonjava.indy.bind.jaxrs.IndyResources) ResponseUtils.markDeprecated(org.commonjava.indy.bind.jaxrs.util.ResponseUtils.markDeprecated) Response.notModified(javax.ws.rs.core.Response.notModified) IOUtils(org.apache.commons.io.IOUtils) ApplicationContent(org.commonjava.indy.util.ApplicationContent) List(java.util.List) Response(javax.ws.rs.core.Response) Response.ok(javax.ws.rs.core.Response.ok) ApplicationScoped(javax.enterprise.context.ApplicationScoped) UriInfo(javax.ws.rs.core.UriInfo) ApiImplicitParams(io.swagger.annotations.ApiImplicitParams) HEAD(javax.ws.rs.HEAD) PathParam(javax.ws.rs.PathParam) GET(javax.ws.rs.GET) ApplicationContent.application_json(org.commonjava.indy.util.ApplicationContent.application_json) ApiResponses(io.swagger.annotations.ApiResponses) Inject(javax.inject.Inject) HttpServletRequest(javax.servlet.http.HttpServletRequest) MavenPackageTypeDescriptor(org.commonjava.indy.pkg.maven.model.MavenPackageTypeDescriptor) ResponseUtils.formatOkResponseWithJsonEntity(org.commonjava.indy.bind.jaxrs.util.ResponseUtils.formatOkResponseWithJsonEntity) IndyWorkflowException(org.commonjava.indy.IndyWorkflowException) SecurityManager(org.commonjava.indy.bind.jaxrs.SecurityManager) ResponseUtils.formatCreatedResponseWithJsonEntity(org.commonjava.indy.bind.jaxrs.util.ResponseUtils.formatCreatedResponseWithJsonEntity) Api(io.swagger.annotations.Api) Status(javax.ws.rs.core.Response.Status) JoinString(org.commonjava.maven.atlas.ident.util.JoinString) Logger(org.slf4j.Logger) POST(javax.ws.rs.POST) ArtifactStore(org.commonjava.indy.model.core.ArtifactStore) ResponseUtils.formatResponse(org.commonjava.indy.bind.jaxrs.util.ResponseUtils.formatResponse) METADATA_CHANGELOG(org.commonjava.indy.model.core.ArtifactStore.METADATA_CHANGELOG) IOException(java.io.IOException) Consumer(java.util.function.Consumer) Paths(java.nio.file.Paths) ApiResponse(io.swagger.annotations.ApiResponse) AdminController(org.commonjava.indy.core.ctl.AdminController) PUT(javax.ws.rs.PUT) StoreType(org.commonjava.indy.model.core.StoreType) Response(javax.ws.rs.core.Response) ResponseUtils.formatResponse(org.commonjava.indy.bind.jaxrs.util.ResponseUtils.formatResponse) ApiResponse(io.swagger.annotations.ApiResponse) ArtifactStore(org.commonjava.indy.model.core.ArtifactStore) IndyWorkflowException(org.commonjava.indy.IndyWorkflowException) JoinString(org.commonjava.maven.atlas.ident.util.JoinString) IOException(java.io.IOException) Path(javax.ws.rs.Path) ApiImplicitParams(io.swagger.annotations.ApiImplicitParams) Consumes(javax.ws.rs.Consumes) ApiOperation(io.swagger.annotations.ApiOperation) ApiResponses(io.swagger.annotations.ApiResponses) PUT(javax.ws.rs.PUT)

Example 49 with ArtifactStore

use of org.commonjava.indy.model.core.ArtifactStore in project indy by Commonjava.

the class StoreAdminHandler method store.

/*
     * (non-Javadoc)
     * @see org.commonjava.indy.core.rest.admin.DeployPointAdminResource#store(java.lang.String)
     */
@ApiOperation("Update an existing store")
@ApiResponses({ @ApiResponse(code = 200, message = "The store was updated"), @ApiResponse(code = 400, message = "The store specified in the body JSON didn't match the URL parameters") })
@ApiImplicitParams({ @ApiImplicitParam(allowMultiple = false, paramType = "body", name = "body", required = true, dataType = "org.commonjava.indy.model.core.ArtifactStore", value = "The artifact store definition JSON") })
@Path("/{name}")
@PUT
@Consumes(ApplicationContent.application_json)
public Response store(@PathParam("packageType") final String packageType, @ApiParam(allowableValues = "hosted,group,remote", required = true) @PathParam("type") final String type, @ApiParam(required = true) @PathParam("name") final String name, @Context final HttpServletRequest request, @Context final SecurityContext securityContext) {
    final StoreType st = StoreType.get(type);
    Response response = null;
    String json = null;
    try {
        json = IOUtils.toString(request.getInputStream());
        json = objectMapper.patchLegacyStoreJson(json);
    } catch (final IOException e) {
        final String message = "Failed to read " + st.getStoreClass().getSimpleName() + " from request body.";
        logger.error(message, e);
        response = formatResponse(e, message);
    }
    if (response != null) {
        return response;
    }
    ArtifactStore store = null;
    try {
        store = objectMapper.readValue(json, st.getStoreClass());
    } catch (final IOException e) {
        final String message = "Failed to parse " + st.getStoreClass().getSimpleName() + " from request body.";
        logger.error(message, e);
        response = formatResponse(e, message);
    }
    if (response != null) {
        return response;
    }
    if (!packageType.equals(store.getPackageType()) || st != store.getType() || !name.equals(store.getName())) {
        response = Response.status(Status.BAD_REQUEST).entity(String.format("Store in URL path is: '%s' but in JSON it is: '%s'", new StoreKey(packageType, st, name), store.getKey())).build();
    }
    try {
        String user = securityManager.getUser(securityContext, request);
        logger.info("Storing: {}", store);
        if (adminController.store(store, user, false)) {
            response = ok().build();
        } else {
            logger.warn("{} NOT modified!", store);
            response = notModified().build();
        }
    } catch (final IndyWorkflowException e) {
        logger.error(e.getMessage(), e);
        response = formatResponse(e);
    }
    return response;
}
Also used : StoreType(org.commonjava.indy.model.core.StoreType) Response(javax.ws.rs.core.Response) ResponseUtils.formatResponse(org.commonjava.indy.bind.jaxrs.util.ResponseUtils.formatResponse) ApiResponse(io.swagger.annotations.ApiResponse) ArtifactStore(org.commonjava.indy.model.core.ArtifactStore) IndyWorkflowException(org.commonjava.indy.IndyWorkflowException) JoinString(org.commonjava.maven.atlas.ident.util.JoinString) IOException(java.io.IOException) StoreKey(org.commonjava.indy.model.core.StoreKey) Path(javax.ws.rs.Path) ApiImplicitParams(io.swagger.annotations.ApiImplicitParams) Consumes(javax.ws.rs.Consumes) ApiOperation(io.swagger.annotations.ApiOperation) ApiResponses(io.swagger.annotations.ApiResponses) PUT(javax.ws.rs.PUT)

Example 50 with ArtifactStore

use of org.commonjava.indy.model.core.ArtifactStore in project indy by Commonjava.

the class StoreAdminHandler method get.

@ApiOperation("Retrieve the definition of a specific artifact store")
@ApiResponses({ @ApiResponse(code = 200, response = ArtifactStore.class, message = "The store definition"), @ApiResponse(code = 404, message = "The store doesn't exist") })
@Path("/{name}")
@GET
@Produces(ApplicationContent.application_json)
public Response get(@PathParam("packageType") final String packageType, @ApiParam(allowableValues = "hosted,group,remote", required = true) @PathParam("type") final String type, @ApiParam(required = true) @PathParam("name") final String name) {
    final StoreType st = StoreType.get(type);
    final StoreKey key = new StoreKey(packageType, st, name);
    Response response;
    try {
        final ArtifactStore store = adminController.get(key);
        logger.info("Returning repository: {}", store);
        if (store == null) {
            response = Response.status(Status.NOT_FOUND).build();
        } else {
            response = formatOkResponseWithJsonEntity(store, objectMapper);
        }
    } catch (final IndyWorkflowException e) {
        logger.error(e.getMessage(), e);
        response = formatResponse(e);
    }
    return response;
}
Also used : StoreType(org.commonjava.indy.model.core.StoreType) Response(javax.ws.rs.core.Response) ResponseUtils.formatResponse(org.commonjava.indy.bind.jaxrs.util.ResponseUtils.formatResponse) ApiResponse(io.swagger.annotations.ApiResponse) ArtifactStore(org.commonjava.indy.model.core.ArtifactStore) IndyWorkflowException(org.commonjava.indy.IndyWorkflowException) StoreKey(org.commonjava.indy.model.core.StoreKey) Path(javax.ws.rs.Path) Produces(javax.ws.rs.Produces) GET(javax.ws.rs.GET) ApiOperation(io.swagger.annotations.ApiOperation) ApiResponses(io.swagger.annotations.ApiResponses)

Aggregations

ArtifactStore (org.commonjava.indy.model.core.ArtifactStore)93 IndyDataException (org.commonjava.indy.data.IndyDataException)54 StoreKey (org.commonjava.indy.model.core.StoreKey)46 IndyWorkflowException (org.commonjava.indy.IndyWorkflowException)35 Logger (org.slf4j.Logger)30 ArrayList (java.util.ArrayList)25 Transfer (org.commonjava.maven.galley.model.Transfer)25 Group (org.commonjava.indy.model.core.Group)20 StoreType (org.commonjava.indy.model.core.StoreType)19 IOException (java.io.IOException)18 EventMetadata (org.commonjava.maven.galley.event.EventMetadata)17 HashSet (java.util.HashSet)15 List (java.util.List)15 LoggerFactory (org.slf4j.LoggerFactory)11 Inject (javax.inject.Inject)10 StoreDataManager (org.commonjava.indy.data.StoreDataManager)10 RemoteRepository (org.commonjava.indy.model.core.RemoteRepository)10 JoinString (org.commonjava.maven.atlas.ident.util.JoinString)10 Test (org.junit.Test)9 ApiOperation (io.swagger.annotations.ApiOperation)8