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

import org.xcolab.client.contest.ContestClientUtil;
import org.xcolab.client.contest.pojo.Contest;

import java.util.List;

public class ActiveMassAction extends ContestMassActionAdapter {

    private final boolean setActive;

    public ActiveMassAction() {
        this(false);
    }

    public ActiveMassAction(boolean setActive) {
        super(setActive ? "Active" : "Prior");
        this.setActive = setActive;
    }

    @Override
    public void execute(List<Contest> contests, boolean actionConfirmed) {
        for (Contest contest : contests) {
            if (contest.getIsSharedContestInForeignColab()) {
                contest = ContestClientUtil.getContest(contest.getContestPK());
            }
            contest.setContestActive(setActive);
            contest.persist();
        }
    }
}

@@ -272,33 +272,35 @@
 e final boolean 
-s
+isS
 etActive;%0A%0A    p
@@ -390,17 +390,19 @@
 boolean 
-s
+isS
 etActive
@@ -419,17 +419,19 @@
   super(
-s
+isS
 etActive
@@ -467,17 +467,19 @@
    this.
-s
+isS
 etActive
@@ -481,17 +481,19 @@
 ctive = 
-s
+isS
 etActive
@@ -826,17 +826,19 @@
 tActive(
-s
+isS
 etActive

rename bool var for clarity