FOSSology  4.4.0
Open Source License Compliance by Open Source Software
DeleteResponse.php
1 <?php
2 /*
3  SPDX-FileCopyrightText: © 2017 Siemens AG
4 
5  SPDX-License-Identifier: GPL-2.0-only
6 */
7 
8 namespace Fossology\DelAgent\UI;
9 
15 {
26 
32  public function __construct($deleteMessage, $additionalMessage = "")
33  {
34  $this->deleteMessageCode = $deleteMessage;
35  $this->additionalMessage = $additionalMessage;
36  }
37 
41  public function getDeleteMessageCode()
42  {
44  }
45 
50  public function getDeleteMessageString()
51  {
52  switch ($this->getDeleteMessageCode()) {
53  case 1:
54  return "Deletion Scheduling failed";
55  case 2:
56  return "Deletion added to job queue";
57  case 3:
58  return "You don't have permissions to delete the upload";
59  default:
60  return "Invalid Error";
61  }
62  }
63 
67  public function getAdditionalMessage()
68  {
70  }
71 }
Handle response from delagent.
__construct($deleteMessage, $additionalMessage="")
getDeleteMessageString()
Translates message code to strings.