|
|
|
@@ -1020,12 +1020,9 @@ public abstract class Broadcast |
|
|
|
|
|
|
|
protected String resume(String reason) { |
|
|
|
if (reason == ACTION_BY_CLOCK) { |
|
|
|
boolean inAcceptqble = false; |
|
|
|
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"; |
|
|
|
|
|
|
|
@@ -1039,17 +1036,15 @@ public abstract class Broadcast |
|
|
|
case SUCCESS: |
|
|
|
resumeFlag.notifyAll(); |
|
|
|
return "Broadcast resumed"; |
|
|
|
case NO_CHANGE: |
|
|
|
default: |
|
|
|
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; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
@@ -1303,6 +1298,7 @@ public abstract class Broadcast |
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
|
job.jobStatus = null; |
|
|
|
job.errorText = ""; |
|
|
|
if (rescheduleTimeMS == 0) |
|
|
|
{ |
|
|
|
@@ -1490,7 +1486,7 @@ public abstract class Broadcast |
|
|
|
|
|
|
|
public boolean setJobStatus(Job job, JobStatus status) { |
|
|
|
if (job.statusIsFinal()) { |
|
|
|
myLogger.warn("Forbidden ttempt to overwrite a final job status '" + job.jobStatus + "' with '" + status + "'", new Exception("info")); |
|
|
|
myLogger.warn("Forbidden to overwrite a final job status '" + job.jobStatus + "' with '" + status + "'", new Exception("info")); |
|
|
|
return false; |
|
|
|
} |
|
|
|
job.setStatus(status); |
|
|
|
|