BrightSide Workbench Full Report + Source Code
org.turro.activity.IssueParticipationCatcher Class Reference
Inheritance diagram for org.turro.activity.IssueParticipationCatcher:
Collaboration diagram for org.turro.activity.IssueParticipationCatcher:

Public Member Functions

String getDescription ()
 
Dao createDao ()
 
WhereClause getQuery (Path entityPath)
 
boolean getCanDelete (IssueParticipant v)
 
String getDescription (IssueParticipant v)
 
void doDelete (IssueParticipant v)
 
void doShow (IssueParticipant v)
 
void onChange (Object entity)
 
void onDelete (Object entity)
 
boolean getCanChangeFor (IssueParticipant v)
 
void doChangeFor (IssueParticipant v, Path toPath)
 
Object getReferringEntity (IssueParticipant v)
 
- Public Member Functions inherited from org.turro.activity.JpaParticipationCatcher< IssueParticipant >
List< IParticipationgetParticipations (Path entityPath)
 
Dao getDao ()
 
abstract Dao createDao ()
 
abstract WhereClause getQuery (Path entityPath)
 
abstract boolean getCanDelete (V v)
 
abstract boolean getCanChangeFor (V v)
 
abstract String getDescription (V v)
 
abstract void doDelete (V v)
 
abstract void doShow (V v)
 
abstract void doChangeFor (V v, Path toPath)
 
abstract Object getReferringEntity (V v)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 37 of file IssueParticipationCatcher.java.

Member Function Documentation

◆ createDao()

Dao org.turro.activity.IssueParticipationCatcher.createDao ( )

Definition at line 45 of file IssueParticipationCatcher.java.

45  {
46  return new DossierPU();
47  }

◆ doChangeFor()

void org.turro.activity.IssueParticipationCatcher.doChangeFor ( IssueParticipant  v,
Path  toPath 
)

Definition at line 105 of file IssueParticipationCatcher.java.

105  {
106  if(v != null && !toPath.isRoot() && "contact".equals(toPath.getRoot())) {
107  WhereClause wc = new WhereClause();
108  wc.addClause("update IssueParticipant");
109  wc.addClause("set idContact = :to");
110  wc.addClause("where idContact = :from");
111  wc.addNamedValue("to", toPath.getLastNode());
112  wc.addNamedValue("from", v.getIdContact());
113  getDao().executeUpdate(wc);
114  }
115  }
int executeUpdate(String query)
Definition: Dao.java:463
Here is the call graph for this function:

◆ doDelete()

void org.turro.activity.IssueParticipationCatcher.doDelete ( IssueParticipant  v)

Definition at line 72 of file IssueParticipationCatcher.java.

72  {
73  Issue i = v.getIssue();
74  i.getParticipants().remove(v);
75  getDao().saveObject(i);
76  }
Here is the call graph for this function:

◆ doShow()

void org.turro.activity.IssueParticipationCatcher.doShow ( IssueParticipant  v)

Definition at line 79 of file IssueParticipationCatcher.java.

79  {
80  DossierMenu.showIssue(v.getIssue().getId());
81  }
Here is the call graph for this function:

◆ getCanChangeFor()

boolean org.turro.activity.IssueParticipationCatcher.getCanChangeFor ( IssueParticipant  v)

Definition at line 100 of file IssueParticipationCatcher.java.

100  {
101  return true;
102  }

◆ getCanDelete()

boolean org.turro.activity.IssueParticipationCatcher.getCanDelete ( IssueParticipant  v)

Definition at line 62 of file IssueParticipationCatcher.java.

62  {
63  return IssueParticipantRole.ISSUE_ASSISTANT.equals(v.getRole());
64  }
Here is the call graph for this function:

◆ getDescription() [1/2]

String org.turro.activity.IssueParticipationCatcher.getDescription ( )

Definition at line 40 of file IssueParticipationCatcher.java.

40  {
41  return "BrightSide Dossiers - " + I_.get("Issue");
42  }
Here is the call graph for this function:

◆ getDescription() [2/2]

String org.turro.activity.IssueParticipationCatcher.getDescription ( IssueParticipant  v)

Definition at line 67 of file IssueParticipationCatcher.java.

67  {
68  return v.getIssue().getDescription() + Chars.forward().spaced() + I_.byKey(v.getRole().toString());
69  }
Here is the call graph for this function:

◆ getQuery()

WhereClause org.turro.activity.IssueParticipationCatcher.getQuery ( Path  entityPath)

Definition at line 50 of file IssueParticipationCatcher.java.

50  {
51  if(!entityPath.isRoot() && "contact".equals(entityPath.getRoot())) {
52  WhereClause wc = new WhereClause();
53  wc.addClause("select distinct iparticipant from IssueParticipant as iparticipant");
54  wc.addClause("where iparticipant.idContact = :id");
55  wc.addNamedValue("id", entityPath.getLastNode());
56  return wc;
57  }
58  return null;
59  }
Here is the call graph for this function:

◆ getReferringEntity()

Object org.turro.activity.IssueParticipationCatcher.getReferringEntity ( IssueParticipant  v)

Definition at line 118 of file IssueParticipationCatcher.java.

118  {
119  return v.getIssue();
120  }
Here is the call graph for this function:

◆ onChange()

void org.turro.activity.IssueParticipationCatcher.onChange ( Object  entity)

Definition at line 84 of file IssueParticipationCatcher.java.

84  {
85  if(entity instanceof IContact) {
86  IContact contact = (IContact) entity;
88  "update IssueParticipant set name = ? " +
89  "where idContact = ?",
90  new Object[] { contact.getName(), contact.getId() });
91  }
92  }
Here is the call graph for this function:

◆ onDelete()

void org.turro.activity.IssueParticipationCatcher.onDelete ( Object  entity)

Definition at line 95 of file IssueParticipationCatcher.java.

95  {
96  // do nothing
97  }

The documentation for this class was generated from the following file: