Search in sources :

Example 46 with SingleIdentityChosenEvent

use of org.olat.basesecurity.events.SingleIdentityChosenEvent in project openolat by klemens.

the class BGUserManagementController method extractIdentities.

private List<Identity> extractIdentities(Event event) {
    if (event instanceof SingleIdentityChosenEvent) {
        SingleIdentityChosenEvent chosenEvent = (SingleIdentityChosenEvent) event;
        Identity identity = chosenEvent.getChosenIdentity();
        return Collections.singletonList(identity);
    }
    if (event instanceof MultiIdentityChosenEvent) {
        MultiIdentityChosenEvent chosenEvent = (MultiIdentityChosenEvent) event;
        List<Identity> identities = chosenEvent.getChosenIdentities();
        return identities;
    }
    return Collections.emptyList();
}
Also used : SingleIdentityChosenEvent(org.olat.basesecurity.events.SingleIdentityChosenEvent) Identity(org.olat.core.id.Identity) MultiIdentityChosenEvent(org.olat.basesecurity.events.MultiIdentityChosenEvent)

Aggregations

SingleIdentityChosenEvent (org.olat.basesecurity.events.SingleIdentityChosenEvent)46 Identity (org.olat.core.id.Identity)40 MultiIdentityChosenEvent (org.olat.basesecurity.events.MultiIdentityChosenEvent)24 ArrayList (java.util.ArrayList)16 List (java.util.List)14 TableEvent (org.olat.core.gui.components.table.TableEvent)10 TableMultiSelectEvent (org.olat.core.gui.components.table.TableMultiSelectEvent)10 WindowControl (org.olat.core.gui.control.WindowControl)8 CloseableModalController (org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)8 UserRequest (org.olat.core.gui.UserRequest)6 ControllerCreator (org.olat.core.gui.control.creator.ControllerCreator)6 PopupBrowserWindow (org.olat.core.gui.control.generic.popup.PopupBrowserWindow)6 AssertException (org.olat.core.logging.AssertException)6 UserInfoMainController (org.olat.user.UserInfoMainController)6 Collection (java.util.Collection)4 ContextEntry (org.olat.core.id.context.ContextEntry)4 ContactList (org.olat.core.util.mail.ContactList)4 MailNotificationEditController (org.olat.core.util.mail.MailNotificationEditController)4 MailTemplate (org.olat.core.util.mail.MailTemplate)4 DateFormat (java.text.DateFormat)2