- Author
- Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g
Definition at line 39 of file InterestsVM.java.
◆ InterestsVM()
org.turro.interest.InterestsVM.InterestsVM |
( |
| ) |
|
Definition at line 41 of file InterestsVM.java.
42 SessionObjects objects = SessionObjects.instance(Application.getResolverRequest());
43 selectedCategories = objects.sync(
"interest-categories", HashSet.class, () ->
new HashSet<>());
44 selectedLabels = objects.sync(
"interest-labels", HashSet.class, () ->
new HashSet<>());
◆ getCategories()
◆ getLabels()
List<String> org.turro.interest.InterestsVM.getLabels |
( |
| ) |
|
◆ getLinkAttribute()
String org.turro.interest.InterestsVM.getLinkAttribute |
( |
Interest |
interest | ) |
|
Definition at line 132 of file InterestsVM.java.
133 return switch(interest.getEntity().getRoot()) {
134 case "contact",
"convocation",
"issue",
"publication",
"service",
"practicalwork" ->
136 ElephantContext.getRootWebPath() +
137 EntityInfoContent.createURL(EntityInfoType.FULL, LinkType.WEB) +
"&path=" + interest.getEntity().getPath() +
139 default ->
"href=\"" +
140 ElephantContext.getRootWebPath() + interest.getEntity().getEntityUrl() +
◆ getModel()
List<Interest> org.turro.interest.InterestsVM.getModel |
( |
| ) |
|
Definition at line 113 of file InterestsVM.java.
115 interests.
collect(selectedCategories);
117 return interests.
get().stream()
118 .filter(i -> selectedLabels.contains(i.getLabel()))
void collect(Set< InterestCategory > categories)
◆ isSelected() [1/2]
Definition at line 61 of file InterestsVM.java.
62 return selectedCategories.contains(category);
◆ isSelected() [2/2]
boolean org.turro.interest.InterestsVM.isSelected |
( |
String |
label | ) |
|
◆ removeAllCats()
void org.turro.interest.InterestsVM.removeAllCats |
( |
| ) |
|
◆ removeAllLabels()
void org.turro.interest.InterestsVM.removeAllLabels |
( |
| ) |
|
◆ selectAllCats()
void org.turro.interest.InterestsVM.selectAllCats |
( |
| ) |
|
Definition at line 49 of file InterestsVM.java.
50 selectedCategories.addAll(InterestCategories.get());
◆ selectAllLabels()
void org.turro.interest.InterestsVM.selectAllLabels |
( |
| ) |
|
◆ toggleCategory()
void org.turro.interest.InterestsVM.toggleCategory |
( |
@BindingParam("category") InterestCategory |
category | ) |
|
Definition at line 67 of file InterestsVM.java.
68 if(selectedCategories.contains(category)) {
69 selectedCategories.remove(category);
71 selectedCategories.add(category);
◆ toggleLabel()
void org.turro.interest.InterestsVM.toggleLabel |
( |
@BindingParam("label") String |
label | ) |
|
Definition at line 96 of file InterestsVM.java.
97 if(selectedLabels.contains(label)) {
98 selectedLabels.remove(label);
100 selectedLabels.add(label);
The documentation for this class was generated from the following file: