BrightSide Workbench Full Report + Source Code
DossierEntities.java
Go to the documentation of this file.
1 /*
2  * TurrĂ³ i Cutiller Foundation. License notice.
3  * Copyright (C) 2017 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.entitites;
20 
21 import java.io.File;
22 import java.util.ArrayList;
23 import java.util.Arrays;
24 import java.util.Collection;
25 import java.util.Collections;
26 import java.util.List;
27 import org.turro.string.Strings;
28 import org.turro.action.IEntityCtrl;
29 import org.turro.annotation.ElephantEntity;
30 import org.turro.attach.entity.Attachment;
31 import org.turro.attach.www.AttachCtrl;
32 import org.turro.collections.KeyValueMap;
33 import org.turro.command.LabelControl;
34 import org.turro.contacts.VoteIt;
35 import org.turro.dossier.db.DossierPU;
36 import org.turro.dossier.entity.Category;
37 import org.turro.dossier.entity.Dossier;
38 import org.turro.dossier.entity.DossierType;
39 import org.turro.dossier.entity.DossierVersion;
40 import org.turro.dossier.entity.Issue;
41 import org.turro.dossier.entity.IssueComment;
42 import org.turro.dossier.entity.IssueParticipant;
43 import org.turro.dossier.entity.Participant;
44 import org.turro.dossier.entity.Project;
45 import org.turro.dossier.entity.ProjectGrant;
46 import org.turro.dossier.zul.menu.DossierMenu;
47 import org.turro.elephant.db.WhereClause;
48 import org.turro.entities.DefaultElephantEntity;
49 import org.turro.entities.Entities;
50 import org.turro.entities.EntityListAdapter;
51 import org.turro.entities.EntityRole;
52 import org.turro.entities.IElephantEntity;
53 import org.turro.file.util.FileAttach;
54 import org.turro.i18n.I_;
55 import org.turro.jpa.Dao;
56 import org.turro.path.Path;
57 import org.turro.plugin.contacts.ContactList;
58 import org.turro.plugin.contacts.IContact;
59 import org.turro.polls.PollsCtrl;
60 import org.turro.script.Script;
61 import org.turro.security.ConceptPermission;
62 import org.turro.util.Chars;
63 import org.turro.www.commentit.CommentItCtrl;
64 import org.turro.www.describeit.DescribeItCtrl;
65 import org.turro.www.starit.StarItCtrl;
66 import org.turro.www.voteit.VoteItCtrl;
67 
73 public class DossierEntities extends DefaultElephantEntity {
74 
75  public DossierEntities() {
76  }
77 
78  public DossierEntities(String entityPath) {
79  super(entityPath);
80  }
81 
82  public DossierEntities(Object entity) {
83  super(entity);
84  }
85 
86  @Override
87  public Object getEntity() {
88  if(entity == null) {
89  if(getPath() != null) {
90  if(isValidLongEntity()) {
91  if(null != path.getRoot()) switch (path.getRoot()) {
92  case "dossier":
93  entity = getDao().find(Dossier.class, path.getNodeAs(1, Long.class));
94  break;
95  case "issue":
96  entity = getDao().find(Issue.class, path.getNodeAs(1, Long.class));
97  break;
98  case "dossier-category":
99  entity = getDao().find(Category.class, path.getNodeAs(1, Long.class));
100  break;
101  case "project-grant":
102  entity = getDao().find(ProjectGrant.class, path.getNodeAs(1, Long.class));
103  break;
104  default:
105  break;
106  }
107  }
108  }
109  }
110  return entity;
111  }
112 
113  @Override
114  public String getName() {
115  if(getEntity() != null) {
116  if(entity instanceof Dossier) {
117  return ((Dossier) entity).getId() + Chars.forward().spaced().toString() + ((Dossier) entity).getDescription() +
118  " [" + I_.byKey(((Dossier) entity).getStatus().toString()) + "]";
119  } else if(entity instanceof Issue) {
120  DossierVersion dv = ((Issue) entity).getVersion();
121  return ((Issue) entity).getId() + Chars.forward().spaced().toString() + ((Issue) entity).getDescription() +
122  (dv == null ? "" : (" " + dv.getVersionString())) +
123  " [" + I_.byKey(((Issue) entity).getType().toString()) +
124  ", " + I_.byKey(((Issue) entity).getStatus().toString()) + "]";
125  } else if(entity instanceof Category) {
126  return ((Category) entity).getFullDescription();
127  } else if(entity instanceof ProjectGrant) {
128  return ((ProjectGrant) entity).getName();
129  }
130  }
131  return null;
132  }
133 
134  @Override
135  public String getLabel() {
136  if(getPath() != null) {
137  String root = path.getRoot();
138  if(null != root) switch (root) {
139  case "dossier":
140  return I_.get("Dossier");
141  case "issue":
142  return I_.get("Issue");
143  case "dossier-category":
144  return I_.get("Category");
145  case "project-grant":
146  return I_.get("Project grant");
147  case "myissues":
148  return I_.get("My issues");
149  case "mydossiers":
150  return I_.get("My dossiers");
151  default:
152  break;
153  }
154  }
155  return null;
156  }
157 
158  @Override
159  public String getDescription() {
160  if(getEntity() != null) {
161  if(entity instanceof Dossier) {
162  return ((Dossier) entity).getLabeledPublishableDescription();
163  } else if(entity instanceof Issue) {
164  return ((Issue) entity).getDossier().getFullDescription(false);
165  } else if(entity instanceof ProjectGrant) {
166  return ((ProjectGrant) entity).getDescription();
167  }
168  }
169  return null;
170  }
171 
172  @Override
173  public Object getLabelCtrl() {
174  if(getEntity() != null) {
175  return new LabelControl(getEntity());
176  }
177  return null;
178  }
179 
180  @Override
181  public String getImage() {
182  if(getPath() != null) {
183  String root = path.getRoot();
184  if(null != root) switch (root) {
185  case "dossier":
186  return "/_zul/images/dossier.png";
187  case "issue":
188  return "/_zul/images/issue.png";
189  case "dossier-category":
190  return "/_zul/images/group.png";
191  case "project-grant":
192  return "/_zul/images/handshelp.png";
193  case "myissues":
194  return "/_zul/images/issue.png";
195  case "mydossiers":
196  return "/_zul/images/dossier.png";
197  default:
198  break;
199  }
200  }
201  return null;
202  }
203 
204  @Override
205  public String getHierarchicalPath() {
206  if(getEntity() != null) {
207  if(entity instanceof Issue) {
208  Dossier dossier = ((Issue) entity).getDossier();
209  return DossierPU.getObjectPath(dossier.getCategory()) +
212  } else if(entity instanceof Dossier) {
213  Dossier dossier = ((Dossier) entity);
214  return DossierPU.getObjectPath(dossier.getCategory()) +
216  }
217  }
218  return getPath();
219  }
220 
221  @Override
223  if(getEntity() != null) {
224  if(entity instanceof Issue) {
225  return Entities.getController(((Issue) entity).getDossier());
226  } else if(entity instanceof Dossier) {
227  return Entities.getController(((Dossier) entity).getCategory());
228  }
229  }
230  return null;
231  }
232 
233  @Override
234  public List<IElephantEntity> getChildren() {
235  if(getEntity() != null) {
236  if(entity instanceof Category) {
238  ela.addAll(((Category) entity).getDossiers());
239  return ela;
240  } else if(entity instanceof Dossier) {
241  return new EntityListAdapter(((Dossier) entity).getAllIssues());
242  }
243  }
244  return Collections.EMPTY_LIST;
245  }
246 
247  @Override
248  public String getExtendedPath() {
250  }
251 
252  @Override
253  public File getFile() {
254  return null;
255  }
256 
257  @Override
258  public boolean showPath() {
259  if(getPath() != null) {
260  String root = path.getRoot();
261  if("myissues".equals(root)) {
263  return true;
264  } else if("mydossiers".equals(root)) {
266  return true;
267  }
268  }
269  return false;
270  }
271 
272  @Override
273  public boolean showEntity() {
274  if(getEntity() != null) {
275  if(entity instanceof Dossier) {
276  DossierMenu.showDossier(((Dossier) entity).getId());
277  return true;
278  } else if(entity instanceof Issue) {
279  DossierMenu.showIssue(((Issue) entity).getId());
280  return true;
281  } else if(entity instanceof ProjectGrant) {
283  return true;
284  }
285  }
286  return false;
287  }
288 
289  @Override
290  public boolean canEdit(IContact contact) {
291  if(getEntity() != null) {
292  if(entity instanceof Dossier) {
293  return contact.getPermissions().isInRole("dossier:edit") ||
294  ((Dossier) entity).getFullParticipants().isParticipant(contact);
295  } else if(entity instanceof Issue) {
296  return contact.getPermissions().isInRole("issue:edit") ||
297  ((Issue) entity).getFullParticipants().isParticipant(contact);
298  } else if(entity instanceof ProjectGrant) {
299  return contact.getPermissions().isInRole("dossier:edit");
300  }
301  }
302  return false;
303  }
304 
305  @Override
306  public boolean canPublish(IContact contact) {
307  if(getEntity() != null) {
308  if(entity instanceof Dossier) {
309  return ((Dossier) entity).getFullParticipants().isParticipant(contact);
310  } else if(entity instanceof Issue) {
311  return ((Issue) entity).getFullParticipants().canShowIssue(contact);
312  } else if(entity instanceof Category) {
313  return ((Category) entity).getFullParticipants().isParticipant(contact);
314  }
315  }
316  return false;
317  }
318 
319  @Override
320  public Collection getEntitites(String search, int maxResults, KeyValueMap kvm) {
321  ArrayList<Object> list = new ArrayList<>();
322  list.addAll(searchCategories(search, maxResults, kvm));
323  list.addAll(searchDossiers(search, maxResults, kvm));
324  list.addAll(searchIssues(search, maxResults, kvm));
325  return list;
326  }
327 
328  @Override
329  public Collection getEntitites(String root, String search, int maxResults, KeyValueMap kvm) {
330  ArrayList<Object> list = new ArrayList<>();
331  if(null != root) switch (root) {
332  case "dossier":
333  list.addAll(searchDossiers(search, maxResults, kvm));
334  break;
335  case "issue":
336  list.addAll(searchIssues(search, maxResults, kvm));
337  break;
338  case "dossier-category":
339  list.addAll(searchCategories(search, maxResults, kvm));
340  break;
341  default:
342  break;
343  }
344  return list;
345  }
346 
347  @Override
348  public Object configureCtrl(Object ctrl, IContact contact) {
349  if(ctrl instanceof VoteItCtrl) {
350  VoteItCtrl ictrl = (VoteItCtrl) ctrl;
351  if(getEntity() instanceof Issue) {
352  Issue e = (Issue) getEntity();
353  if(e.getDossier().getType().isVotes()) {
354  ictrl.setEntityPath(getPath());
355  ictrl.setForbiden(e.getStatus().isFinished());
356  if(e.getDossier().getType().isSecret()) {
357  ictrl.setForbid(true);
358  ictrl.setAllowed((ContactList) e.getDossier().getFullParticipants().getVoteIParticipants());
359  }
360  return ictrl;
361  }
362  } else if(getEntity() instanceof Dossier) {
363  Dossier e = (Dossier) getEntity();
364  if(e.getType().isVotes()) {
365  ictrl.setEntityPath(getPath());
366  ictrl.setForbiden(!e.getStatus().isOpen());
367  if(e.getType().isSecret()) {
368  ictrl.setForbid(true);
369  ictrl.setAllowed((ContactList) e.getFullParticipants().getVoteIParticipants());
370  }
371  return ictrl;
372  }
373  }
374  } else if(ctrl instanceof StarItCtrl) {
375  StarItCtrl ictrl = (StarItCtrl) ctrl;
376  ictrl.setEntityPath(getPath());
377  return ictrl;
378  } else if(ctrl instanceof CommentItCtrl) {
379  CommentItCtrl ictrl = (CommentItCtrl) ctrl;
380  ictrl.setEntityPath(getPath());
381  return ictrl;
382  } else if(ctrl instanceof AttachCtrl) {
383  AttachCtrl ictrl = (AttachCtrl) ctrl;
384  ictrl.setEntityPath(getPath());
385  if(getEntity() instanceof Issue) {
386  Issue e = (Issue) getEntity();
387  ictrl.setPublicOnly(true);
388  if(e.getFullParticipants().canShowAllAttachments(contact)) {
389  ictrl.setPublicOnly(false);
390  }
391  return ictrl;
392  } else if(getEntity() instanceof Dossier) {
393  Dossier e = (Dossier) getEntity();
394  ictrl.setPublicOnly(true);
395  ictrl.addRestrictedFolders(e.getFullParticipants().getParticipationStrings(contact));
396  return ictrl;
397  } else if(getEntity() instanceof Category) {
398  Category c = (Category) getEntity();
399  ictrl.setPublicOnly(true);
400  ictrl.addRestrictedFolders(c.getFullParticipants().getParticipationStrings(contact));
401  return ictrl;
402  }
403  } else if(ctrl instanceof FileAttach) {
404  FileAttach ictrl = (FileAttach) ctrl;
405  return ictrl;
406  } else if(ctrl instanceof DescribeItCtrl) {
407  DescribeItCtrl ictrl = (DescribeItCtrl) ctrl;
408  ictrl.setEntityPath(getPath());
409  return ictrl;
410  } else if(ctrl instanceof PollsCtrl) {
411  PollsCtrl ictrl = (PollsCtrl) ctrl;
412  ictrl.setEntityPath(getPath());
413  return ictrl;
414  } else if(ctrl instanceof IEntityCtrl) {
415  IEntityCtrl ictrl = (IEntityCtrl) ctrl;
416  ictrl.setEntityPath(getPath());
417  return ictrl;
418  }
419  return ctrl;
420  }
421 
422  @Override
423  public boolean canShowInContext(IContact contact, Object relatedEntity) {
424  if(relatedEntity instanceof VoteIt) {
425  VoteIt irelated = (VoteIt) relatedEntity;
426  if(getEntity() instanceof Issue) {
427  Issue e = (Issue) getEntity();
428  return e.getDossier().getType().isVotes();
429  } else if(getEntity() instanceof Dossier) {
430  Dossier e = (Dossier) getEntity();
431  return e.getType().isVotes();
432  }
433  } else if(relatedEntity instanceof Attachment) {
434  Attachment irelated = (Attachment) relatedEntity;
435  IElephantEntity iee = Entities.getController(irelated);
436  if(getEntity() instanceof Issue) {
437  Issue e = (Issue) getEntity();
438  return iee.canPublish(contact) || e.getFullParticipants().canShowAllAttachments(contact);
439  } else if(getEntity() instanceof Dossier) {
440  Dossier e = (Dossier) getEntity();
441  boolean canPublish = iee.canPublish(contact);
442  if(contact.isValid()) {
443  return canPublish && e.getFullParticipants().canShowAllAttachments(contact) &&
444  irelated.canShowTo(contact, e.getFullParticipants().getParticipationStrings(contact));
445  }
446  } else if(getEntity() instanceof Category) {
447  Category e = (Category) getEntity();
448  boolean canPublish = iee.canPublish(contact);
449  if(contact.isValid()) {
450  return canPublish && e.getFullParticipants().canShowAllAttachments(contact) &&
451  irelated.canShowTo(contact, e.getFullParticipants().getParticipationStrings(contact));
452  }
453  }
454  }
455  return true;
456  }
457 
458  @Override
459  public boolean hasRelatedRole(EntityRole role, IContact contact) {
460  switch(role) {
461  case CHALLENGER:
462  if(getEntity() instanceof Dossier) {
463  Dossier dossier = (Dossier) getEntity();
464  return dossier.isBranchAdmin(contact) ||
465  dossier.getFullParticipants().isDriver(contact) ||
466  dossier.getFullParticipants().isBeneficiary(contact) ||
467  dossier.getFullParticipants().isOfferer(contact);
468  }
469  break;
470  case DOCUMENTATION:
471  if(getEntity() instanceof Dossier) {
472  Dossier dossier = (Dossier) getEntity();
473  return dossier.getFullParticipants().isSupport(contact);
474  }
475  break;
476  }
477  return super.hasRelatedRole(role, contact);
478  }
479 
480  @Override
481  public String getExtendedWebPath() {
482  if(getEntity() != null) {
483  if(entity instanceof Dossier) {
484  Dossier dossier = (Dossier) entity;
485  return Strings.unpunctuateKeepPath(dossier.getCategory().getPath()).toLowerCase() +
486  "/" + dossier.getId() +
487  "/" + Strings.unpunctuate(dossier.getDescription()).toLowerCase();
488  } else if(entity instanceof Issue) {
489  Issue issue = (Issue) entity;
490  return "/" + issue.getId() +
491  "/" + Strings.unpunctuate(issue.getDescription()).toLowerCase();
492  }
493  }
494  return null;
495  }
496 
497  @Override
498  public String getLinkRoot() {
499  getPath();
500  String root = path.getRoot();
501  if("dossier".equals(root)) {
502  if(getEntity() instanceof Dossier) {
503  Dossier dossier = (Dossier) entity;
504  if(DossierType.TYPE_PROJECT.equals(dossier.getType())) {
505  return "project";
506  } else {
507  return "dossier";
508  }
509  }
510  }
511  return super.getLinkRoot();
512  }
513 
514  @Override
515  public String getUserContext() {
516  getPath();
517  if(path.getRoot().equals("project-grant")) {
518  return "/user/projectgrants";
519  } else {
520  return "/user/my" + getLinkRoot() + "s";
521  }
522  }
523 
524  @Override
525  protected Dao createDao() {
526  return new DossierPU();
527  }
528 
529  @Override
530  protected boolean itsMine(String rootPath) {
531  return super.itsMine(rootPath) ||
532  "myissues".equals(rootPath) || "mydossiers".equals(rootPath);
533  }
534 
535  @Override
536  protected boolean itsMine(Object entity) {
537  return (entity instanceof Dossier) || (entity instanceof Issue) ||
538  (entity instanceof Category) || (entity instanceof ProjectGrant);
539  }
540 
541  @Override
542  public Collection<String> getAllowedRoots() {
543  return Arrays.asList("dossier", "issue", "dossier-category", "project-grant");
544  }
545 
546  @Override
548  return new DossierEntities(entityPath);
549  }
550 
551  @Override
553  return new DossierEntities(entity);
554  }
555 
556  @Override
557  protected Path createPath() {
558  return new Path(DossierPU.getObjectPath(entity));
559  }
560 
561  @Override
562  public Script getActorScript() {
563  Script script = super.getActorScript();
564  if(getEntity() != null) {
565  if(entity instanceof Category) {
566  script.addVariable("category", entity);
567  script.addVariable("dpl", ((Category) entity).getFullParticipants());
568  } else if(entity instanceof Dossier) {
569  script.addVariable("dossier", entity);
570  script.addVariable("dpl", ((Dossier) entity).getFullParticipants());
571  } else if(entity instanceof Issue) {
572  script.addVariable("issue", entity);
573  script.addVariable("dpl", ((Issue) entity).getFullParticipants());
574  }
575  }
576  return script;
577  }
578 
579  @Override
581  if(getEntity() != null) {
582  if(entity instanceof Dossier) {
583  Dossier dossier = (Dossier) entity;
584  if(dossier.getProject() != null) {
585  return dossier.getProject().getPhaseDefinition().getPermission(name, this);
586  }
587  }
588  }
589  return super.getConceptPermission(name);
590  }
591 
592  @Override
593  public Object getObject(Path entityPath) {
594  if("issue-comment".equals(entityPath.getRoot())) {
595  return getDao().find(IssueComment.class, entityPath.getNodeAs(1, Long.class));
596  } else if("issue-participant".equals(entityPath.getRoot())) {
597  return getDao().find(IssueParticipant.class, entityPath.getNodeAs(1, Long.class));
598  } else if("dossier-participant".equals(entityPath.getRoot())) {
599  return getDao().find(Participant.class, entityPath.getNodeAs(1, Long.class));
600  } else if("project".equals(entityPath.getRoot())) {
601  return getDao().find(Project.class, entityPath.getNodeAs(1, Long.class));
602  }
603  return null;
604  }
605 
606  @Override
607  public IElephantEntity getMain(Object entity) {
608  if(entity instanceof IssueComment) {
609  return getController(((IssueComment) entity).getIssue());
610  } else if(entity instanceof Project) {
611  return getController(((Project) entity).getDossier());
612  } else if(entity instanceof Participant) {
613  return getController(((Participant) entity).getDossier());
614  } else if(entity instanceof IssueParticipant) {
615  return getController(((IssueParticipant) entity).getIssue());
616  } else if(entity instanceof Issue) {
617  return getController(((Issue) entity).getDossier());
618  }
619  return null;
620  }
621 
622  private List<Object> searchCategories(String search, int maxResults, KeyValueMap kvm) {
623  WhereClause wc = new WhereClause();
624  wc.addClause("select c from Category c");
625  wc.addClause("where c.fullDescription like :search");
626  wc.addNamedValue("search", "%" + search + "%");
627  if(kvm != null) {
628  if(kvm.containsKey("dossier-categories")) {
629  String sep = "";
630  wc.addClause("and (");
631  for(String cat : convertToCategories(kvm.get(String.class, "dossier-categories"), true)) {
632  String parName = cat.replaceAll("\\/", "p");
633  wc.addClause(sep + " c.uniquePath like :" + parName);
634  wc.addNamedValue(parName, "%" + cat + "%");
635  sep = "or";
636  }
637  for(String cat : convertToCategories(kvm.get(String.class, "dossier-categories"), false)) {
638  String parName = cat.replaceAll("\\/", "e");
639  wc.addClause(sep + " c.uniquePath like :" + parName);
640  wc.addNamedValue(parName, "%" + cat);
641  sep = "or";
642  }
643  wc.addClause(")");
644  }
645  }
646  wc.addClause("order by c.fullDescription");
647  return getDao().getResultList(wc, maxResults);
648  }
649 
650  private List<Object> searchDossiers(String search, int maxResults, KeyValueMap kvm) {
651  WhereClause wc = new WhereClause();
652  wc.addClause("select d from Dossier d");
653  wc.addClause("where d.description like :search");
654  wc.addNamedValue("search", "%" + search + "%");
655  if(kvm != null) {
656  if(kvm.containsKey("dossier-categories")) {
657  String sep = "";
658  wc.addClause("and (");
659  for(String cat : convertToCategories(kvm.get(String.class, "dossier-categories"), true)) {
660  String parName = cat.replaceAll("\\/", "p");
661  wc.addClause(sep + " d.uniquePath like :" + parName);
662  wc.addNamedValue(parName, "%" + cat + "%");
663  sep = "or";
664  }
665  wc.addClause(")");
666  }
667  if(kvm.get(Boolean.class, "only-projects", Boolean.FALSE)) {
668  wc.addClause("and d.project is not null");
669  }
670  }
671  wc.addClause("order by d.description");
672  return getDao().getResultList(wc, maxResults);
673  }
674 
675  private List<Object> searchIssues(String search, int maxResults, KeyValueMap kvm) {
676  WhereClause wc = new WhereClause();
677  wc.addClause("select i from Issue i");
678  wc.addClause("where i.description like :search");
679  wc.addClause("order by i.description");
680  wc.addNamedValue("search", "%" + search + "%");
681  return getDao().getResultList(wc, maxResults);
682  }
683 
684  private List<String> convertToCategories(String categoryIds, boolean addSlash) {
685  String cids[] = categoryIds.split("\\s*,\\s*");
686  ArrayList<String> cats = new ArrayList<>();
687  for(String id : cids) {
688  cats.add("/c" + id + (addSlash ? "/" : ""));
689  }
690  return cats;
691  }
692 
693 }
boolean canShowTo(IContact contact, HashSet< String > restrictedFolders)
void addRestrictedFolders(HashSet< String > restrictedFolders)
Definition: AttachCtrl.java:67
void setPublicOnly(boolean publicOnly)
Definition: AttachCtrl.java:77
void setEntityPath(String entityPath)
Definition: AttachCtrl.java:45
static String getObjectPath(Object object)
Definition: DossierPU.java:66
static String getObjectExtendedPath(Object object)
Definition: DossierPU.java:85
ParticipantSet< IDossierParticipant > getFullParticipants()
Definition: Category.java:270
ParticipantSet< IDossierParticipant > getFullParticipants()
Definition: Dossier.java:399
boolean isBranchAdmin(IContact contact)
Definition: Dossier.java:580
ParticipantSet getFullParticipants()
Definition: Issue.java:461
static void showDossier(Dossier dossier)
void addNamedValue(String name, Object value)
IElephantEntity getController(String entityPath)
static IElephantEntity getController(String path)
Definition: Entities.java:78
boolean addAll(Collection entities)
boolean canShowInContext(IContact contact, Object relatedEntity)
Collection getEntitites(String search, int maxResults, KeyValueMap kvm)
IElephantEntity getMain(Object entity)
List< IElephantEntity > getChildren()
ConceptPermission getConceptPermission(String name)
boolean canPublish(IContact contact)
Collection< String > getAllowedRoots()
IElephantEntity createInstance(String entityPath)
boolean hasRelatedRole(EntityRole role, IContact contact)
IElephantEntity createInstance(Object entity)
Object configureCtrl(Object ctrl, IContact contact)
Collection getEntitites(String root, String search, int maxResults, KeyValueMap kvm)
boolean canEdit(IContact contact)
static String byKey(String key)
Definition: I_.java:83
static String get(String msg)
Definition: I_.java:41
ConceptPermission getPermission(String name, IElephantEntity iee)
void setEntityPath(String entityPath)
Definition: PollsCtrl.java:42
void setEntityPath(String entityPath)
void setEntityPath(String entityPath)
Definition: StarItCtrl.java:46
void setAllowed(ContactList allowed)
void setEntityPath(String entityPath)
boolean canPublish(IContact contact)