| @@ -1020,12 +1020,9 @@ public abstract class Broadcast | |||||
| protected String resume(String reason) { | protected String resume(String reason) { | ||||
| if (reason == ACTION_BY_CLOCK) { | if (reason == ACTION_BY_CLOCK) { | ||||
| boolean inAcceptqble = false; | |||||
| if (this.reason == null) return null; | if (this.reason == null) return null; | ||||
| for (String acceptable : getPauseModesResumableByClock()) { | |||||
| if (this.reason.equalsIgnoreCase(acceptable)) inAcceptqble = true; | |||||
| } | |||||
| if (!inAcceptqble) return null; | |||||
| boolean reason_is_ok = this.reason == ACTION_BY_CLOCK || !child_denies_resume_by_clock(); | |||||
| if (!reason_is_ok) return null; | |||||
| } | } | ||||
| if (!withinOperatingHours()) return "Cannot resume outside operating hours"; | if (!withinOperatingHours()) return "Cannot resume outside operating hours"; | ||||
| @@ -1039,17 +1036,15 @@ public abstract class Broadcast | |||||
| case SUCCESS: | case SUCCESS: | ||||
| resumeFlag.notifyAll(); | resumeFlag.notifyAll(); | ||||
| return "Broadcast resumed"; | return "Broadcast resumed"; | ||||
| case NO_CHANGE: | |||||
| default: | default: | ||||
| return null; | return null; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| /** derived class may override by adding more modes */ | |||||
| protected List<String> getPauseModesResumableByClock() { | |||||
| Vector<String> modes = new Vector<String>(); | |||||
| modes.add(ACTION_BY_CLOCK); | |||||
| return modes; | |||||
| protected boolean child_denies_resume_by_clock() { | |||||
| return false; | |||||
| } | } | ||||
| /** | /** | ||||