Package org.apache.ant.cyclonedx
Class SbomLinkComponentResolver
- java.lang.Object
-
- org.apache.tools.ant.ProjectComponent
-
- org.apache.tools.ant.types.DataType
-
- org.apache.tools.ant.types.resources.BaseResourceCollectionContainer
-
- org.apache.tools.ant.types.resources.Union
-
- org.apache.ant.cyclonedx.SbomLinkComponentResolver
-
- All Implemented Interfaces:
java.lang.Cloneable,java.lang.Iterable<org.apache.tools.ant.types.Resource>,ComponentResolver,org.apache.tools.ant.types.ResourceCollection,org.apache.tools.ant.types.resources.AppendableResourceCollection
public class SbomLinkComponentResolver extends org.apache.tools.ant.types.resources.Union implements ComponentResolver
Reads a linked SBOM and configures the component containing the link.- Since:
- CycloneDX Antlib 0.2
-
-
Constructor Summary
Constructors Constructor Description SbomLinkComponentResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<Component>resolve(Component parent)Configures the given component and only adds dependencies if the component doesn't already know about any dependencies itself.voidsetCreateBomExternalReference(boolean create)Whether to create a bom-Type external reference in the resolved component based on the nested resource's URI.-
Methods inherited from class org.apache.tools.ant.types.resources.Union
getAllResources, getAllToStrings, getCollection, getCollection, getInstance, list, listResources
-
Methods inherited from class org.apache.tools.ant.types.resources.BaseResourceCollectionContainer
add, addAll, clear, clone, dieOnCircularReference, getResourceCollections, isCache, isFilesystemOnly, iterator, setCache, size, toString
-
Methods inherited from class org.apache.tools.ant.types.DataType
checkAttributesAllowed, checkChildrenAllowed, circularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, setRefid, tooManyAttributes
-
Methods inherited from class org.apache.tools.ant.ProjectComponent
getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
-
-
-
-
Method Detail
-
setCreateBomExternalReference
public void setCreateBomExternalReference(boolean create)
Whether to create a bom-Type external reference in the resolved component based on the nested resource's URI.Will not create an external reference of there are already external references om the component or the resolved SBOM already contains a bom-type reference.
Defaults to
true.- Parameters:
create- whether to create a bom-Type external reference
-
resolve
public java.util.Collection<Component> resolve(Component parent) throws java.io.IOException, org.apache.tools.ant.BuildException
Configures the given component and only adds dependencies if the component doesn't already know about any dependencies itself.- Specified by:
resolvein interfaceComponentResolver- Parameters:
parent- component the link applies to- Returns:
- Components that are direct dependencies of the parent component
- Throws:
java.io.IOException- if resolution failsorg.apache.tools.ant.BuildException
-
-