9 namespace Fossology\Lib\Data;
19 private $clearingEvents;
23 private $uploadTreeId;
37 private $acknowledgement;
59 public function __construct($sameFolder, $clearingId, $uploadTreeId, $pfileId, $userName, $userId, $type, $scope, $ts_added, $clearingEvents, $comment =
"", $reportinfo =
"", $acknowledgement =
"")
61 $this->sameFolder = $sameFolder;
62 $this->clearingId = $clearingId;
63 $this->uploadTreeId = $uploadTreeId;
64 $this->pfileId = $pfileId;
65 $this->userName = $userName;
66 $this->userId = $userId;
68 $this->scope = $scope;
69 $this->timeStamp = $ts_added;
70 $this->comment = $comment;
71 $this->reportinfo = $reportinfo;
72 $this->acknowledgement = $acknowledgement;
73 $this->clearingEvents = $clearingEvents;
81 return $this->clearingId;
89 return $this->comment;
97 return $this->timeStamp;
105 $clearingLicenses = array();
106 foreach ($this->clearingEvents as $clearingEvent) {
107 $clearingLicenses[] = $clearingEvent->getClearingLicense();
109 return $clearingLicenses;
118 foreach ($this->clearingEvents as $clearingEvent) {
119 $clearingLicense = $clearingEvent->getClearingLicense();
120 if (! $clearingLicense->isRemoved()) {
121 $result[] = $clearingLicense->getLicenseRef();
133 return $this->clearingEvents;
141 return $this->pfileId;
149 return $this->reportinfo;
157 return $this->acknowledgement;
165 return $this->sameFolder;
189 return $this->uploadTreeId;
197 return $this->userId;
205 return $this->userName;
217 return $this->sameFolder;
222 function __toString()
224 $output =
"ClearingDecision(#" . $this->clearingId .
", ";
228 foreach ($clearingLicenses as $clearingLicense) {
229 $output .= ($clearingLicense->isRemoved() ?
"-" :
""). $clearingLicense->getShortName() .
", ";
__construct($sameFolder, $clearingId, $uploadTreeId, $pfileId, $userName, $userId, $type, $scope, $ts_added, $clearingEvents, $comment="", $reportinfo="", $acknowledgement="")