BrightSide Workbench Full Report + Source Code
org.turro.dossier.util.DossierImpl Class Reference
Inheritance diagram for org.turro.dossier.util.DossierImpl:
Collaboration diagram for org.turro.dossier.util.DossierImpl:

Public Member Functions

Collection< ICategorygetCategories ()
 
void setCategories (Collection< ICategory > categories)
 
String getDescription ()
 
void setDescription (String description)
 
Long getIdCategory ()
 
void setIdCategory (Long idCategory)
 
Collection< IIssuegetIssues ()
 
void setIssues (Collection< IIssue > issues)
 
String getPath ()
 
void setPath (String path)
 
IContact getSubject ()
 
void setSubject (IContact subject)
 
ICategory addCategory ()
 
IIssue addIssue ()
 
Dossier getEntity ()
 
Category getCategory ()
 
- Public Member Functions inherited from org.turro.related.AbstractAddRelated
HtmlBasedComponent getControl (HtmlBasedComponent base)
 
void save ()
 
void save (boolean showForm)
 

Static Public Member Functions

static Dossier loadByPath (String path)
 

Protected Member Functions

HtmlBasedComponent getComponent ()
 
void saveRelation (boolean showForm)
 

Detailed Description

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

Definition at line 49 of file DossierImpl.java.

Member Function Documentation

◆ addCategory()

ICategory org.turro.dossier.util.DossierImpl.addCategory ( )

Implements org.turro.plugin.dossier.IDossier.

Definition at line 118 of file DossierImpl.java.

118  {
119  CategoryImpl cat = new CategoryImpl();
120  categories.add(cat);
121  return cat;
122  }

◆ addIssue()

IIssue org.turro.dossier.util.DossierImpl.addIssue ( )

Implements org.turro.plugin.dossier.IDossier.

Definition at line 125 of file DossierImpl.java.

125  {
126  IssueImpl issue = new IssueImpl();
127  issue.setDossier(this);
128  issues.add(issue);
129  return issue;
130  }
Here is the call graph for this function:

◆ getCategories()

Collection<ICategory> org.turro.dossier.util.DossierImpl.getCategories ( )

Implements org.turro.plugin.dossier.IDossier.

Definition at line 58 of file DossierImpl.java.

58  {
59  return categories;
60  }

◆ getCategory()

Category org.turro.dossier.util.DossierImpl.getCategory ( )

Definition at line 137 of file DossierImpl.java.

137  {
138  return new DossierPU().find(Category.class, idCategory);
139  }
Here is the caller graph for this function:

◆ getComponent()

HtmlBasedComponent org.turro.dossier.util.DossierImpl.getComponent ( )
protected

Reimplemented from org.turro.related.AbstractAddRelated.

Definition at line 151 of file DossierImpl.java.

151  {
152  RelatedNew rpn = new RelatedNew();
153  rpn.setEntity(this, I_.get("New Dossier"), Images.getImage("dossier_new"), "dossier:new");
154  return rpn;
155  }
Here is the call graph for this function:

◆ getDescription()

String org.turro.dossier.util.DossierImpl.getDescription ( )

Implements org.turro.plugin.dossier.IDossier.

Definition at line 68 of file DossierImpl.java.

68  {
69  return description;
70  }

◆ getEntity()

Dossier org.turro.dossier.util.DossierImpl.getEntity ( )

Implements org.turro.plugin.dossier.IDossier.

Definition at line 133 of file DossierImpl.java.

133  {
134  return loadByPath(path);
135  }
static Dossier loadByPath(String path)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getIdCategory()

Long org.turro.dossier.util.DossierImpl.getIdCategory ( )

Implements org.turro.plugin.dossier.IDossier.

Definition at line 78 of file DossierImpl.java.

78  {
79  return idCategory;
80  }

◆ getIssues()

Collection<IIssue> org.turro.dossier.util.DossierImpl.getIssues ( )

Implements org.turro.plugin.dossier.IDossier.

Definition at line 88 of file DossierImpl.java.

88  {
89  return issues;
90  }

◆ getPath()

String org.turro.dossier.util.DossierImpl.getPath ( )

Implements org.turro.plugin.dossier.IDossier.

Definition at line 98 of file DossierImpl.java.

98  {
99  return path;
100  }

◆ getSubject()

IContact org.turro.dossier.util.DossierImpl.getSubject ( )

Implements org.turro.plugin.dossier.IDossier.

Definition at line 108 of file DossierImpl.java.

108  {
109  return subject;
110  }

◆ loadByPath()

static Dossier org.turro.dossier.util.DossierImpl.loadByPath ( String  path)
static

Definition at line 141 of file DossierImpl.java.

141  {
142  for(Related rp : Relateds.from(path).destinations()) {
143  if(rp.getDestination().startsWith("/dossier")) {
144  return (Dossier) Entities.getController(rp.getDestination()).getEntity();
145  }
146  }
147  return null;
148  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ saveRelation()

void org.turro.dossier.util.DossierImpl.saveRelation ( boolean  showForm)
protected

Reimplemented from org.turro.related.AbstractAddRelated.

Definition at line 158 of file DossierImpl.java.

158  {
159  if(Strings.isBlank(path)) return;
160  if(categories != null) {
161  for(ICategory cat : categories) {
162  cat.save();
163  }
164  // parents might be unassigned thus, iterate again
165  for(ICategory cat : categories) {
166  cat.save();
167  }
168  }
169  Dossier dossier = getEntity();
170  if(dossier == null) {
171  dossier = new Dossier();
172  dossier.setCategory(getCategory());
173  dossier.addSubject(subject);
174  dossier.setDescription(description);
175  dossier.getRelated().setRelatedPath(path);
176  dossier.setCreation(new Date());
177  dossier.setStatus(DossierStatus.DOSSIER_OPENED);
178  if(!showForm) {
179  new DossierWrapper(dossier).save();
180  } else {
181  DossierMenu.showDossier(dossier);
182  }
183  }
184  }
Here is the call graph for this function:

◆ setCategories()

void org.turro.dossier.util.DossierImpl.setCategories ( Collection< ICategory categories)

Implements org.turro.plugin.dossier.IDossier.

Definition at line 63 of file DossierImpl.java.

63  {
64  this.categories = categories;
65  }

◆ setDescription()

void org.turro.dossier.util.DossierImpl.setDescription ( String  description)

Implements org.turro.plugin.dossier.IDossier.

Definition at line 73 of file DossierImpl.java.

73  {
74  this.description = description;
75  }

◆ setIdCategory()

void org.turro.dossier.util.DossierImpl.setIdCategory ( Long  idCategory)

Implements org.turro.plugin.dossier.IDossier.

Definition at line 83 of file DossierImpl.java.

83  {
84  this.idCategory = idCategory;
85  }

◆ setIssues()

void org.turro.dossier.util.DossierImpl.setIssues ( Collection< IIssue issues)

Implements org.turro.plugin.dossier.IDossier.

Definition at line 93 of file DossierImpl.java.

93  {
94  this.issues = issues;
95  }

◆ setPath()

void org.turro.dossier.util.DossierImpl.setPath ( String  path)

Implements org.turro.plugin.dossier.IDossier.

Definition at line 103 of file DossierImpl.java.

103  {
104  this.path = path;
105  }

◆ setSubject()

void org.turro.dossier.util.DossierImpl.setSubject ( IContact  subject)

Implements org.turro.plugin.dossier.IDossier.

Definition at line 113 of file DossierImpl.java.

113  {
114  this.subject = subject;
115  }

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