BrightSide Workbench Full Report + Source Code
org.turro.dossier.zul.www.EditProjectControl Class Reference
Inheritance diagram for org.turro.dossier.zul.www.EditProjectControl:
Collaboration diagram for org.turro.dossier.zul.www.EditProjectControl:

Public Member Functions

void onCategory ()
 
void onTitle ()
 
void onBudget ()
 
void onGoal ()
 
void onSearching ()
 
void onTag ()
 
void onNewTag (InputEvent event)
 
void onSave ()
 
String getGrouping ()
 
void setGrouping (String grouping)
 
String getPath ()
 
void setPath (String path)
 
boolean isRequired ()
 
void setRequired (boolean required)
 
void setDossier (Dossier dossier)
 
DescriptorSet getDescriptors ()
 
- Public Member Functions inherited from org.turro.elephant.TemplateControl
void setRootTmpl (String rootTmpl)
 
void setTmpl (String tmpl)
 
void afterCompose ()
 

Protected Member Functions

void doFinally ()
 

Detailed Description

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

Definition at line 62 of file EditProjectControl.java.

Member Function Documentation

◆ doFinally()

void org.turro.dossier.zul.www.EditProjectControl.doFinally ( )
protected

Reimplemented from org.turro.elephant.TemplateControl.

Definition at line 183 of file EditProjectControl.java.

183  {
184  super.doFinally();
185  IAgreements agreements = Plugins.loadImplementation(IAgreements.class, "agreements");
186  agreements.setContact(Authentication.getIContact());
187  if(!agreements.isValid() || !agreements.canAct("project-new")) {
188  Application.getApplication().sendRedirect(agreements.getPendingActURL("project-new"));
189  } else {
190  checkDossier();
191  initComponents();
192  }
193  }
Here is the call graph for this function:

◆ getDescriptors()

DescriptorSet org.turro.dossier.zul.www.EditProjectControl.getDescriptors ( )

Definition at line 165 of file EditProjectControl.java.

165  {
166  checkDossier();
167  DescriptorSet ds = dossier.getDescriptorSet();
168  if(!"all".equals(grouping)) {
169  CollectionUtil.from(ds).remove(e -> {
170  return CompareUtil.compare(grouping, e.getGrouping()) != 0 ||
171  CompareUtil.compare(required, e.isRequired()) != 0;
172  });
173  }
174  if(!dossier.getProject().getPhaseDefinition().anyTypeMatch(EnumSet.of(PhaseType.EXECUTION, PhaseType.ARCHIVE))) {
175  CollectionUtil.from(ds).remove(e -> {
176  return !DescriptorType.OPENING_DESCRIPTOR.equals(e.getType());
177  });
178  }
179  return ds;
180  }
DescriptorSet getDescriptorSet()
Definition: Dossier.java:650
boolean anyTypeMatch(Collection< PhaseType > types)
Here is the call graph for this function:

◆ getGrouping()

String org.turro.dossier.zul.www.EditProjectControl.getGrouping ( )

Definition at line 137 of file EditProjectControl.java.

137  {
138  return grouping;
139  }

◆ getPath()

String org.turro.dossier.zul.www.EditProjectControl.getPath ( )

Definition at line 145 of file EditProjectControl.java.

145  {
146  return path;
147  }

◆ isRequired()

boolean org.turro.dossier.zul.www.EditProjectControl.isRequired ( )

Definition at line 153 of file EditProjectControl.java.

153  {
154  return required;
155  }

◆ onBudget()

void org.turro.dossier.zul.www.EditProjectControl.onBudget ( )

Definition at line 92 of file EditProjectControl.java.

Here is the call graph for this function:

◆ onCategory()

void org.turro.dossier.zul.www.EditProjectControl.onCategory ( )

Definition at line 78 of file EditProjectControl.java.

78  {
79  Application.getApplication().sendRedirect(
80  "?item=" + dossier.getId() +
81  "&cat=" + category.getObjectValue().getId());
82  //dossier.setCategory(category.getObjectValue());
83  }
Here is the call graph for this function:

◆ onGoal()

void org.turro.dossier.zul.www.EditProjectControl.onGoal ( )

Definition at line 98 of file EditProjectControl.java.

98  {
99  dossier.getProject().setGoal(goal.getValue());
100  }
Here is the call graph for this function:

◆ onNewTag()

void org.turro.dossier.zul.www.EditProjectControl.onNewTag ( InputEvent  event)

Definition at line 115 of file EditProjectControl.java.

115  {
116  String value = event.getValue();
117  String entityPath = DossierPU.getObjectPath(dossier);
118  if(!Strings.isBlank(value)) {
119  Tags.addTag(entityPath, value);
120  tags.addToModel(new TagItem(value, 0));
121  }
122  }
void addToModel(TagItem value)
Here is the call graph for this function:

◆ onSave()

void org.turro.dossier.zul.www.EditProjectControl.onSave ( )

Definition at line 125 of file EditProjectControl.java.

125  {
126  boolean wasNew = dossier.getId() == null || dossier.getId() < 1;
127  DossierWrapper dw = new DossierWrapper(dossier);
128  if(!dossier.isEmpty() && !dw.isEmptyDescriptors(grouping, required)) {
129  dossier = dw.save();
130  if(wasNew) {
131  new NewIdeaNotification(dossier).sendNotification();
132  }
133  Application.getApplication().sendRedirect(path + dossier.getId());
134  }
135  }
Here is the call graph for this function:

◆ onSearching()

void org.turro.dossier.zul.www.EditProjectControl.onSearching ( )

Definition at line 103 of file EditProjectControl.java.

103  {
104  dossier.setSearching(searching.getValue());
105  }
void setSearching(String searching)
Definition: Dossier.java:223
Here is the call graph for this function:

◆ onTag()

void org.turro.dossier.zul.www.EditProjectControl.onTag ( )

Definition at line 108 of file EditProjectControl.java.

108  {
109  String entityPath = DossierPU.getObjectPath(dossier);
110  Tags.setTags(entityPath, tags.getObjectValues()
111  .stream().map(s -> s.getTagName()).collect(Collectors.toSet()));
112  }
Set< TagItem > getObjectValues()
Here is the call graph for this function:

◆ onTitle()

void org.turro.dossier.zul.www.EditProjectControl.onTitle ( )

Definition at line 86 of file EditProjectControl.java.

86  {
87  dossier.setDescription(title.getValue());
88  dossier.getProject().setProjectTitle(title.getValue());
89  }
void setDescription(String description)
Definition: Dossier.java:147
Here is the call graph for this function:

◆ setDossier()

void org.turro.dossier.zul.www.EditProjectControl.setDossier ( Dossier  dossier)

Definition at line 161 of file EditProjectControl.java.

161  {
162  this.dossier = dossier;
163  }

◆ setGrouping()

void org.turro.dossier.zul.www.EditProjectControl.setGrouping ( String  grouping)

Definition at line 141 of file EditProjectControl.java.

141  {
142  this.grouping = grouping;
143  }

◆ setPath()

void org.turro.dossier.zul.www.EditProjectControl.setPath ( String  path)

Definition at line 149 of file EditProjectControl.java.

149  {
150  this.path = path;
151  }

◆ setRequired()

void org.turro.dossier.zul.www.EditProjectControl.setRequired ( boolean  required)

Definition at line 157 of file EditProjectControl.java.

157  {
158  this.required = required;
159  }

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