Class InternalFileFossDatastore
java.lang.Object
uk.yetanother.dependency.report.datastore.InternalFileFossDatastore
- All Implemented Interfaces:
IFossDatastore
The FOSS Datastore implementation that holds the data as a CSV file within the filesystem.
-
Constructor Summary
ConstructorsConstructorDescriptionInternalFileFossDatastore(org.apache.maven.plugin.logging.Log logger) Instantiates a new Internal file FOSS datastore. -
Method Summary
Modifier and TypeMethodDescriptionbooleanClears the datastore, completely removing any additional data the plugin held.voidcreateDatastore(Path fileToLoad) Creates the datastore using the data in the provided datafile.String[]Get additional attribute headings that have been provided and need to be added to the basic report.String[]Get additional attributes for FOSS item.static PathbooleanIs datastore empty.voidupdateDatastore(Path fileToLoad, boolean overrideExisting) Updates the datastore using.
-
Constructor Details
-
InternalFileFossDatastore
public InternalFileFossDatastore(org.apache.maven.plugin.logging.Log logger) throws org.apache.maven.plugin.MojoExecutionException Instantiates a new Internal file FOSS datastore.- Parameters:
logger- the logger- Throws:
org.apache.maven.plugin.MojoExecutionException
-
-
Method Details
-
getDatastoreLocation
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getAdditionalAttributeHeadings
Description copied from interface:IFossDatastoreGet additional attribute headings that have been provided and need to be added to the basic report.- Specified by:
getAdditionalAttributeHeadingsin interfaceIFossDatastore- Returns:
- the string [ ] of the additional headings in the ordered provided
-
getAdditionalAttributesForFossItem
Description copied from interface:IFossDatastoreGet additional attributes for FOSS item. Based on the FOSS Id ID provided lookup in the datastore for additional details held.- Specified by:
getAdditionalAttributesForFossItemin interfaceIFossDatastore- Parameters:
fossId- the FOSS item id- Returns:
- the string [ ] returns the additional attributes in the same order as the additional headings or an array of null strings if the datastore does not have any more details for this FOSS item.
-
createDatastore
Description copied from interface:IFossDatastoreCreates the datastore using the data in the provided datafile. If a datastore already exists it will be replaced.- Specified by:
createDatastorein interfaceIFossDatastore- Parameters:
fileToLoad- the datafile to use- Throws:
org.apache.maven.plugin.MojoExecutionException
-
updateDatastore
public void updateDatastore(Path fileToLoad, boolean overrideExisting) throws org.apache.maven.plugin.MojoExecutionException Description copied from interface:IFossDatastoreUpdates the datastore using. the data in the provided datafile. This maintains existing datastore and add or updates data to it.- Specified by:
updateDatastorein interfaceIFossDatastore- Parameters:
fileToLoad- the datafile to useoverrideExisting- whether to update existing datastore records with the data in the provided datafile or not.- Throws:
org.apache.maven.plugin.MojoExecutionException
-
clearDatastore
public boolean clearDatastore() throws org.apache.maven.plugin.MojoExecutionExceptionDescription copied from interface:IFossDatastoreClears the datastore, completely removing any additional data the plugin held.- Specified by:
clearDatastorein interfaceIFossDatastore- Returns:
- whether the datastore was deleted or not
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
isDatastoreEmpty
public boolean isDatastoreEmpty()Description copied from interface:IFossDatastoreIs datastore empty.- Specified by:
isDatastoreEmptyin interfaceIFossDatastore- Returns:
- true if the datastore is empty or not initialized, false if not.
-