Interface IFossDatastore
- All Known Implementing Classes:
InternalFileFossDatastore
public interface IFossDatastore
The interface FOSS datastore. This allows for the actual storage medium to be abstracted away and changed
without any user impact going forward.
-
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.booleanIs datastore empty.voidupdateDatastore(Path fileToLoad, boolean overrideExisting) Updates the datastore using.
-
Method Details
-
getAdditionalAttributeHeadings
String[] getAdditionalAttributeHeadings()Get additional attribute headings that have been provided and need to be added to the basic report.- Returns:
- the string [ ] of the additional headings in the ordered provided
-
getAdditionalAttributesForFossItem
Get additional attributes for FOSS item. Based on the FOSS Id ID provided lookup in the datastore for additional details held.- 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
Creates the datastore using the data in the provided datafile. If a datastore already exists it will be replaced.- Parameters:
fileToLoad- the datafile to use- Throws:
org.apache.maven.plugin.MojoExecutionException
-
updateDatastore
void updateDatastore(Path fileToLoad, boolean overrideExisting) throws org.apache.maven.plugin.MojoExecutionException Updates the datastore using. the data in the provided datafile. This maintains existing datastore and add or updates data to it.- 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
boolean clearDatastore() throws org.apache.maven.plugin.MojoExecutionExceptionClears the datastore, completely removing any additional data the plugin held.- Returns:
- whether the datastore was deleted or not
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
isDatastoreEmpty
boolean isDatastoreEmpty()Is datastore empty.- Returns:
- true if the datastore is empty or not initialized, false if not.
-