Examples of BlobId


Examples of org.sonatype.nexus.blobstore.api.BlobId

        metrics.getCreationTime().isAfter(new DateTime().minusSeconds(2)));
  }

  @Test
  public void getExistingBlob() throws Exception {
    final BlobId fakeId = new BlobId("fakeId");
    final BlobMetadata metadata = mock(BlobMetadata.class);
    when(metadataStore.get(fakeId)).thenReturn(metadata);
    when(metadata.isAlive()).thenReturn(true);
    when(metadata.getMetrics()).thenReturn(mock(BlobMetrics.class));
View Full Code Here

Examples of org.sonatype.nexus.blobstore.api.BlobId

    assertThat(blob.getId(), is(equalTo(fakeId)));
  }

  @Test
  public void deletingMarksAsDeleted() {
    final BlobId fakeId = new BlobId("fakeId");
    final BlobMetadata metadata = mock(BlobMetadata.class);
    when(metadataStore.get(fakeId)).thenReturn(metadata);

    // The blob isn't already deleted
    when(metadata.isAlive()).thenReturn(true);
View Full Code Here

Examples of org.sonatype.nexus.blobstore.api.BlobId

    verify(metadata).setBlobState(BlobState.MARKED_FOR_DELETION);
  }

  @Test
  public void secondDeletionRedundant() {
    final BlobId fakeId = new BlobId("testId");
    final BlobMetadata metadata = mock(BlobMetadata.class);
    when(metadataStore.get(fakeId)).thenReturn(metadata);
    when(metadata.isAlive()).thenReturn(false);

    final boolean deleted = underTest.delete(fakeId);
View Full Code Here

Examples of org.sonatype.nexus.blobstore.api.BlobId

      List<RawBinary> binaries = new ArrayList<>();

      for (ODocument document : db.command(query).<List<ODocument>>execute(prefix + "%")) {
        final RawBinaryMetadata metadata = entityAdapter.read(document);

        final Blob blob = blobStore.get(new BlobId(metadata.getBlobId()));

        binaries.add(asRawBinary(metadata, blob));
      }

      return binaries;
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.