19 package org.turro.contacts.social;
21 import java.util.ArrayList;
22 import java.util.List;
24 import org.turro.contacts.Contact;
25 import org.turro.security.SocialGroups;
26 import org.zkoss.zul.Listbox;
38 loadSocialGroups(contact);
42 return model.getSelection();
45 private void loadSocialGroups(
Contact contact) {
46 List<SocialGroupValue> list =
new ArrayList<>();
50 model =
new SocialGroupModel(list);
51 model.setMultiple(
true);
52 SocialGroups instance = SocialGroups.instance();
54 .map(syndication -> instance.getSocialGroup(syndication.getName()))
55 .map(sg ->
new SocialGroupValue(sg.getName(), sg.getId(), sg.getType()))
static Collection< SecurityGroup > allowedSocialGroups()