package org.xcolab.view.pages.contestmanagement.entities.massactions;

public class FlagMassAction {}

@@ -68,35 +68,1190 @@
 s;%0A%0A
-public class FlagMassAction %7B
+import org.xcolab.client.contest.pojo.Contest;%0Aimport org.xcolab.view.pages.contestmanagement.beans.ContestFlagTextToolTipBean;%0Aimport org.xcolab.view.pages.contestmanagement.utils.ContestMassActionMethods;%0A%0Aimport java.util.List;%0Aimport java.util.stream.Collectors;%0A%0Apublic class FlagMassAction extends ContestMassActionAdapter %7B%0A%0A    private ContestFlagTextToolTipBean contestFlagTextToolTipBean;%0A%0A    public FlagMassAction(String displayName) %7B%0A        super(displayName);%0A    %7D%0A%0A    @Override%0A    public void setup(MassActionDataWrapper dataWrapper) %7B%0A        contestFlagTextToolTipBean = dataWrapper.getContestFlagTextToolTipBean();%0A    %7D%0A%0A    @Override%0A    public void execute(List%3CContest%3E contests, boolean actionConfirmed)%0A            throws IllegalStateException %7B%0A        if (contestFlagTextToolTipBean == null) %7B%0A            throw new IllegalStateException(%22The mass action has not been setup yet.%22);%0A        %7D%0A        // TODO: Fix intermediate solution.%0A        List%3CLong%3E contestIds =%0A                contests.stream().map(Contest::getContestPK).collect(Collectors.toList());%0A        ContestMassActionMethods.setFlag(contestIds, contestFlagTextToolTipBean, null);%0A    %7D%0A
 %7D%0A

implement flag mass action