FOSSology
3.2.0rc1
Open Source License Compliance by Open Source Software
|
SPDX2 agent. More...
Public Member Functions | |
processUploadId ($uploadId) | |
Given an upload ID, process the items in it. More... | |
Public Member Functions inherited from Fossology\Lib\Agent\Agent | |
__construct ($agentName, $version, $revision) | |
scheduler_connect () | |
Connect with scheduler and initialize options. More... | |
heartbeat ($newProcessed) | |
Send hear beat to the scheduler. More... | |
bail ($exitvalue) | |
Bail the agent, print the stack and disconnect from scheduler. More... | |
scheduler_disconnect ($exitvalue) | |
Closes connection from scheduler. More... | |
scheduler_greet () | |
Greet the scheduler at the beginning of connection. More... | |
initArsTable () | |
Initialize ARS table. | |
run_scheduler_event_loop () | |
Runs a loop to read commands from scheduler and process them. More... | |
Public Attributes | |
const | OUTPUT_FORMAT_KEY = "outputFormat" |
Argument key for output format. | |
const | DEFAULT_OUTPUT_FORMAT = "spdx2" |
Default output format. | |
const | AVAILABLE_OUTPUT_FORMATS = "spdx2,spdx2tv,dep5" |
Output formats available. | |
const | UPLOAD_ADDS = "uploadsAdd" |
Argument for additional uploads. | |
Protected Member Functions | |
preWorkOnArgs ($args) | |
Parse arguments. More... | |
getTemplateFile ($partname) | |
Get TWIG template file based on output format. More... | |
getFileBasename ($packageName) | |
Generate report basename based on upload name. More... | |
getFileName ($packageName) | |
Get absolute path for report. More... | |
getUri ($packageName) | |
Get the URI for the given package. More... | |
renderPackage ($uploadId) | |
Given an upload id, render the report string. More... | |
getFilesWithLicensesFromClearings (ItemTreeBounds $itemTreeBounds) | |
Given an ItemTreeBounds, get the files with clearings. More... | |
toLicensesWithFilesAdder (&$filesWithLicenses, $licenses, $copyrights, $file, $fullPath) | |
Map licenses, copyrights, files and full path to filesWithLicenses array. More... | |
toLicensesWithFiles (&$filesWithLicenses, $treeTableName) | |
Map findings to the files. More... | |
addScannerResults (&$filesWithLicenses, ItemTreeBounds $itemTreeBounds) | |
Attach finding agents to the files and return names of scanners. More... | |
addClearingStatus (&$filesWithLicenses, ItemTreeBounds $itemTreeBounds) | |
Add clearing status to the files. More... | |
computeUri ($uploadId) | |
For a given upload, compute the URI and filename for the report. More... | |
writeReport (&$packageNodes, $packageIds, $uploadId) | |
Write the report the file and update report table. More... | |
updateReportTable ($uploadId, $jobId, $fileName) | |
Update the reportgen table with new report path. More... | |
renderString ($templateName, $vars) | |
Render a twig template. More... | |
generateFileNodes ($filesWithLicenses, $treeTableName, $uploadId) | |
Generate report nodes for files. More... | |
generateFileNodesByFiles ($filesWithLicenses, $treeTableName, $uploadId) | |
For each file, generate the nodes by files. More... | |
generateFileNodesByLicenses ($filesWithLicenses, $treeTableName) | |
For each file, generate the nodes by licenses. More... | |
getLicenseTexts () | |
Get the license texts from fossology. More... | |
getVerificationCode (Upload $upload) | |
Get a unique identifier for a given upload. More... | |
getSPDXReportConf ($uploadId, $key) | |
Get spdx license comment state for a given upload. More... | |
Protected Member Functions inherited from Fossology\Lib\Agent\Agent | |
processUploadId ($uploadId) | |
Given an upload ID, process the items in it. More... | |
Protected Attributes | |
$dbManager | |
$renderer | |
$agentNames = AgentRef::AGENT_LIST | |
$includedLicenseIds = array() | |
$filebasename = null | |
$uri | |
$filename | |
$outputFormat = self::DEFAULT_OUTPUT_FORMAT | |
$spdxValidityChecker = null | |
Protected Attributes inherited from Fossology\Lib\Agent\Agent | |
$userId | |
$groupId | |
$jobId | |
$agentSpecifOptions = "" | |
$agentSpecifLongOptions = array() | |
$args = array() | |
$dbManager | |
$agentDao | |
$container | |
$schedulerMode | |
Private Attributes | |
$uploadDao | |
$clearingDao | |
$licenseDao | |
$licenseMap | |
Additional Inherited Members | |
Static Public Member Functions inherited from Fossology\Lib\Agent\Agent | |
static | heartbeat_handler ($signo) |
Function to handle hear beats from the agent and send them to the scheduler from STDOUT. More... | |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Fossology\SpdxTwo\SpdxTwoAgent::processUploadId | ( | $uploadId | ) |
Given an upload ID, process the items in it.
This function is implemented by agent and should call heartbeat() at regular intervals.
int | $uploadId | Upload to be processed by the agent. |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
private |
|
protected |
|
protected |
|
protected |
|
protected |
|
private |
|
private |
|
protected |
|
protected |
|
protected |
|
private |
|
protected |