class RHostedFacetImpl extends FacetSupport implements RHostedFacet {

  @TransactionalStoreBlob
  protected Asset doPutArchive(final String path,
                               final TempBlob archiveContent,
                               final Payload payload) throws IOException
  {

    StorageTx tx = UnitOfWork.currentTx();
    RFacet rFacet = facet(RFacet.class);

    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);
    saveAsset(tx, asset, archiveContent, payload);

    return asset;
  }

}