Search in sources :

Example 1 with RestoreBlobData

use of org.sonatype.nexus.blobstore.restore.RestoreBlobData in project nexus-repository-r by sonatype-nexus-community.

the class RRestoreBlobStrategy method getComponentQuery.

@Override
protected Query getComponentQuery(final RRestoreBlobData data) throws IOException {
    RRestoreFacet facet = getRestoreFacet(data);
    RestoreBlobData blobData = data.getBlobData();
    Map<String, String> attributes;
    try (InputStream inputStream = blobData.getBlob().getInputStream()) {
        attributes = facet.extractComponentAttributesFromArchive(blobData.getBlobName(), inputStream);
    }
    return facet.getComponentQuery(attributes);
}
Also used : InputStream(java.io.InputStream) RestoreBlobData(org.sonatype.nexus.blobstore.restore.RestoreBlobData) RRestoreFacet(org.sonatype.nexus.repository.r.RRestoreFacet)

Aggregations

InputStream (java.io.InputStream)1 RestoreBlobData (org.sonatype.nexus.blobstore.restore.RestoreBlobData)1 RRestoreFacet (org.sonatype.nexus.repository.r.RRestoreFacet)1