protected void eagerVerifyPrecondition() throws CommandException, PreconditionException {
validateChangeValue(changeValue);
if (bundleJob == null) {
LOG.info("BundleChangeCommand not succeeded - " + "job " + jobId + " does not exist");
throw new PreconditionException(ErrorCode.E1314, jobId);
}
if (isChangePauseTime) {
if (bundleJob.getStatus() == Job.Status.SUCCEEDED || bundleJob.getStatus() == Job.Status.FAILED
|| bundleJob.getStatus() == Job.Status.KILLED || bundleJob.getStatus() == Job.Status.DONEWITHERROR
|| bundleJob == null) {
LOG.info("BundleChangeCommand not succeeded for changing pausetime- " + "job " + jobId + " finished, status is "
+ bundleJob.getStatusStr());
throw new PreconditionException(ErrorCode.E1312, jobId, bundleJob.getStatus().toString());
}
}
else if(isChangeEndTime){
if (bundleJob.getStatus() == Job.Status.KILLED || bundleJob == null) {
LOG.info("BundleChangeCommand not succeeded for changing endtime- " + "job " + jobId + " finished, status is "
+ bundleJob.getStatusStr());
throw new PreconditionException(ErrorCode.E1312, jobId, bundleJob.getStatus().toString());
}
}
}