public class MavenProjectSwidBuilderHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static SWIDBuilder |
applyEntities(SWIDBuilder builder,
List<Entity> entities)
Append the provided SWID Tag entities to the tag.
|
static void |
applyFileEnties(AbstractResourceCollectionBuilder<?> builder,
String swidTagPath,
List<FileEntry> swidFiles,
Collection<HashAlgorithm> hashAlgorithms)
Apply the provided file entries to the tag's payload.
|
static SWIDBuilder |
applyProjectMetadata(SWIDBuilder builder,
org.apache.maven.project.MavenProject project)
Apply Maven project metadata to populate the core SWID Tag data elements.
|
static SWIDBuilder |
buildSwidTag(org.apache.maven.project.MavenProject project,
String swidTagPath,
List<Entity> entities,
List<FileEntry> swidFiles)
Build a SWID Tag using Maven project metadata and provided Entity and FileEntry information.
|
protected static String |
generateTagId(org.apache.maven.project.MavenProject project) |
public static SWIDBuilder applyProjectMetadata(SWIDBuilder builder, org.apache.maven.project.MavenProject project)
builder - the SWID Tag builderproject - the Maven project instanceprotected static String generateTagId(org.apache.maven.project.MavenProject project)
public static SWIDBuilder applyEntities(SWIDBuilder builder, List<Entity> entities)
builder - the SWID Tag builderentities - the list of entities to appendpublic static void applyFileEnties(AbstractResourceCollectionBuilder<?> builder, String swidTagPath, List<FileEntry> swidFiles, Collection<HashAlgorithm> hashAlgorithms) throws NoSuchAlgorithmException, IOException
builder - the payload's builderswidTagPath - the output path of the tagswidFiles - the files to build payload entries forhashAlgorithms - the hash algorithms to use to calculate file digestsNoSuchAlgorithmException - if a hash algorithm is not supportedIOException - if an error occured while processing the payload filespublic static SWIDBuilder buildSwidTag(org.apache.maven.project.MavenProject project, String swidTagPath, List<Entity> entities, List<FileEntry> swidFiles) throws NoSuchAlgorithmException, IOException
project - the MavenProject to build the tag forswidTagPath - the output path of the tagentities - the SWID Tag entities to includeswidFiles - the files to build payload entries forNoSuchAlgorithmException - if a hash algorithm is not supportedIOException - if an error occured while processing the payload filesCopyright © 2020 National Institute of Standards and Technology. All rights reserved.