38 lines
1.0 KiB
Java
38 lines
1.0 KiB
Java
package envoy.event;
|
|
|
|
import java.util.*;
|
|
|
|
import envoy.data.User;
|
|
|
|
/**
|
|
* This event creates a group with the given name.
|
|
*
|
|
* @author Leon Hofmeister
|
|
* @since Envoy Common v0.1-beta
|
|
*/
|
|
public final class GroupCreation extends Event<String> {
|
|
|
|
private final Set<Long> initialMemberIDs;
|
|
|
|
private static final long serialVersionUID = 0L;
|
|
|
|
/**
|
|
* @param name 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 name, Set<Long> initialMemberIDs) {
|
|
super(name);
|
|
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; }
|
|
}
|