22 private $nomosDesc =
"Scan files for licenses using regular expressions";
24 public function __construct()
26 $this->Name =
"agent_nomos";
28 "Nomos License Analysis <img src=\"images/info_16.png\" data-toggle=\"tooltip\" title=\"".$this->nomosDesc.
"\" class=\"info-bullet\"/>");
29 $this->AgentName =
"nomos";
31 parent::__construct();
40 return CheckARS($uploadId, $this->AgentName,
"license scanner",
"nomos_ars");
47 public function AgentAdd($jobId, $uploadId, &$errorMsg, $dependencies=[],
48 $arguments=
null, $request=
null, $unpackArgs=
null)
50 if ($request !=
null && !is_array($request)) {
51 $unpackArgs = intval($request->get(
'scm', 0)) == 1 ?
'-I' :
'';
53 $unpackArgs = intval(@$_POST[
'scm']) == 1 ?
'-I' :
'';
60 if ($jobQueueId != 0) {
65 if (!empty($unpackArgs)) {
66 return $this->
doAgentAdd($jobId, $uploadId, $errorMsg, array(
"agent_mimetype"),$uploadId,$args,$request);
68 return $this->
doAgentAdd($jobId, $uploadId, $errorMsg, array(
"agent_adj2nest"), $uploadId,
null, $request);
80 foreach ($dependencies as $dependency) {
81 if ($dependency == $agentName) {
84 if (is_array($dependency) && $agentName == $dependency[
'name']) {
doAgentAdd($jobId, $uploadId, &$errorMsg, $dependencies, $jqargs="", $jq_cmd_args=null, $request=null)
isAgentIncluded($dependencies, $agentName)
AgentAdd($jobId, $uploadId, &$errorMsg, $dependencies=[], $arguments=null, $request=null, $unpackArgs=null)
AgentHasResults($uploadId=0)
CheckARS($upload_pk, $AgentName, $AgentDesc, $AgentARSTableName)
Check the ARS table to see if an agent has successfully scanned an upload.
IsAlreadyScheduled($job_pk, $AgentName, $upload_pk)
Check if an agent is already scheduled in a job.