package org.xcolab.client.activities.enums;

public enum ActivityCategory {
    MEMBER,
    DISCUSSION,
    PROPOSAL,
    CONTEST;
}

@@ -38,16 +38,42 @@
 enums;%0A%0A
+import java.util.Arrays;%0A%0A
 public e
@@ -95,16 +95,17 @@
 egory %7B%0A
+%0A
     MEMB
@@ -110,51 +110,681 @@
 MBER
-,%0A    DISCUSSION,%0A    PROPOSAL,%0A    CONTEST;
+(ContestActivityType.values()),%0A    DISCUSSION(DiscussionActivityType.values()),%0A    PROPOSAL(ProposalActivityType.values()),%0A    CONTEST(ContestActivityType.values());%0A%0A    private final ActivityType%5B%5D activityTypes;%0A%0A    ActivityCategory(ActivityType%5B%5D activityTypes) %7B%0A        this.activityTypes = activityTypes;%0A    %7D%0A%0A    public ActivityType getActivityType(String activityType) %7B%0A        return Arrays.stream(activityTypes)%0A                .filter(s -%3E s.name().equalsIgnoreCase(activityType))%0A                .findAny()%0A                .orElseThrow(() -%3E new IllegalArgumentException(%0A                        %22No enum constant %22 + name() + %22.%22 + activityType));%0A    %7D
 %0A%7D%0A

Add method to get type from category