use of org.sonatype.nexus.repository.transaction.TransactionalStoreBlob in project nexus-repository-r by sonatype-nexus-community.
the class RProxyFacetImpl method doPutMetadata.
@TransactionalStoreBlob
protected Content doPutMetadata(final String path, final TempBlob packagesContent, final Payload payload) throws IOException {
StorageTx tx = UnitOfWork.currentTx();
RFacet rFacet = facet(RFacet.class);
Asset asset = rFacet.findOrCreateAsset(tx, path);
return saveAsset(tx, asset, packagesContent, payload);
}
use of org.sonatype.nexus.repository.transaction.TransactionalStoreBlob in project nexus-repository-r by sonatype-nexus-community.
the class RProxyFacetImpl method doPutArchive.
@TransactionalStoreBlob
protected Content doPutArchive(final String path, final TempBlob archiveContent, final Content content) throws IOException {
RFacet rFacet = facet(RFacet.class);
StorageTx tx = UnitOfWork.currentTx();
Map<String, String> attributes;
try (InputStream is = archiveContent.get()) {
attributes = extractDescriptionFromArchive(path, is);
}
Component component = rFacet.findOrCreateComponent(tx, path, attributes);
Asset asset = rFacet.findOrCreateAsset(tx, component, path, attributes);
return saveAsset(tx, asset, archiveContent, content);
}
Aggregations