protected XMLGregorianCalendar validateTerminationTime(String value) throws UnacceptableTerminationTimeFault {
XMLGregorianCalendar tt = parseTerminationTime(value);
if (tt == null) {
UnacceptableTerminationTimeFaultType fault = new UnacceptableTerminationTimeFaultType();
throw new UnacceptableTerminationTimeFault(
"Unable to parse termination time: '" + value + "'",
fault);
}
XMLGregorianCalendar ct = getCurrentTime();
int c = tt.compare(ct);
if (c == DatatypeConstants.LESSER || c == DatatypeConstants.EQUAL) {
UnacceptableTerminationTimeFaultType fault = new UnacceptableTerminationTimeFaultType();
fault.setMinimumTime(ct);
throw new UnacceptableTerminationTimeFault(
"Invalid termination time",
fault);
}
return tt;
}