Search in sources :

Example 6 with MAVEN_PKG_KEY

use of org.commonjava.indy.pkg.maven.model.MavenPackageTypeDescriptor.MAVEN_PKG_KEY in project indy by Commonjava.

the class ContentIndexDirLvWithMetadataTest method test.

@Test
public void test() throws Exception {
    final String remoteName1 = newName();
    RemoteRepository remote1 = new RemoteRepository(MAVEN_PKG_KEY, remoteName1, server.formatUrl(remoteName1));
    remote1 = client.stores().create(remote1, name.getMethodName(), RemoteRepository.class);
    final String remoteName2 = newName();
    RemoteRepository remote2 = new RemoteRepository(MAVEN_PKG_KEY, remoteName2, server.formatUrl(remoteName2));
    remote2 = client.stores().create(remote2, name.getMethodName(), RemoteRepository.class);
    final String groupName = newName();
    Group group = new Group(MAVEN_PKG_KEY, groupName, remote1.getKey(), remote2.getKey());
    group = client.stores().create(group, name.getMethodName(), Group.class);
    server.expect(server.formatUrl(remoteName2, PATH_META), 200, PATH_META_CONTENT);
    try (InputStream s = client.content().get(group.getKey(), PATH_META)) {
        assertThat(IOUtils.toString(s), equalTo(PATH_META_CONTENT));
    }
    AdvancedCache<IndexedStorePath, IndexedStorePath> advancedCache = (AdvancedCache) contentIndex.execute(c -> c);
    System.out.println("[Content index DEBUG]: cached isps: " + advancedCache.keySet());
    for (IndexedStorePath value : advancedCache.values()) {
        assertThat(value.getOriginStoreKey(), equalTo(remote2.getKey()));
    }
    System.out.println("[Content index DEBUG]: cache size:" + advancedCache.size());
    System.out.println("[Content index DEBUG]: cache hit:" + advancedCache.getStats().getHits());
    System.out.println("[Content index DEBUG]: cache misses:" + advancedCache.getStats().getMisses());
}
Also used : ExpectationServer(org.commonjava.test.http.expect.ExpectationServer) AbstractIndyFunctionalTest(org.commonjava.indy.ftest.core.AbstractIndyFunctionalTest) Arrays(java.util.Arrays) IndexedStorePath(org.commonjava.indy.content.index.IndexedStorePath) CoreMatchers.equalTo(org.hamcrest.CoreMatchers.equalTo) ContentIndexCacheProducer(org.commonjava.indy.content.index.ContentIndexCacheProducer) CDI(javax.enterprise.inject.spi.CDI) Assert.assertTrue(org.junit.Assert.assertTrue) Test(org.junit.Test) IOException(java.io.IOException) RemoteRepository(org.commonjava.indy.model.core.RemoteRepository) BasicCacheHandle(org.commonjava.indy.subsys.infinispan.BasicCacheHandle) CacheHandle(org.commonjava.indy.subsys.infinispan.CacheHandle) Group(org.commonjava.indy.model.core.Group) Assert.assertThat(org.junit.Assert.assertThat) IOUtils(org.apache.commons.io.IOUtils) List(java.util.List) AdvancedCache(org.infinispan.AdvancedCache) Rule(org.junit.Rule) CoreServerFixture(org.commonjava.indy.test.fixture.core.CoreServerFixture) StoreKey(org.commonjava.indy.model.core.StoreKey) MAVEN_PKG_KEY(org.commonjava.indy.pkg.maven.model.MavenPackageTypeDescriptor.MAVEN_PKG_KEY) Before(org.junit.Before) InputStream(java.io.InputStream) Group(org.commonjava.indy.model.core.Group) InputStream(java.io.InputStream) RemoteRepository(org.commonjava.indy.model.core.RemoteRepository) IndexedStorePath(org.commonjava.indy.content.index.IndexedStorePath) AdvancedCache(org.infinispan.AdvancedCache) AbstractIndyFunctionalTest(org.commonjava.indy.ftest.core.AbstractIndyFunctionalTest) Test(org.junit.Test)

Example 7 with MAVEN_PKG_KEY

use of org.commonjava.indy.pkg.maven.model.MavenPackageTypeDescriptor.MAVEN_PKG_KEY in project indy by Commonjava.

the class ImpliedRepositoryDetector method addImpliedRepositories.

private void addImpliedRepositories(final ImplicationsJob job) {
    job.implied = new ArrayList<>();
    logger.debug("Retrieving repository/pluginRepository declarations from:\n  {}", new JoinString("\n  ", job.pomView.getDocRefStack()));
    final List<List<RepositoryView>> repoLists = Arrays.asList(job.pomView.getNonProfileRepositories(), job.pomView.getAllPluginRepositories());
    final ImpliedRepositoryCreator creator = createRepoCreator();
    if (creator == null) {
        logger.error("Cannot proceed without a valid ImpliedRepositoryCreator instance. Aborting detection.");
        return;
    }
    for (final List<RepositoryView> repos : repoLists) {
        if (repos == null || repos.isEmpty()) {
            continue;
        }
        for (final RepositoryView repo : repos) {
            final ProjectVersionRef gav = job.pathInfo.getProjectId();
            try {
                if (config.isBlacklisted(repo.getUrl())) {
                    logger.debug("Discarding blacklisted repository: {}", repo);
                    continue;
                } else if (!config.isIncludeSnapshotRepos() && !repo.isReleasesEnabled()) {
                    logger.debug("Discarding snapshot repository: {}", repo);
                    continue;
                }
            } catch (final MalformedURLException e) {
                logger.error(String.format("Cannot add implied remote repo: %s from: %s (transfer: %s). Failed to check if repository is blacklisted.", repo.getUrl(), gav, job.transfer), e);
            }
            logger.debug("Detected POM-declared repository: {}", repo);
            List<RemoteRepository> rrs = null;
            try {
                rrs = storeManager.query().getRemoteRepositoryByUrl(MAVEN_PKG_KEY, repo.getUrl());
            } catch (IndyDataException e) {
                logger.error(String.format("Cannot lookup remote repositories by URL: %s. Reason: %s", e.getMessage()), e);
            }
            final RemoteRepository ref = creator.createFrom(gav, repo, LoggerFactory.getLogger(creator.getClass()));
            if (ref == null) {
                logger.warn("ImpliedRepositoryCreator didn't create anything for repo: {}, specified in: {}. Skipping.", repo.getId(), gav);
                continue;
            }
            if (rrs != null && !rrs.isEmpty()) {
                rrs = rrs.stream().filter(rr -> rr.isAllowReleases() == ref.isAllowReleases()).filter(rr -> rr.isAllowSnapshots() == ref.isAllowSnapshots()).filter(rr -> (isEmpty(rr.getPathMaskPatterns()) && isEmpty(ref.getPathMaskPatterns())) || rr.getPathMaskPatterns().equals(ref.getPathMaskPatterns())).collect(Collectors.toList());
            }
            if (rrs == null || rrs.isEmpty()) {
                logger.debug("Creating new RemoteRepository for: {}", repo);
                final RemoteRepository rr = ref.copyOf();
                rr.setMetadata(METADATA_ORIGIN, IMPLIED_REPO_ORIGIN);
                try {
                    rr.setMetadata(IMPLIED_BY_STORES, mapper.writeValueAsString(new ImpliedRepoMetadataManager.ImpliedRemotesWrapper(Collections.singletonList(job.store.getKey()))));
                } catch (JsonProcessingException e) {
                    logger.error("Failed to set {}", IMPLIED_BY_STORES);
                    continue;
                }
                if (!remoteValidator.isValid(rr)) {
                    logger.warn("Implied repository to: {} is invalid! Repository created was: {}", repo.getUrl(), rr);
                    continue;
                }
                final String changelog = String.format("Adding remote repository: %s (url: %s, name: %s), which is implied by the POM: %s (at: %s/%s)", repo.getId(), repo.getUrl(), repo.getName(), gav, job.transfer.getLocation().getUri(), job.transfer.getPath());
                final ChangeSummary summary = new ChangeSummary(ChangeSummary.SYSTEM_USER, changelog);
                try {
                    final boolean result = storeManager.storeArtifactStore(rr, summary, true, false, new EventMetadata().set(StoreDataManager.EVENT_ORIGIN, IMPLIED_REPOS_DETECTION).set(IMPLIED_BY_POM_TRANSFER, job.transfer));
                    logger.debug("Stored new RemoteRepository: {}. (successful? {})", rr, result);
                    job.implied.add(rr);
                } catch (final IndyDataException e) {
                    logger.error(String.format("Cannot add implied remote repo: %s from: %s (transfer: %s). Failed to store new remote repository.", repo.getUrl(), gav, job.transfer), e);
                }
            } else {
                logger.debug("Found existing RemoteRepositories: {}", rrs);
                for (final RemoteRepository rr : rrs) {
                    rr.setMetadata(METADATA_ORIGIN, IMPLIED_REPO_ORIGIN);
                    try {
                        metadataManager.updateImpliedBy(rr, job.store);
                    } catch (ImpliedReposException e) {
                        logger.error("Failed to set {}", IMPLIED_BY_STORES);
                        continue;
                    }
                    final String changelog = String.format("Updating the existing remote repository: %s (url: %s, name: %s), which is implied by the POM: %s (at: %s/%s)", repo.getId(), repo.getUrl(), repo.getName(), gav, job.transfer.getLocation().getUri(), job.transfer.getPath());
                    final ChangeSummary summary = new ChangeSummary(ChangeSummary.SYSTEM_USER, changelog);
                    try {
                        final boolean result = storeManager.storeArtifactStore(rr, summary, false, false, null);
                        logger.debug("Updated the RemoteRepository: {}. (successful? {})", rr, result);
                        job.implied.add(rr);
                    } catch (final IndyDataException e) {
                        logger.error(String.format("Cannot add implied remote repo: %s from: %s (transfer: %s). Failed to update the remote repository.", repo.getUrl(), gav, job.transfer), e);
                    }
                }
            }
        }
    }
}
Also used : Arrays(java.util.Arrays) KeyedLocation(org.commonjava.indy.model.galley.KeyedLocation) ChangeSummary(org.commonjava.indy.audit.ChangeSummary) LoggerFactory(org.slf4j.LoggerFactory) RemoteRepository(org.commonjava.indy.model.core.RemoteRepository) StringUtils(org.apache.commons.lang3.StringUtils) WeftManaged(org.commonjava.cdi.util.weft.WeftManaged) FileStorageEvent(org.commonjava.maven.galley.event.FileStorageEvent) MavenPomReader(org.commonjava.maven.galley.maven.parse.MavenPomReader) Observes(javax.enterprise.event.Observes) ArtifactStoreValidator(org.commonjava.indy.data.ArtifactStoreValidator) CoreEventManagerConstants(org.commonjava.indy.change.event.CoreEventManagerConstants) ImpliedReposException(org.commonjava.indy.implrepo.ImpliedReposException) StoreKey(org.commonjava.indy.model.core.StoreKey) MAVEN_PKG_KEY(org.commonjava.indy.pkg.maven.model.MavenPackageTypeDescriptor.MAVEN_PKG_KEY) ArtifactPathInfo(org.commonjava.atlas.maven.ident.util.ArtifactPathInfo) IndyGroovyException(org.commonjava.indy.subsys.template.IndyGroovyException) IndyObjectMapper(org.commonjava.indy.model.core.io.IndyObjectMapper) Collection(java.util.Collection) IMPLIED_REPO_ORIGIN(org.commonjava.indy.implrepo.data.ImpliedReposStoreDataManagerDecorator.IMPLIED_REPO_ORIGIN) METADATA_ORIGIN(org.commonjava.indy.model.core.ArtifactStore.METADATA_ORIGIN) Set(java.util.Set) Collectors(java.util.stream.Collectors) List(java.util.List) EventMetadata(org.commonjava.maven.galley.event.EventMetadata) IndyDataException(org.commonjava.indy.data.IndyDataException) MavenPomView(org.commonjava.maven.galley.maven.model.view.MavenPomView) ProjectVersionRef(org.commonjava.atlas.maven.ident.ref.ProjectVersionRef) IMPLIED_BY_STORES(org.commonjava.indy.implrepo.data.ImpliedRepoMetadataManager.IMPLIED_BY_STORES) JoinString(org.commonjava.atlas.maven.ident.util.JoinString) Group(org.commonjava.indy.model.core.Group) GalleyMavenException(org.commonjava.maven.galley.maven.GalleyMavenException) ArrayList(java.util.ArrayList) Inject(javax.inject.Inject) Transfer(org.commonjava.maven.galley.model.Transfer) RepositoryView(org.commonjava.maven.galley.maven.model.view.RepositoryView) ImpliedRepoConfig(org.commonjava.indy.implrepo.conf.ImpliedRepoConfig) ExecutorConfig(org.commonjava.cdi.util.weft.ExecutorConfig) IMPLIED_STORES(org.commonjava.indy.implrepo.data.ImpliedRepoMetadataManager.IMPLIED_STORES) Location(org.commonjava.maven.galley.model.Location) ExecutorService(java.util.concurrent.ExecutorService) Logger(org.slf4j.Logger) ArtifactStore(org.commonjava.indy.model.core.ArtifactStore) MalformedURLException(java.net.MalformedURLException) Executor(java.util.concurrent.Executor) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException) ScriptEngine(org.commonjava.indy.subsys.template.ScriptEngine) ImpliedRepoMetadataManager(org.commonjava.indy.implrepo.data.ImpliedRepoMetadataManager) Collections(java.util.Collections) StoreDataManager(org.commonjava.indy.data.StoreDataManager) MalformedURLException(java.net.MalformedURLException) RemoteRepository(org.commonjava.indy.model.core.RemoteRepository) JoinString(org.commonjava.atlas.maven.ident.util.JoinString) RepositoryView(org.commonjava.maven.galley.maven.model.view.RepositoryView) EventMetadata(org.commonjava.maven.galley.event.EventMetadata) IndyDataException(org.commonjava.indy.data.IndyDataException) JoinString(org.commonjava.atlas.maven.ident.util.JoinString) ProjectVersionRef(org.commonjava.atlas.maven.ident.ref.ProjectVersionRef) List(java.util.List) ArrayList(java.util.ArrayList) ChangeSummary(org.commonjava.indy.audit.ChangeSummary) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException) ImpliedReposException(org.commonjava.indy.implrepo.ImpliedReposException)

Example 8 with MAVEN_PKG_KEY

use of org.commonjava.indy.pkg.maven.model.MavenPackageTypeDescriptor.MAVEN_PKG_KEY in project indy by Commonjava.

the class NfcResource method deprecatedGetStore.

@Path("/{type: (hosted|group|remote)}/{name}")
@ApiOperation("[Deprecated] Retrieve all not-found cache entries currently tracked for a given store")
@ApiResponses({ @ApiResponse(code = 200, response = NotFoundCacheDTO.class, message = "The not-found cache for the specified artifact store") })
@GET
@Produces(ApplicationContent.application_json)
public Response deprecatedGetStore(@ApiParam(allowableValues = "hosted,group,remote", name = "type", required = true, value = "The type of store") @PathParam("type") final String t, @ApiParam(name = "name", value = "The name of the store") @PathParam("name") final String name, @ApiParam(name = "pageIndex", value = "page index") @QueryParam("pageIndex") final Integer pageIndex, @ApiParam(name = "pageSize", value = "page size") @QueryParam("pageSize") final Integer pageSize) {
    Response response;
    final StoreType type = StoreType.get(t);
    String altPath = Paths.get("/api/nfc", MAVEN_PKG_KEY, type.singularEndpointName(), name).toString();
    final StoreKey key = new StoreKey(type, name);
    try {
        NotFoundCacheDTO dto;
        Page page = new Page(pageIndex, pageSize);
        if (page != null && page.allowPaging()) {
            Pagination<NotFoundCacheDTO> nfcPagination = controller.getMissing(key, page);
            dto = nfcPagination.getCurrData();
        } else {
            dto = controller.getMissing(key);
        }
        response = responseHelper.formatOkResponseWithJsonEntity(dto, rb -> responseHelper.markDeprecated(rb, altPath));
    } catch (final IndyWorkflowException e) {
        response = responseHelper.formatResponse(e, (rb) -> responseHelper.markDeprecated(rb, altPath));
    }
    return response;
}
Also used : Response(javax.ws.rs.core.Response) ApiResponse(io.swagger.annotations.ApiResponse) StoreType(org.commonjava.indy.model.core.StoreType) PathParam(javax.ws.rs.PathParam) REST(org.commonjava.indy.bind.jaxrs.util.REST) NfcController(org.commonjava.indy.core.ctl.NfcController) Produces(javax.ws.rs.Produces) GET(javax.ws.rs.GET) Pagination(org.commonjava.indy.core.model.Pagination) LoggerFactory(org.slf4j.LoggerFactory) Path(javax.ws.rs.Path) ApiParam(io.swagger.annotations.ApiParam) ApiResponses(io.swagger.annotations.ApiResponses) Inject(javax.inject.Inject) ApiOperation(io.swagger.annotations.ApiOperation) QueryParam(javax.ws.rs.QueryParam) IndyWorkflowException(org.commonjava.indy.IndyWorkflowException) Api(io.swagger.annotations.Api) StoreKey(org.commonjava.indy.model.core.StoreKey) MAVEN_PKG_KEY(org.commonjava.indy.pkg.maven.model.MavenPackageTypeDescriptor.MAVEN_PKG_KEY) DELETE(javax.ws.rs.DELETE) NotFoundCacheDTO(org.commonjava.indy.model.core.dto.NotFoundCacheDTO) Logger(org.slf4j.Logger) ResponseHelper(org.commonjava.indy.bind.jaxrs.util.ResponseHelper) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) StoreType(org.commonjava.indy.model.core.StoreType) IndyResources(org.commonjava.indy.bind.jaxrs.IndyResources) NotFoundCacheInfoDTO(org.commonjava.indy.model.core.dto.NotFoundCacheInfoDTO) ApplicationContent(org.commonjava.indy.util.ApplicationContent) Response(javax.ws.rs.core.Response) StringUtils.isBlank(org.apache.commons.lang3.StringUtils.isBlank) Paths(java.nio.file.Paths) ApiResponse(io.swagger.annotations.ApiResponse) Page(org.commonjava.indy.core.model.Page) IndyWorkflowException(org.commonjava.indy.IndyWorkflowException) Page(org.commonjava.indy.core.model.Page) StoreKey(org.commonjava.indy.model.core.StoreKey) NotFoundCacheDTO(org.commonjava.indy.model.core.dto.NotFoundCacheDTO) 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 9 with MAVEN_PKG_KEY

use of org.commonjava.indy.pkg.maven.model.MavenPackageTypeDescriptor.MAVEN_PKG_KEY in project indy by Commonjava.

the class SchedulerHandler method deprecatedGetStoreDisableTimeout.

@ApiOperation("[Deprecated] Retrieve the expiration information related to re-enablement of a repository")
@ApiResponses({ @ApiResponse(code = 200, message = "Expiration information retrieved successfully.", response = Expiration.class), @ApiResponse(code = 400, message = "Store is manually disabled (doesn't automatically re-enable), or isn't disabled.") })
@Path("store/{type: (hosted|group|remote)}/{name}/disable-timeout")
@GET
@Deprecated
public Response deprecatedGetStoreDisableTimeout(@ApiParam(allowableValues = "hosted,group,remote", required = true) @PathParam("type") String storeType, @ApiParam(required = true) @PathParam("name") String storeName) {
    StoreType type = StoreType.get(storeType);
    String altPath = Paths.get("/api/admin/schedule", MAVEN_PKG_KEY, type.singularEndpointName(), storeName).toString();
    StoreKey storeKey = new StoreKey(type, storeName);
    Expiration timeout = null;
    try {
        timeout = controller.getStoreDisableTimeout(storeKey);
        if (timeout == null) {
            throw new WebApplicationException(Response.Status.NOT_FOUND);
        }
        return responseHelper.formatOkResponseWithJsonEntity(timeout, rb -> responseHelper.markDeprecated(rb, altPath));
    } catch (IndyWorkflowException e) {
        responseHelper.throwError(e, rb -> responseHelper.markDeprecated(rb, altPath));
    }
    return null;
}
Also used : StoreType(org.commonjava.indy.model.core.StoreType) PathParam(javax.ws.rs.PathParam) REST(org.commonjava.indy.bind.jaxrs.util.REST) Produces(javax.ws.rs.Produces) GET(javax.ws.rs.GET) Path(javax.ws.rs.Path) ApiParam(io.swagger.annotations.ApiParam) ApiResponses(io.swagger.annotations.ApiResponses) Inject(javax.inject.Inject) ApiOperation(io.swagger.annotations.ApiOperation) IndyWorkflowException(org.commonjava.indy.IndyWorkflowException) Api(io.swagger.annotations.Api) StoreKey(org.commonjava.indy.model.core.StoreKey) MAVEN_PKG_KEY(org.commonjava.indy.pkg.maven.model.MavenPackageTypeDescriptor.MAVEN_PKG_KEY) ExpirationSet(org.commonjava.indy.core.expire.ExpirationSet) ResponseHelper(org.commonjava.indy.bind.jaxrs.util.ResponseHelper) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) Expiration(org.commonjava.indy.core.expire.Expiration) StoreType(org.commonjava.indy.model.core.StoreType) IndyResources(org.commonjava.indy.bind.jaxrs.IndyResources) ApplicationContent(org.commonjava.indy.util.ApplicationContent) Response(javax.ws.rs.core.Response) SchedulerController(org.commonjava.indy.core.ctl.SchedulerController) Paths(java.nio.file.Paths) ApiResponse(io.swagger.annotations.ApiResponse) WebApplicationException(javax.ws.rs.WebApplicationException) WebApplicationException(javax.ws.rs.WebApplicationException) IndyWorkflowException(org.commonjava.indy.IndyWorkflowException) Expiration(org.commonjava.indy.core.expire.Expiration) StoreKey(org.commonjava.indy.model.core.StoreKey) Path(javax.ws.rs.Path) GET(javax.ws.rs.GET) ApiOperation(io.swagger.annotations.ApiOperation) ApiResponses(io.swagger.annotations.ApiResponses)

Example 10 with MAVEN_PKG_KEY

use of org.commonjava.indy.pkg.maven.model.MavenPackageTypeDescriptor.MAVEN_PKG_KEY in project indy by Commonjava.

the class DeprecatedFoloContentAccessResource method doCreate.

@ApiOperation("Store and track file/artifact content under the given artifact store (type/name) and path.")
@ApiResponses({ @ApiResponse(code = 201, message = "Content was stored successfully"), @ApiResponse(code = 400, message = "No appropriate storage location was found in the specified store (this store, or a member if a group is specified).") })
@PUT
@Path("/{path: (.*)}")
public Response doCreate(@ApiParam("User-assigned tracking session key") @PathParam("id") final String id, @ApiParam(allowableValues = "hosted,group,remote", required = true) @PathParam("type") final String type, @PathParam("name") final String name, @PathParam("path") final String path, @Context final HttpServletRequest request, @Context final UriInfo uriInfo) {
    final TrackingKey tk = new TrackingKey(id);
    EventMetadata metadata = new EventMetadata().set(TRACKING_KEY, tk).set(ACCESS_CHANNEL, AccessChannel.MAVEN_REPO);
    final Supplier<URI> uriSupplier = () -> uriInfo.getBaseUriBuilder().path(getClass()).path(path).build(id, type, name);
    final Consumer<Response.ResponseBuilder> deprecation = builder -> {
        String alt = Paths.get("/api/folo/track/", id, MAVEN_PKG_KEY, type, name, path).toString();
        responseHelper.markDeprecated(builder, alt);
    };
    return handler.doCreate(MAVEN_PKG_KEY, type, name, path, request, metadata, uriSupplier, deprecation);
}
Also used : PathParam(javax.ws.rs.PathParam) IndyDeployment(org.commonjava.indy.bind.jaxrs.IndyDeployment) REST(org.commonjava.indy.bind.jaxrs.util.REST) CHECK_CACHE_ONLY(org.commonjava.indy.IndyContentConstants.CHECK_CACHE_ONLY) GET(javax.ws.rs.GET) LoggerFactory(org.slf4j.LoggerFactory) Path(javax.ws.rs.Path) ApiParam(io.swagger.annotations.ApiParam) ApiResponses(io.swagger.annotations.ApiResponses) Supplier(java.util.function.Supplier) Inject(javax.inject.Inject) ApiOperation(io.swagger.annotations.ApiOperation) TrackingKey(org.commonjava.indy.folo.model.TrackingKey) HttpServletRequest(javax.servlet.http.HttpServletRequest) QueryParam(javax.ws.rs.QueryParam) Api(io.swagger.annotations.Api) URI(java.net.URI) ACCESS_CHANNEL(org.commonjava.indy.folo.ctl.FoloConstants.ACCESS_CHANNEL) MAVEN_PKG_KEY(org.commonjava.indy.pkg.maven.model.MavenPackageTypeDescriptor.MAVEN_PKG_KEY) Logger(org.slf4j.Logger) Context(javax.ws.rs.core.Context) ContentAccessHandler(org.commonjava.indy.core.bind.jaxrs.ContentAccessHandler) ResponseHelper(org.commonjava.indy.bind.jaxrs.util.ResponseHelper) IndyResources(org.commonjava.indy.bind.jaxrs.IndyResources) AccessChannel(org.commonjava.indy.model.core.AccessChannel) StreamingOutput(javax.ws.rs.core.StreamingOutput) Consumer(java.util.function.Consumer) Response(javax.ws.rs.core.Response) Paths(java.nio.file.Paths) TRACKING_KEY(org.commonjava.indy.folo.ctl.FoloConstants.TRACKING_KEY) ApiResponse(io.swagger.annotations.ApiResponse) EventMetadata(org.commonjava.maven.galley.event.EventMetadata) PUT(javax.ws.rs.PUT) UriInfo(javax.ws.rs.core.UriInfo) HEAD(javax.ws.rs.HEAD) URI(java.net.URI) TrackingKey(org.commonjava.indy.folo.model.TrackingKey) EventMetadata(org.commonjava.maven.galley.event.EventMetadata) Path(javax.ws.rs.Path) ApiOperation(io.swagger.annotations.ApiOperation) ApiResponses(io.swagger.annotations.ApiResponses) PUT(javax.ws.rs.PUT)

Aggregations

MAVEN_PKG_KEY (org.commonjava.indy.pkg.maven.model.MavenPackageTypeDescriptor.MAVEN_PKG_KEY)10 Inject (javax.inject.Inject)7 Api (io.swagger.annotations.Api)6 ApiOperation (io.swagger.annotations.ApiOperation)6 ApiParam (io.swagger.annotations.ApiParam)6 ApiResponse (io.swagger.annotations.ApiResponse)6 ApiResponses (io.swagger.annotations.ApiResponses)6 Paths (java.nio.file.Paths)6 GET (javax.ws.rs.GET)6 Path (javax.ws.rs.Path)6 PathParam (javax.ws.rs.PathParam)6 Response (javax.ws.rs.core.Response)6 IndyResources (org.commonjava.indy.bind.jaxrs.IndyResources)6 StoreKey (org.commonjava.indy.model.core.StoreKey)6 QueryParam (javax.ws.rs.QueryParam)4 IOException (java.io.IOException)3 InputStream (java.io.InputStream)3 URI (java.net.URI)3 Arrays (java.util.Arrays)3 List (java.util.List)3