FOSSology
3.2.0rc1
Open Source License Compliance by Open Source Software
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
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
22
class
DeleteResponse
23
{
28
private
$deleteMessageCode
;
33
private
$additionalMessage
;
34
40
public
function
__construct
($deleteMessage,
$additionalMessage
=
""
)
41
{
42
$this->deleteMessageCode = $deleteMessage;
43
$this->additionalMessage =
$additionalMessage
;
44
}
45
49
public
function
getDeleteMessageCode
()
50
{
51
return
$this->deleteMessageCode
;
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
{
77
return
$this->additionalMessage
;
78
}
79
}
Fossology\DelAgent\UI\DeleteResponse\getDeleteMessageCode
getDeleteMessageCode()
Definition:
DeleteResponse.php:49
Fossology\DelAgent\UI\DeleteResponse
Handle response from delagent.
Definition:
DeleteResponse.php:22
Fossology\DelAgent\UI\DeleteResponse\__construct
__construct($deleteMessage, $additionalMessage="")
Definition:
DeleteResponse.php:40
Fossology\DelAgent\UI
UI namespace for delagent.
Fossology\DelAgent\UI\DeleteResponse\$additionalMessage
$additionalMessage
Definition:
DeleteResponse.php:33
Fossology\DelAgent\UI\DeleteResponse\$deleteMessageCode
$deleteMessageCode
Definition:
DeleteResponse.php:28
Fossology\DelAgent\UI\DeleteResponse\getAdditionalMessage
getAdditionalMessage()
Definition:
DeleteResponse.php:75
Fossology\DelAgent\UI\DeleteResponse\getDeleteMessageString
getDeleteMessageString()
Translates message code to strings.
Definition:
DeleteResponse.php:58
src
delagent
ui
DeleteResponse.php
Generated on Mon Jun 29 2020 12:03:42 for FOSSology by
1.8.11