![]() |
FOSSology
4.6.0-rc1
Open Source License Compliance by Open Source Software
|
The reuser agent. More...


Public Member Functions | |
| processUploadId ($uploadId) | |
| Get the upload items and reuse based on reuse mode. More... | |
| mapByClearingId ($clearingDecisions) | |
| Map clearing decisions by clearing id. 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... | |
Protected Member Functions | |
| reuseConfSettings ($uploadId, $reusedUploadId) | |
| reuseMainLicense ($uploadId, $groupId, $reusedUploadId, $reusedGroupId) | |
| Reuse main license from previous upload. More... | |
| reuseCopyrights ($uploadId, $reusedUploadId) | |
| Reuse deactivated Copyrights from previous upload. More... | |
| processEnhancedUploadReuse ($itemTreeBounds, $itemTreeBoundsReused, $reusedGroupId) | |
| Get clearing decisions and use copyClearingDecisionIfDifferenceIsSmall() More... | |
| copyClearingDecisionIfDifferenceIsSmall ($reusedPath, $newPath, $clearingDecision, $itemId) | |
Use diff tool to compare files. More... | |
| mapByFileId ($clearingDecisions) | |
| Maps clearing decisions by file id. More... | |
Private Attributes | |
| $uploadDao | |
| $clearingEventProcessor | |
| $agentLicenseEventProcessor | |
| $clearingDecisionFilter | |
| $clearingDecisionProcessor | |
| $clearingDao | |
| $copyrightDao | |
| $aagentDao | |
| $decisionTypes | |
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 Attributes inherited from Fossology\Lib\Agent\Agent | |
| $userId | |
| $groupId | |
| $jobId | |
| $agentSpecifOptions = "" | |
| $agentSpecifLongOptions = array() | |
| $args = array() | |
| $dbManager | |
| $agentDao | |
| $container | |
| $schedulerMode | |
The reuser agent.
Definition at line 36 of file ReuserAgent.php.
|
protected |
Use diff tool to compare files.
Uses diff tool to compare two files. If the line difference is less than 5, then reuser copy the decisions.
| string | $reusedPath | |
| string | $newPath | |
| ClearingDecision | $clearingDecision | Array of clearing decisions |
| int | $itemId |
Definition at line 343 of file ReuserAgent.php.
| Fossology\Reuser\ReuserAgent::mapByClearingId | ( | $clearingDecisions | ) |
Map clearing decisions by clearing id.
Creates array with clearing ids as key and ClearingDecision object as value
| ClearingDecision | $clearingDecisions | Array of clearing decisions |
Definition at line 417 of file ReuserAgent.php.
|
protected |
Maps clearing decisions by file id.
Creates array with file ids as key and ClearingDecision object as value
| ClearingDecision | $clearingDecisions | Array of clearing decisions |
Definition at line 362 of file ReuserAgent.php.
|
protected |
Get clearing decisions and use copyClearingDecisionIfDifferenceIsSmall()
| ItemTreeBounds | $itemTreeBounds | Current upload |
| ItemTreeBounds | $itemTreeBoundsReused | Reused upload |
| int | $reusedGroupId |
Definition at line 295 of file ReuserAgent.php.
| Fossology\Reuser\ReuserAgent::processUploadId | ( | $uploadId | ) |
Get the upload items and reuse based on reuse mode.
| int | $uploadId | Upload id to process |
Reimplemented from Fossology\Lib\Agent\Agent.
Definition at line 94 of file ReuserAgent.php.
|
protected |
Reuse deactivated Copyrights from previous upload.
Get add the main licenses from previous upload and make them in new upload
| int | $uploadId | Current upload |
| int | $reusedUploadId | Upload to reuse |
Definition at line 195 of file ReuserAgent.php.
|
protected |
Reuse main license from previous upload.
Get add the main licenses from previous upload and make them in new upload
| int | $uploadId | Current upload |
| int | $groupId | Current user |
| int | $reusedUploadId | Upload to reuse |
| int | $reusedGroupId | Group of reused upload |
Definition at line 149 of file ReuserAgent.php.
|
private |
AgentDao object
Definition at line 69 of file ReuserAgent.php.
|
private |
AgentLicenseEventProcessor object
Definition at line 49 of file ReuserAgent.php.
|
private |
ClearingDao object
Definition at line 61 of file ReuserAgent.php.
|
private |
ClearingDecisionFilter object
Definition at line 53 of file ReuserAgent.php.
|
private |
ClearingDecisionProcessor object
Definition at line 57 of file ReuserAgent.php.
|
private |
ClearingEventProcessor object
Definition at line 45 of file ReuserAgent.php.
|
private |
CopyrightDao object
Definition at line 65 of file ReuserAgent.php.
|
private |
DecisionTypes object
Definition at line 73 of file ReuserAgent.php.
|
private |
UploadDao object
Definition at line 41 of file ReuserAgent.php.