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
14
class
DeleteResponse
15
{
20
private
$deleteMessageCode
;
25
private
$additionalMessage
;
26
32
public
function
__construct
($deleteMessage,
$additionalMessage
=
""
)
33
{
34
$this->deleteMessageCode = $deleteMessage;
35
$this->additionalMessage =
$additionalMessage
;
36
}
37
41
public
function
getDeleteMessageCode
()
42
{
43
return
$this->deleteMessageCode
;
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
{
69
return
$this->additionalMessage
;
70
}
71
}
Fossology\DelAgent\UI\DeleteResponse
Handle response from delagent.
Definition:
DeleteResponse.php:15
Fossology\DelAgent\UI\DeleteResponse\__construct
__construct($deleteMessage, $additionalMessage="")
Definition:
DeleteResponse.php:32
Fossology\DelAgent\UI\DeleteResponse\$deleteMessageCode
$deleteMessageCode
Definition:
DeleteResponse.php:20
Fossology\DelAgent\UI\DeleteResponse\getAdditionalMessage
getAdditionalMessage()
Definition:
DeleteResponse.php:67
Fossology\DelAgent\UI\DeleteResponse\getDeleteMessageString
getDeleteMessageString()
Translates message code to strings.
Definition:
DeleteResponse.php:50
Fossology\DelAgent\UI\DeleteResponse\$additionalMessage
$additionalMessage
Definition:
DeleteResponse.php:25
Fossology\DelAgent\UI\DeleteResponse\getDeleteMessageCode
getDeleteMessageCode()
Definition:
DeleteResponse.php:41
src
delagent
ui
DeleteResponse.php
Generated on Mon Nov 18 2024 07:37:12 for FOSSology by
1.9.1