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

Public Member Functions

void onGoalChange ()
 
void onDeadlineChange ()
 
void onBeneficiariesChange ()
 
void onElegibleChange ()
 
void onFeaturesChange ()
 
void onIntensityChange ()
 
void onNewTag (InputEvent event)
 
void afterSave ()
 
void doFinally () throws Exception
 
- Public Member Functions inherited from org.turro.jpa.composer.EntityComposer< E, ID >
final void onChange (Event event)
 
final void onSave ()
 
final void onDelete ()
 
Object getEntity ()
 
Object getWrapper ()
 
void doBeforeComposeChildren (Component comp) throws Exception
 
void doAfterCompose (Component comp) throws Exception
 

Protected Member Functions

String getAttributeName ()
 
ProjectGrant getEntityInstance (Long id)
 
DaoEntity getWrapperInstance (Component comp)
 
boolean beforeSave ()
 
boolean shouldBeSaved ()
 
boolean inSaveRole ()
 
boolean inDeleteRole ()
 
- Protected Member Functions inherited from org.turro.jpa.composer.EntityComposer< E, ID >
abstract E getEntityInstance (ID id)
 
void doOnSave ()
 
void doOnDelete ()
 
boolean beforeDelete ()
 
void afterDelete ()
 
void doOnChange ()
 
boolean hasChanged ()
 
void retrieveEntity ()
 
boolean canClose ()
 

Additional Inherited Members

- Protected Attributes inherited from org.turro.jpa.composer.EntityComposer< E, ID >
entity
 
DaoEntity wrapper
 

Detailed Description

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

Definition at line 43 of file ProjectGrantComposer.java.

Member Function Documentation

◆ afterSave()

void org.turro.dossier.grant.ProjectGrantComposer.afterSave ( )

Reimplemented from org.turro.jpa.composer.EntityComposer< E, ID >.

Definition at line 129 of file ProjectGrantComposer.java.

129  {
130  if(entity != null) {
131  String entityPath = DossierPU.getObjectPath(entity);
132  Tags.setTags(entityPath, tags.getObjectValues()
133  .stream().map(s -> s.getTagName()).collect(Collectors.toSet()));
134  DossierMenu.showProjectGrant(entity.getId());
135  }
136  }
Set< TagItem > getObjectValues()
Here is the call graph for this function:

◆ beforeSave()

boolean org.turro.dossier.grant.ProjectGrantComposer.beforeSave ( )
protected

Reimplemented from org.turro.jpa.composer.EntityComposer< E, ID >.

Definition at line 121 of file ProjectGrantComposer.java.

121  {
122  if(entity != null) {
123  // Notify?
124  }
125  return super.beforeSave();
126  }

◆ doFinally()

void org.turro.dossier.grant.ProjectGrantComposer.doFinally ( ) throws Exception

Reimplemented from org.turro.jpa.composer.EntityComposer< E, ID >.

Definition at line 139 of file ProjectGrantComposer.java.

139  {
140  super.doFinally();
141  if(entity.getGoal() != null) goal.setValue(entity.getGoal().getWiki());
142  if(entity.getDeadline() != null) deadline.setValue(entity.getDeadline().getWiki());
143  if(entity.getBeneficiaries() != null) beneficiaries.setValue(entity.getBeneficiaries().getWiki());
144  if(entity.getElegible() != null) elegible.setValue(entity.getElegible().getWiki());
145  if(entity.getFeatures() != null) features.setValue(entity.getFeatures().getWiki());
146  if(entity.getIntensity()!= null) intensity.setValue(entity.getIntensity().getWiki());
147  tags.setCreatable(false);
148  tags.setObjectValues(Tags.getAsItemFrom(DossierPU.getObjectPath(entity)));
149  }
void setObjectValues(Collection< TagItem > internalValues)
void setValue(String value)
Definition: WikiEditor.java:98
Here is the call graph for this function:

◆ getAttributeName()

String org.turro.dossier.grant.ProjectGrantComposer.getAttributeName ( )
protected

Reimplemented from org.turro.jpa.composer.EntityComposer< E, ID >.

Definition at line 98 of file ProjectGrantComposer.java.

98  {
99  return "projectGrant";
100  }

◆ getEntityInstance()

ProjectGrant org.turro.dossier.grant.ProjectGrantComposer.getEntityInstance ( Long  id)
protected

Definition at line 103 of file ProjectGrantComposer.java.

103  {
104  if(id == null) {
105  entity = new ProjectGrant();
106  } else {
107  entity = new DossierPU().find(ProjectGrant.class, id);
108  }
109  return entity;
110  }

◆ getWrapperInstance()

DaoEntity org.turro.dossier.grant.ProjectGrantComposer.getWrapperInstance ( Component  comp)
protected

Reimplemented from org.turro.jpa.composer.EntityComposer< E, ID >.

Definition at line 113 of file ProjectGrantComposer.java.

113  {
114  ProjectGrantWrapper w = new ProjectGrantWrapper(entity);
115  Framework.getCurrent().setSelectedLabel(w.getTabLabel());
116  Framework.getCurrent().setSelectedTooltiptext(w.getTooltiptext());
117  return w;
118  }
Here is the call graph for this function:

◆ inDeleteRole()

boolean org.turro.dossier.grant.ProjectGrantComposer.inDeleteRole ( )
protected

Reimplemented from org.turro.jpa.composer.EntityComposer< E, ID >.

Definition at line 162 of file ProjectGrantComposer.java.

162  {
163  return Application.getApplication().isInRole("dossier:edit");
164  }
Here is the call graph for this function:

◆ inSaveRole()

boolean org.turro.dossier.grant.ProjectGrantComposer.inSaveRole ( )
protected

Reimplemented from org.turro.jpa.composer.EntityComposer< E, ID >.

Definition at line 157 of file ProjectGrantComposer.java.

157  {
158  return Application.getApplication().isInRole("dossier:edit");
159  }
Here is the call graph for this function:

◆ onBeneficiariesChange()

void org.turro.dossier.grant.ProjectGrantComposer.onBeneficiariesChange ( )

Definition at line 66 of file ProjectGrantComposer.java.

66  {
67  entity.getBeneficiaries().setWiki(beneficiaries.getValue());
68  entity.getBeneficiaries().setText(beneficiaries.getHtml());
69  }
Here is the call graph for this function:

◆ onDeadlineChange()

void org.turro.dossier.grant.ProjectGrantComposer.onDeadlineChange ( )

Definition at line 60 of file ProjectGrantComposer.java.

60  {
61  entity.getDeadline().setWiki(deadline.getValue());
62  entity.getDeadline().setText(deadline.getHtml());
63  }
Here is the call graph for this function:

◆ onElegibleChange()

void org.turro.dossier.grant.ProjectGrantComposer.onElegibleChange ( )

Definition at line 72 of file ProjectGrantComposer.java.

72  {
73  entity.getElegible().setWiki(elegible.getValue());
74  entity.getElegible().setText(elegible.getHtml());
75  }
Here is the call graph for this function:

◆ onFeaturesChange()

void org.turro.dossier.grant.ProjectGrantComposer.onFeaturesChange ( )

Definition at line 78 of file ProjectGrantComposer.java.

78  {
79  entity.getFeatures().setWiki(features.getValue());
80  entity.getFeatures().setText(features.getHtml());
81  }
Here is the call graph for this function:

◆ onGoalChange()

void org.turro.dossier.grant.ProjectGrantComposer.onGoalChange ( )

Definition at line 54 of file ProjectGrantComposer.java.

54  {
55  entity.getGoal().setWiki(goal.getValue());
56  entity.getGoal().setText(goal.getHtml());
57  }
Here is the call graph for this function:

◆ onIntensityChange()

void org.turro.dossier.grant.ProjectGrantComposer.onIntensityChange ( )

Definition at line 84 of file ProjectGrantComposer.java.

84  {
85  entity.getIntensity().setWiki(intensity.getValue());
86  entity.getIntensity().setText(intensity.getHtml());
87  }
Here is the call graph for this function:

◆ onNewTag()

void org.turro.dossier.grant.ProjectGrantComposer.onNewTag ( InputEvent  event)

Definition at line 90 of file ProjectGrantComposer.java.

90  {
91  String value = event.getValue();
92  if(!Strings.isBlank(value)) {
93  tags.addToModel(new TagItem(value, 0));
94  }
95  }
void addToModel(TagItem value)
Here is the call graph for this function:

◆ shouldBeSaved()

boolean org.turro.dossier.grant.ProjectGrantComposer.shouldBeSaved ( )
protected

Reimplemented from org.turro.jpa.composer.EntityComposer< E, ID >.

Definition at line 152 of file ProjectGrantComposer.java.

152  {
153  return !entity.isEmpty() && (entity.getId() == null || entity.getId() == 0) || super.shouldBeSaved();
154  }

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