◆ DossierWrapper()
org.turro.dossier.dossier.DossierWrapper.DossierWrapper |
( |
Dossier |
entity | ) |
|
◆ createDao()
Dao org.turro.dossier.dossier.DossierWrapper.createDao |
( |
| ) |
|
|
protected |
◆ delete()
boolean org.turro.dossier.dossier.DossierWrapper.delete |
( |
| ) |
|
◆ getCanShowAllAttachments()
boolean org.turro.dossier.dossier.DossierWrapper.getCanShowAllAttachments |
( |
| ) |
|
Definition at line 197 of file DossierWrapper.java.
198 if(
entity ==
null)
return false;
202 for(IDossierParticipant p :
getEntity().getFullParticipants()) {
203 if(p.getIdContact().equals(contact.
getId()) && p.isShowAllAttachments()) {
◆ getCanShowAllIssues()
boolean org.turro.dossier.dossier.DossierWrapper.getCanShowAllIssues |
( |
| ) |
|
Definition at line 211 of file DossierWrapper.java.
212 if(
entity ==
null)
return false;
213 if(
isOwner() || Application.getApplication().isInRole(
"issue:all")) {
216 for(IDossierParticipant p :
getEntity().getFullParticipants()) {
217 if(p.getIdContact().equals(contact.
getId()) && p.isShowAllIssues()) {
◆ getCanShowParticipants()
boolean org.turro.dossier.dossier.DossierWrapper.getCanShowParticipants |
( |
| ) |
|
Definition at line 181 of file DossierWrapper.java.
182 if(
entity ==
null)
return false;
183 if(Application.getApplication().isInRole(
"dossier:participants")) {
188 for(IDossierParticipant p :
getEntity().getFullParticipants()) {
189 if(p.getIdContact().equals(contact.
getId()) && p.isShowParticipants()) {
◆ getIssueAlarms()
List org.turro.dossier.dossier.DossierWrapper.getIssueAlarms |
( |
| ) |
|
◆ getIssueCount()
long org.turro.dossier.dossier.DossierWrapper.getIssueCount |
( |
| ) |
|
Definition at line 300 of file DossierWrapper.java.
301 Dao dao =
new DossierPU();
302 WhereClause wc =
new WhereClause();
303 wc.addClause(
"select count(issue) from Issue as issue");
304 wc.addClause(
"where dossier = :dossier");
305 wc.addNamedValue(
"dossier",
entity);
306 return (Long) dao.getSingleResult(wc);
◆ getIssueLastModification()
Date org.turro.dossier.dossier.DossierWrapper.getIssueLastModification |
( |
| ) |
|
Definition at line 309 of file DossierWrapper.java.
310 Dao dao =
new DossierPU();
311 WhereClause wc =
new WhereClause();
312 wc.addClause(
"select max(issue.modification)");
313 wc.addClause(
"from Issue as issue");
314 wc.addClause(
"where dossier = :dossier");
315 wc.addNamedValue(
"dossier",
entity);
316 return (Date) dao.getSingleResult(wc);
◆ getIssueParticipant()
String org.turro.dossier.dossier.DossierWrapper.getIssueParticipant |
( |
| ) |
|
◆ getIssueParticipantName()
String org.turro.dossier.dossier.DossierWrapper.getIssueParticipantName |
( |
| ) |
|
Definition at line 237 of file DossierWrapper.java.
238 IContact c = Contacts.getContactById(issueParticipant);
◆ getIssueSearch()
IssueResults org.turro.dossier.dossier.DossierWrapper.getIssueSearch |
( |
| ) |
|
Definition at line 258 of file DossierWrapper.java.
259 IssueResults ir =
new IssueResults();
261 ir.setDossierId(
entity.getId());
262 ir.setIssueValue(
"*");
264 if(issueParticipant !=
null) {
265 ir.setByParticipantId(issueParticipant);
266 ir.setRoles(EnumSet.of(IssueParticipantRole.ISSUE_RESPONSIBLE));
267 ir.setCkOthers(
false);
◆ getReceiveAllEmails()
boolean org.turro.dossier.dossier.DossierWrapper.getReceiveAllEmails |
( |
| ) |
|
Definition at line 225 of file DossierWrapper.java.
228 for(IDossierParticipant p :
getEntity().getFullParticipants()) {
229 if(p.getIdContact().equals(contact.
getId()) && p.isReceiveAllEmails()) {
boolean getCanShowAllIssues()
◆ getReport()
Definition at line 273 of file DossierWrapper.java.
275 report =
new DossierDWReport();
void setReportValues(Dossier dossier)
◆ getResponsibles()
List<DossierWrapper> org.turro.dossier.dossier.DossierWrapper.getResponsibles |
( |
| ) |
|
Definition at line 281 of file DossierWrapper.java.
282 Dao dao =
new DossierPU();
283 WhereClause wc =
new WhereClause();
284 wc.addClause(
"select distinct participant.idContact");
285 wc.addClause(
"from IssueParticipant as participant");
286 wc.addClause(
"where participant.issue.dossier = :dossier");
287 wc.addClause(
"and participant.role = :role");
288 wc.addClause(
"order by participant.name");
289 wc.addNamedValue(
"dossier",
entity);
290 wc.addNamedValue(
"role", IssueParticipantRole.ISSUE_RESPONSIBLE);
291 List<DossierWrapper> l =
new ArrayList<>();
292 for(String s : (List<String>) dao.getResultList(wc)) {
294 dw.setIssueParticipant(s);
DossierWrapper(Dossier entity)
◆ getSelfLabel()
String org.turro.dossier.dossier.DossierWrapper.getSelfLabel |
( |
| ) |
|
Definition at line 141 of file DossierWrapper.java.
142 if(DossierType.TYPE_PROJECT.equals(
entity.getType())) {
143 return I_.get(
"Project");
145 return I_.get(
"Dossier");
◆ getTabLabel()
String org.turro.dossier.dossier.DossierWrapper.getTabLabel |
( |
| ) |
|
◆ getTooltiptext()
String org.turro.dossier.dossier.DossierWrapper.getTooltiptext |
( |
| ) |
|
◆ isAssistant()
boolean org.turro.dossier.dossier.DossierWrapper.isAssistant |
( |
| ) |
|
Definition at line 176 of file DossierWrapper.java.
177 if(
entity ==
null)
return false;
178 return getRole().contains(ParticipantRole.PARTICIPANT_ASSISTANT);
◆ isEmptyDescriptors()
boolean org.turro.dossier.dossier.DossierWrapper.isEmptyDescriptors |
( |
String |
grouping, |
|
|
boolean |
required |
|
) |
| |
Definition at line 341 of file DossierWrapper.java.
342 for(DescriptorDefinition dd :
entity.getDescriptorSet()) {
343 if(
"all".
equals(grouping) || CompareUtil.compare(grouping, dd.getGrouping()) == 0) {
344 DescriptorValue dv = dd.getValue();
345 if(required && dd.isRequired() && (dv ==
null || dv.isEmpty())) {
boolean equals(Object obj)
◆ isOwner()
boolean org.turro.dossier.dossier.DossierWrapper.isOwner |
( |
| ) |
|
Definition at line 166 of file DossierWrapper.java.
167 if(
entity ==
null)
return false;
168 return getRole().contains(ParticipantRole.PARTICIPANT_OWNER);
◆ isParticipant()
boolean org.turro.dossier.dossier.DossierWrapper.isParticipant |
( |
| ) |
|
Definition at line 161 of file DossierWrapper.java.
162 if(
entity ==
null)
return false;
163 return getRole() !=
null && !getRole().isEmpty();
◆ isSubject()
boolean org.turro.dossier.dossier.DossierWrapper.isSubject |
( |
| ) |
|
Definition at line 171 of file DossierWrapper.java.
172 if(
entity ==
null)
return false;
173 return getRole().contains(ParticipantRole.PARTICIPANT_SUBJECT);
◆ save()
Dossier org.turro.dossier.dossier.DossierWrapper.save |
( |
| ) |
|
Reimplemented from org.turro.jpa.entity.DaoEntity< T extends IDaoEntity, ID extends Serializable >.
Definition at line 76 of file DossierWrapper.java.
77 RelatedItem rpi =
entity.getRelated();
78 if(
entity.getCreation() ==
null) {
79 entity.setCreation(
new Date());
81 if(
entity.getType() ==
null) {
82 entity.setType(DossierType.TYPE_DOSSIER);
84 EntityCollections.entities(
entity.getParticipants()).removeEmpties();
85 for(Participant p :
entity.getParticipants()) {
86 p.setRole(p.getRole());
88 EntityCollections.entities(
entity.getVersions()).removeEmpties();
89 EntityCollections.entities(
entity.getDescriptors()).removeEmpties();
90 if(DossierType.TYPE_PROJECT.equals(
entity.getType())) {
91 Project project =
entity.getProject();
93 project =
new Project();
95 project.setProjectTitle(
entity.getDescription());
96 entity.setProject(project);
97 project.setDossier(
entity);
99 PhraseBuilder pb =
new PhraseBuilder();
100 pb.addWord(project.getProjectCode());
101 pb.addPendingSeparator(
" - ");
102 pb.addWord(project.getProjectTitle());
104 entity.setDescription(pb.toString());
110 CategoryResults.normalizeUniquePaths(
entity);
111 if(!Strings.isBlank(rpi.getRelatedPath())) {
112 Relateds.from(rpi.getRelatedPath()).addDestination(
113 DossierPU.getObjectPath(
entity),
114 rpi.getDescription());
116 if(
entity.getId() !=
null) {
117 String url = Strings.unpunctuateKeepPath(
entity.getCategory().getPath()).toLowerCase() +
119 "/" + Strings.unpunctuate(
entity.getDescription()).toLowerCase();
120 EntityWebUrls.addWebUrl(
"/dossier/" +
entity.getId(), url);
◆ setContact()
void org.turro.dossier.dossier.DossierWrapper.setContact |
( |
IContact |
contact | ) |
|
◆ setIssueParticipant()
void org.turro.dossier.dossier.DossierWrapper.setIssueParticipant |
( |
String |
issueParticipant | ) |
|
◆ shouldLog()
boolean org.turro.dossier.dossier.DossierWrapper.shouldLog |
( |
| ) |
|
|
protected |
The documentation for this class was generated from the following file: