@Test public void getZipFailsToFindAsset() { when(dataAccess.findAsset(any(), any(), any())).thenReturn(null); assertThat(underTest.getZip(SOME_PATH), is(nullValue())); verify(dataAccess).findAsset(any(), any(), any()); verifyNoMoreInteractions(dataAccess); }
@TransactionalTouchBlob protected Payload getZip(final String path) { StorageTx tx = UnitOfWork.currentTx(); Asset asset = golangDataAccess.findAsset(tx, tx.findBucket(getRepository()), path); if (asset == null) { log.warn("Unable to find {} for extraction", path); return null; } return golangDataAccess.getBlobAsPayload(tx, asset); }
GolangHostedFacetImpl extends FacetSupport implements GolangHostedFacet { @TransactionalTouchBlob protected Payload getZip(final String path) { StorageTx tx = UnitOfWork.currentTx(); Asset asset = golangDataAccess.findAsset(tx, tx.findBucket(getRepository()), path); if (asset == null) { log.warn("Unable to find {} for extraction", path); return null; } return golangDataAccess.getBlobAsPayload(tx, asset); } }
GolangHostedFacetImpl extends FacetSupport implements GolangHostedFacet { @TransactionalTouchBlob protected Payload getZip(final String path) { StorageTx tx = UnitOfWork.currentTx(); Asset asset = golangDataAccess.findAsset(tx, tx.findBucket(getRepository()), path); if (asset == null) { log.warn("Unable to find {} for extraction", path); return null; } return golangDataAccess.getBlobAsPayload(tx, asset); } @Inject  GolangHostedFacetImpl(final GolangDataAccess golangDataAccess,
                               final CompressedContentExtractor compressedContentExtractor); }
GolangHostedFacetImpl extends FacetSupport implements GolangHostedFacet { @TransactionalTouchBlob protected Payload getZip(final String path) { StorageTx tx = UnitOfWork.currentTx(); Asset asset = golangDataAccess.findAsset(tx, tx.findBucket(getRepository()), path); if (asset == null) { log.warn("Unable to find {} for extraction", path); return null; } return golangDataAccess.getBlobAsPayload(tx, asset); } @Inject  GolangHostedFacetImpl(final GolangDataAccess golangDataAccess,
                               final CompressedContentExtractor compressedContentExtractor); @Override @Nullable @Transactional Content getInfo(final String path,
                         final GolangAttributes golangAttributes); @Transactional @Override Content getList(final String module); @Nullable @TransactionalTouchBlob @Override Content getPackage(final String path); @Nullable @TransactionalTouchBlob @Override Content getMod(final String path); @Override void upload(final String path,
                     final GolangAttributes golangAttributes,
                     final Payload payload,
                     final AssetKind assetKind); }
GolangHostedFacetImpl extends FacetSupport implements GolangHostedFacet { @TransactionalTouchBlob protected Payload getZip(final String path) { StorageTx tx = UnitOfWork.currentTx(); Asset asset = golangDataAccess.findAsset(tx, tx.findBucket(getRepository()), path); if (asset == null) { log.warn("Unable to find {} for extraction", path); return null; } return golangDataAccess.getBlobAsPayload(tx, asset); } @Inject  GolangHostedFacetImpl(final GolangDataAccess golangDataAccess,
                               final CompressedContentExtractor compressedContentExtractor); @Override @Nullable @Transactional Content getInfo(final String path,
                         final GolangAttributes golangAttributes); @Transactional @Override Content getList(final String module); @Nullable @TransactionalTouchBlob @Override Content getPackage(final String path); @Nullable @TransactionalTouchBlob @Override Content getMod(final String path); @Override void upload(final String path,
                     final GolangAttributes golangAttributes,
                     final Payload payload,
                     final AssetKind assetKind);  }