package net.sourceforge.fenixedu.presentationTier.Action.vigilancy; import java.io.Serializable; import java.util.ArrayList; import java.util.Collections; import java.util.List; import net.sourceforge.fenixedu.domain.DomainReference; import net.sourceforge.fenixedu.domain.Person; import net.sourceforge.fenixedu.domain.vigilancy.VigilantGroup; public class VigilantWrapperBean implements Serializable { public DomainReference person; public List> convokableForGroups; public List> notConvokableForGroups; public VigilantWrapperBean(Person person) { setPerson(person); setConvokableForGroups((List) Collections.EMPTY_LIST); setNotConvokableForGroups((List) Collections.EMPTY_LIST); } public Person getPerson() { return person.getObject(); } public void setPerson(Person person) { this.person = new DomainReference(person); } public List getConvokableForGroups() { List groups = new ArrayList(); for (DomainReference group : convokableForGroups) { groups.add(group.getObject()); } return groups; } public void setConvokableForGroups(List convokableForGroups) { this.convokableForGroups = new ArrayList>(); for (VigilantGroup group : convokableForGroups) { this.convokableForGroups.add(new DomainReference(group)); } } public List getNotConvokableForGroups() { List groups = new ArrayList(); for (DomainReference group : notConvokableForGroups) { groups.add(group.getObject()); } return groups; } public void setNotConvokableForGroups(List notConvokableForGroups) { this.notConvokableForGroups = new ArrayList>(); for (VigilantGroup group : notConvokableForGroups) { this.notConvokableForGroups.add(new DomainReference(group)); } } }