BrightSide Workbench Full Report + Source Code
UserWrapper.java
Go to the documentation of this file.
1
/*
2
* TurrĂ³ i Cutiller Foundation. License notice.
3
* Copyright (C) 2011 Lluis TurrĂ³ Cutiller <http://www.turro.org/>
4
*
5
* This program is free software: you can redistribute it and/or modify
6
* it under the terms of the GNU Affero General Public License as published by
7
* the Free Software Foundation, either version 3 of the License, or
8
* (at your option) any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU Affero General Public License for more details.
14
*
15
* You should have received a copy of the GNU Affero General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
package
org.turro.elephant.documents;
19
20
import
org.turro.elephant.security.IUser;
21
26
public
class
UserWrapper
implements
Comparable {
27
28
private
DocumentsBean
db;
29
private
IUser
user;
30
31
public
UserWrapper
(
DocumentsBean
db,
IUser
user) {
32
this.db = db;
33
this.user = user;
34
}
35
36
public
String
getId
() {
37
return
user.
getId
();
38
}
39
40
public
String
getName
() {
41
return
user.
getName
();
42
}
43
44
public
String
getSelected
() {
45
if
(db.
isSelected
(user)) {
46
return
"selected=\"selected\""
;
47
}
48
return
""
;
49
}
50
51
@Override
52
public
int
compareTo
(Object o) {
53
UserWrapper
other = (
UserWrapper
) o;
54
return
getName
().compareTo(other.
getName
());
55
}
56
57
}
org.turro.elephant.documents.DocumentsBean
Definition:
DocumentsBean.java:61
org.turro.elephant.documents.DocumentsBean.isSelected
boolean isSelected(IUser user)
Definition:
DocumentsBean.java:356
org.turro.elephant.documents.UserWrapper
Definition:
UserWrapper.java:26
org.turro.elephant.documents.UserWrapper.UserWrapper
UserWrapper(DocumentsBean db, IUser user)
Definition:
UserWrapper.java:31
org.turro.elephant.documents.UserWrapper.compareTo
int compareTo(Object o)
Definition:
UserWrapper.java:52
org.turro.elephant.documents.UserWrapper.getId
String getId()
Definition:
UserWrapper.java:36
org.turro.elephant.documents.UserWrapper.getName
String getName()
Definition:
UserWrapper.java:40
org.turro.elephant.documents.UserWrapper.getSelected
String getSelected()
Definition:
UserWrapper.java:44
org.turro.elephant.security.IUser
Definition:
IUser.java:30
org.turro.elephant.security.IUser.getId
String getId()
org.turro.elephant.security.IUser.getName
String getName()
TurroProjects
Public
Elephant
elephant
src
main
java
org
turro
elephant
documents
UserWrapper.java
Generated on Sun May 8 2022 11:23:28 for BrightSide by
1.9.1