@Test public void testAssetExists() { when(assetEntityAdapter.exists(db, EXISTING_ASSET_NAME, bucket)).thenReturn(EXISTS); when(assetEntityAdapter.exists(db, NON_EXISTENT_ASSET_NAME, bucket)).thenReturn(!EXISTS); assertTrue("Asset should exist", underTest.assetExists(EXISTING_ASSET_NAME)); assertFalse("Asset should not exist", underTest.assetExists(NON_EXISTENT_ASSET_NAME)); }
@Override @Transactional public boolean assetExists(final String name) { StorageTx tx = UnitOfWork.currentTx(); return assetEntityAdapter.exists(tx.getDb(), name, tx.findBucket(getRepository())); }
RawContentFacetImpl extends FacetSupport implements RawContentFacet { @Override @Transactional public boolean assetExists(final String name) { StorageTx tx = UnitOfWork.currentTx(); return assetEntityAdapter.exists(tx.getDb(), name, tx.findBucket(getRepository())); } }
RawContentFacetImpl extends FacetSupport implements RawContentFacet { @Override @Transactional public boolean assetExists(final String name) { StorageTx tx = UnitOfWork.currentTx(); return assetEntityAdapter.exists(tx.getDb(), name, tx.findBucket(getRepository())); } @Inject  RawContentFacetImpl(final AssetEntityAdapter assetEntityAdapter); }
RawContentFacetImpl extends FacetSupport implements RawContentFacet { @Override @Transactional public boolean assetExists(final String name) { StorageTx tx = UnitOfWork.currentTx(); return assetEntityAdapter.exists(tx.getDb(), name, tx.findBucket(getRepository())); } @Inject  RawContentFacetImpl(final AssetEntityAdapter assetEntityAdapter); @Nullable @Override @TransactionalTouchBlob Content get(final String path); @Override Content put(final String path, final Payload content); @Override @TransactionalStoreBlob Asset put(final String path, final AssetBlob assetBlob, @Nullable final AttributesMap contentAttributes); @TransactionalStoreMetadata Asset getOrCreateAsset(final Repository repository, final String componentName, final String componentGroup,
                                final String assetName); @Override @TransactionalDeleteBlob boolean delete(final String path); @Override @TransactionalTouchMetadata void setCacheInfo(final String path, final Content content, final CacheInfo cacheInfo); @Override @Transactional boolean assetExists(final String name); }
RawContentFacetImpl extends FacetSupport implements RawContentFacet { @Override @Transactional public boolean assetExists(final String name) { StorageTx tx = UnitOfWork.currentTx(); return assetEntityAdapter.exists(tx.getDb(), name, tx.findBucket(getRepository())); } @Inject  RawContentFacetImpl(final AssetEntityAdapter assetEntityAdapter); @Nullable @Override @TransactionalTouchBlob Content get(final String path); @Override Content put(final String path, final Payload content); @Override @TransactionalStoreBlob Asset put(final String path, final AssetBlob assetBlob, @Nullable final AttributesMap contentAttributes); @TransactionalStoreMetadata Asset getOrCreateAsset(final Repository repository, final String componentName, final String componentGroup,
                                final String assetName); @Override @TransactionalDeleteBlob boolean delete(final String path); @Override @TransactionalTouchMetadata void setCacheInfo(final String path, final Content content, final CacheInfo cacheInfo); @Override @Transactional boolean assetExists(final String name);  }