43 lines
1.2 KiB
Java
43 lines
1.2 KiB
Java
package envoy.event;
|
|
|
|
import java.util.HashSet;
|
|
import java.util.Set;
|
|
|
|
import envoy.data.User;
|
|
|
|
/**
|
|
* This event creates a group with the given name.<br>
|
|
* <br>
|
|
* Project: <strong>envoy-common</strong><br>
|
|
* File: <strong>GroupCreation.java</strong><br>
|
|
* Created: <strong>25 Mar 2020</strong><br>
|
|
*
|
|
* @author Leon Hofmeister
|
|
* @since Envoy Common v0.1-beta
|
|
*/
|
|
public class GroupCreation extends Event<String> {
|
|
|
|
private final Set<Long> initialMemberIDs;
|
|
|
|
private static final long serialVersionUID = 0L;
|
|
|
|
/**
|
|
* @param value the name of this group at creation time
|
|
* @param initialMemberIDs the IDs of all {@link User}s that should be group
|
|
* members from the beginning on (excluding the creator
|
|
* of this group)
|
|
* @since Envoy Common v0.1-beta
|
|
*/
|
|
public GroupCreation(String value, Set<Long> initialMemberIDs) {
|
|
super(value);
|
|
this.initialMemberIDs = (initialMemberIDs != null) ? initialMemberIDs : new HashSet<>();
|
|
}
|
|
|
|
/**
|
|
* @return the IDs of all {@link User}s that are members from the beginning
|
|
* (excluding the creator of this group)
|
|
* @since Envoy Common v0.1-beta
|
|
*/
|
|
public Set<Long> getInitialMemberIDs() { return initialMemberIDs; }
|
|
}
|