Examples of retrieveItem()


Examples of org.sonatype.nexus.proxy.repository.Repository.retrieveItem()

    Repository repo1 = getRepositoryRegistry().getRepository("repo1");

    // proxy in some content
    // we want some cache content, not interested in result

    repo1.retrieveItem(new ResourceStoreRequest("/activemq/activemq-core/1.2/activemq-core-1.2.jar", false));

    repo1.retrieveItem(new ResourceStoreRequest("/org/slf4j/slf4j-api/1.4.3/slf4j-api-1.4.3.pom", false));

    repo1.retrieveItem(new ResourceStoreRequest("/rome/rome/0.9/rome-0.9.pom", false));
View Full Code Here

Examples of org.sonatype.nexus.proxy.repository.Repository.retrieveItem()

    // proxy in some content
    // we want some cache content, not interested in result

    repo1.retrieveItem(new ResourceStoreRequest("/activemq/activemq-core/1.2/activemq-core-1.2.jar", false));

    repo1.retrieveItem(new ResourceStoreRequest("/org/slf4j/slf4j-api/1.4.3/slf4j-api-1.4.3.pom", false));

    repo1.retrieveItem(new ResourceStoreRequest("/rome/rome/0.9/rome-0.9.pom", false));

    // now mangle the attributes of one of them
    AbstractStorageItem mangledItem = repo1.getLocalStorage().retrieveItem(
View Full Code Here

Examples of org.sonatype.nexus.proxy.repository.Repository.retrieveItem()

    repo1.retrieveItem(new ResourceStoreRequest("/activemq/activemq-core/1.2/activemq-core-1.2.jar", false));

    repo1.retrieveItem(new ResourceStoreRequest("/org/slf4j/slf4j-api/1.4.3/slf4j-api-1.4.3.pom", false));

    repo1.retrieveItem(new ResourceStoreRequest("/rome/rome/0.9/rome-0.9.pom", false));

    // now mangle the attributes of one of them
    AbstractStorageItem mangledItem = repo1.getLocalStorage().retrieveItem(
        repo1,
        new ResourceStoreRequest("/activemq/activemq-core/1.2/activemq-core-1.2.jar", true));
View Full Code Here

Examples of org.sonatype.nexus.proxy.repository.Repository.retrieveItem()

    assertEquals("/activemq/activemq-core/1.2/activemq-core-1.2.jar", evicted.iterator().next());

    // check for removed empty folders too
    // doing localOnly requests to avoid proxying and make sure they are gone too
    try {
      repo1.retrieveItem(new ResourceStoreRequest("/activemq/activemq-core/1.2", true));

      fail("Collection should not exists!");
    }
    catch (ItemNotFoundException e) {
      // fine
View Full Code Here

Examples of org.sonatype.nexus.proxy.repository.Repository.retrieveItem()

    catch (ItemNotFoundException e) {
      // fine
    }

    try {
      repo1.retrieveItem(new ResourceStoreRequest("/activemq/activemq-core", true));

      fail("Collection should not exists!");
    }
    catch (ItemNotFoundException e) {
      // fine
View Full Code Here

Examples of org.sonatype.nexus.proxy.repository.Repository.retrieveItem()

    catch (ItemNotFoundException e) {
      // fine
    }

    try {
      repo1.retrieveItem(new ResourceStoreRequest("/activemq", true));

      fail("Collection should not exists!");
    }
    catch (ItemNotFoundException e) {
      // fine
View Full Code Here

Examples of org.sonatype.nexus.proxy.repository.Repository.retrieveItem()

    DefaultStorageLinkItem link = new DefaultStorageLinkItem(repo1, new ResourceStoreRequest("/b.txt"), true, true, file
        .getRepositoryItemUid());
    repo1.getLocalStorage().storeItem(repo1, link);

    StorageItem item = repo1.retrieveItem(new ResourceStoreRequest("/b.txt", true));
    assertEquals(DefaultStorageLinkItem.class, item.getClass());

    StorageFileItem item1 = (StorageFileItem) repo1.retrieveItem(false, new ResourceStoreRequest(
        ((StorageLinkItem) item).getTarget().getPath(),
        false));
View Full Code Here

Examples of org.sonatype.nexus.proxy.repository.Repository.retrieveItem()

    repo1.getLocalStorage().storeItem(repo1, link);

    StorageItem item = repo1.retrieveItem(new ResourceStoreRequest("/b.txt", true));
    assertEquals(DefaultStorageLinkItem.class, item.getClass());

    StorageFileItem item1 = (StorageFileItem) repo1.retrieveItem(false, new ResourceStoreRequest(
        ((StorageLinkItem) item).getTarget().getPath(),
        false));

    assertStorageFileItem(item1);
    assertTrue(contentEquals(item1.getInputStream(), new ByteArrayInputStream(contentString.getBytes())));
View Full Code Here

Examples of org.sonatype.nexus.proxy.repository.Repository.retrieveItem()

        return null;
      }

      if (delete) {
        try {
          final StorageItem item = repository.retrieveItem(getResourceStoreRequest(request, basePath));
          deleteItem(repository, item);
        }
        catch (ItemNotFoundException e) {
          // that's good
        }
View Full Code Here

Examples of org.sonatype.nexus.proxy.repository.Repository.retrieveItem()

            new ResourceStoreRequest(path);

            request.getRequestContext().put( //
                AccessManager.REQUEST_AUTHORIZED, "true");

            final StorageItem any = repo.retrieveItem(request);

            final boolean isFile = any instanceof StorageFileItem;

            if (!isFile) {
              return;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.