1

change CreateGroupEvent

Co-Authored-By: Lukas Ettel <lukasettel@users.noreply.github.com>
Co-Authored-By: tomvahl <tomvahl@users.noreply.github.com>
Co-Authored-By: xxnitram <xxnitram@users.noreply.github.com>
Co-Authored-By: kasch309 <kasch309@users.noreply.github.com>
This commit is contained in:
killerber4t
2020-03-16 15:36:28 +01:00
parent 314336fd5a
commit 22eede051b
8 changed files with 28 additions and 60 deletions

View File

@ -35,13 +35,11 @@ public class ControllerService {
visibility1 = Visibility.PRIVATE;
}
List<Event> eventList = new ArrayList<>();
Collections.addAll(eventList, new CreateGroupEvent(eventService.checkGroup(), account.getName(), null , GroupType.LECTURE, visibility1),
new AddUserEvent(eventService.checkGroup(), account.getName(),account.getGivenname(),account.getFamilyname(),account.getEmail()),
new UpdateRoleEvent(eventService.checkGroup(), account.getName(), Role.ADMIN),
new UpdateGroupTitleEvent(eventService.checkGroup(), account.getName(), title),
new UpdateGroupDescriptionEvent(eventService.checkGroup(), account.getName(), description),
new UpdateRoleEvent(eventService.checkGroup(),account.getName(), Role.ADMIN));
Group group = new Group();
CreateGroupEvent createGroupEvent = new CreateGroupEvent(eventService.checkGroup(), account.getName(), null , GroupType.LECTURE, visibility1);
createGroupEvent.apply(group);
eventList.add(createGroupEvent);
System.out.println(group.getId() + "" + group.getVisibility().toString());;
eventService.saveEventList(eventList);
}