BrightSide Workbench Full Report + Source Code
KnowledgeBaseList.java
Go to the documentation of this file.
1
/*
2
* TurrĂ³ i Cutiller Foundation. License notice.
3
* Copyright (C) 2016 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
19
package
org.turro.dossier.kb;
20
21
import
java.util.ArrayList;
22
import
java.util.Collection;
23
import
org.turro.dossier.entity.Issue;
24
import
org.turro.dossier.issue.IssueWrapper;
25
import
org.turro.elephant.context.Application;
26
import
org.turro.plugin.contacts.IContact;
27
32
public
class
KnowledgeBaseList
extends
ArrayList<IssueWrapper> {
33
34
public
KnowledgeBaseList
(Collection collection,
IContact
contact) {
35
super();
36
Application
app =
Application
.
getApplication
();
37
boolean
show = app.
isInRole
(
"issue:show"
),
38
all = app.
isInRole
(
"issue:all"
);
39
for
(Object o : collection) {
40
IssueWrapper
iw =
new
IssueWrapper
((
Issue
) o, contact);
41
if
(iw.
getIssue
().
isKnowledgeBase
() || (show && (all || iw.
isFullParticipant
()))) {
42
add(iw);
43
}
44
}
45
}
46
47
}
org.turro.dossier.entity.Issue
Definition:
Issue.java:44
org.turro.dossier.entity.Issue.isKnowledgeBase
boolean isKnowledgeBase()
Definition:
Issue.java:363
org.turro.dossier.issue.IssueWrapper
Definition:
IssueWrapper.java:47
org.turro.dossier.issue.IssueWrapper.isFullParticipant
boolean isFullParticipant()
Definition:
IssueWrapper.java:84
org.turro.dossier.issue.IssueWrapper.getIssue
Issue getIssue()
Definition:
IssueWrapper.java:126
org.turro.dossier.kb.KnowledgeBaseList
Definition:
KnowledgeBaseList.java:32
org.turro.dossier.kb.KnowledgeBaseList.KnowledgeBaseList
KnowledgeBaseList(Collection collection, IContact contact)
Definition:
KnowledgeBaseList.java:34
org.turro.elephant.context.Application
Definition:
Application.java:49
org.turro.elephant.context.Application.isInRole
boolean isInRole(String role)
Definition:
Application.java:139
org.turro.elephant.context.Application.getApplication
static Application getApplication()
Definition:
Application.java:71
org.turro.plugin.contacts.IContact
Definition:
elephant/src/main/java/org/turro/plugin/contacts/IContact.java:33
TurroProjects
Public
BrightSide
elephant-dossier
src
main
java
org
turro
dossier
kb
KnowledgeBaseList.java
Generated on Tue Mar 12 2024 07:01:19 for BrightSide by
1.9.1