package com.agi.bean.ondemand.regressionsuite; import java.io.Serializable; import java.util.*; import com.pmease.quickbuild.annotation.Editable; import com.pmease.quickbuild.annotation.ChoiceProvider; @Editable(name="On-Demand Regression Suite") public class TestSetting implements Serializable { private static final long serialVersionUID = 1L; private List testModes = new ArrayList<>(); private List components = new ArrayList<>(); private String testList; // ========================= // Test Modes // ========================= @Editable(order=10, name="Select Test Modes", refresh=true) @ChoiceProvider("getTestModeChoices") public List getTestModes() { return testModes; } public void setTestModes(List testModes) { this.testModes = testModes; } public static List getTestModeChoices() { return Arrays.asList( "Build", "Enable Regression Test Suite" ); } // ========================= // Categories (NOW CONDITIONAL) // ========================= @Editable( order=20, name="Test Categories", visible="regressionEnabled" ) @ChoiceProvider("getComponentChoices") public List getComponents() { return components; } public void setComponents(List components) { this.components = components; } public static List getComponentChoices() { return Arrays.asList( "Access", "AnalysisTools", "Application", "Attitude" ); } // ========================= // Free text // ========================= @Editable( order=30, name="Enter Test Categories", visible="regressionEnabled" ) public String getTestList() { return testList; } public void setTestList(String testList) { this.testList = testList; } // ========================= // Visibility logic // ========================= public boolean isRegressionEnabled() { return testModes != null && testModes.contains("Enable Regression Test Suite"); } }