FOSSology  3.2.0rc1
Open Source License Compliance by Open Source Software
AgentClearingEvent.php
1 <?php
2 /*
3 Copyright (C) 2014-2018, Siemens AG
4 
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 version 2 as published by the Free Software Foundation.
8 
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13 
14 You should have received a copy of the GNU General Public License along
15 with this program; if not, write to the Free Software Foundation, Inc.,
16 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 */
18 
20 
23 
25 {
27  private $licenseRef;
29  private $agentRef;
31  private $matchId;
33  private $percentage;
34 
41  public function __construct(LicenseRef $licenseRef, AgentRef $agentRef,
42  $matchId, $percentage)
43  {
44  $this->licenseRef = $licenseRef;
45  $this->agentRef = $agentRef;
46  $this->matchId = $matchId;
47  $this->percentage = $percentage;
48  }
49 
53  public function getMatchId()
54  {
55  return $this->matchId;
56  }
57 
61  public function getLicenseRef()
62  {
63  return $this->licenseRef;
64  }
65 
69  public function getLicenseId()
70  {
71  return $this->licenseRef->getId();
72  }
73 
77  public function getLicenseShortName()
78  {
79  return $this->licenseRef->getShortName();
80  }
81 
85  public function getLicenseFullName()
86  {
87  return $this->licenseRef->getFullName();
88  }
89 
93  public function getEventType()
94  {
95  return ClearingResult::AGENT_DECISION_TYPE;
96  }
97 
101  public function getComment()
102  {
103  return "";
104  }
105 
109  public function getReportinfo()
110  {
111  return "";
112  }
113 
117  public function getAcknowledgement()
118  {
119  return "";
120  }
121 
125  public function getTimeStamp()
126  {
127  return time();
128  }
129 
133  public function isRemoved()
134  {
135  return false;
136  }
137 
141  public function getAgentRef()
142  {
143  return $this->agentRef;
144  }
145 
149  public function getAgentName()
150  {
151  return $this->agentRef->getAgentName();
152  }
153 
157  public function getAgentId()
158  {
159  return $this->agentRef->getAgentId();
160  }
161 
162  public function getPercentage()
163  {
164  return $this->percentage;
165  }
166 }
__construct(LicenseRef $licenseRef, AgentRef $agentRef, $matchId, $percentage)