FOSSology  3.2.0rc1
Open Source License Compliance by Open Source Software
DeleteResponse.php
1 <?php
2 /***************************************************************
3 Copyright (C) 2017 Siemens AG
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 version 2 as published by the Free Software Foundation.
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 GNU General Public License for more details.
11 You should have received a copy of the GNU General Public License along
12 with this program; if not, write to the Free Software Foundation, Inc.,
13 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
14  ***************************************************************/
15 
16 namespace Fossology\DelAgent\UI;
17 
23 {
34 
40  public function __construct($deleteMessage, $additionalMessage = "")
41  {
42  $this->deleteMessageCode = $deleteMessage;
43  $this->additionalMessage = $additionalMessage;
44  }
45 
49  public function getDeleteMessageCode()
50  {
52  }
53 
58  public function getDeleteMessageString()
59  {
60  switch ($this->getDeleteMessageCode()) {
61  case 1:
62  return "Deletion Scheduling failed";
63  case 2:
64  return "Deletion added to job queue";
65  case 3:
66  return "You don't have permissions to delete the upload";
67  default:
68  return "Invalid Error";
69  }
70  }
71 
75  public function getAdditionalMessage()
76  {
78  }
79 }
Handle response from delagent.
__construct($deleteMessage, $additionalMessage="")
UI namespace for delagent.
getDeleteMessageString()
Translates message code to strings.