BrightSide Workbench Full Report + Source Code
org.turro.occurrence.OccurrencesVM Class Reference

Public Member Functions

 OccurrencesVM ()
 
String getOccurrence ()
 
void setOccurrence (String occurrence)
 
String getSubstitution ()
 
void setSubstitution (String substitution)
 
void update ()
 
void substitute (@BindingParam("api") IOccurrenceAPI api)
 
void remove (@BindingParam("api") IOccurrenceAPI api)
 
List< IOccurrenceAPIgetModel ()
 

Detailed Description

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

Definition at line 35 of file OccurrencesVM.java.

Constructor & Destructor Documentation

◆ OccurrencesVM()

org.turro.occurrence.OccurrencesVM.OccurrencesVM ( )

Definition at line 40 of file OccurrencesVM.java.

40  {
41  }

Member Function Documentation

◆ getModel()

List<IOccurrenceAPI> org.turro.occurrence.OccurrencesVM.getModel ( )

Definition at line 81 of file OccurrencesVM.java.

81  {
82  List<IOccurrenceAPI> list = new ArrayList<>();
83  if(!Strings.isBlank(occurrence)) {
84  for(IOccurrenceAPI oapi : Instances.cached().bySuper(AbstractOccurrenceAPI.class, IOccurrenceAPI.class)) {
85  if(oapi.hasOccurrences(occurrence)) {
86  list.add(oapi);
87  }
88  }
89  }
90  return list;
91  }

◆ getOccurrence()

String org.turro.occurrence.OccurrencesVM.getOccurrence ( )

Definition at line 43 of file OccurrencesVM.java.

43  {
44  return occurrence;
45  }

◆ getSubstitution()

String org.turro.occurrence.OccurrencesVM.getSubstitution ( )

Definition at line 51 of file OccurrencesVM.java.

51  {
52  return substitution;
53  }

◆ remove()

void org.turro.occurrence.OccurrencesVM.remove ( @BindingParam("api") IOccurrenceAPI  api)

Definition at line 72 of file OccurrencesVM.java.

72  {
73  if(api != null) {
74  Messages.confirmDeletion().add(occurrence).show(() -> {
75  api.removeOccurrences();
76  BindUtils.postNotifyChange(null, null, OccurrencesVM.this, "model");
77  });
78  }
79  }
Here is the call graph for this function:

◆ setOccurrence()

void org.turro.occurrence.OccurrencesVM.setOccurrence ( String  occurrence)

Definition at line 47 of file OccurrencesVM.java.

47  {
48  this.occurrence = occurrence;
49  }

◆ setSubstitution()

void org.turro.occurrence.OccurrencesVM.setSubstitution ( String  substitution)

Definition at line 55 of file OccurrencesVM.java.

55  {
56  this.substitution = substitution;
57  }

◆ substitute()

void org.turro.occurrence.OccurrencesVM.substitute ( @BindingParam("api") IOccurrenceAPI  api)

Definition at line 65 of file OccurrencesVM.java.

65  {
66  if(api != null && !Strings.isBlank(substitution)) {
67  api.changeOccurrences(substitution);
68  }
69  }

◆ update()

void org.turro.occurrence.OccurrencesVM.update ( )

Definition at line 61 of file OccurrencesVM.java.

61 {}

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