use of com.haulmont.cuba.core.app.ServerInfoService in project cuba by cuba-platform.
the class CronValidator method validate.
@Override
public void validate(Object value) throws ValidationException {
if (value != null) {
ServerInfoService serverInfoService = AppBeans.get(ServerInfoService.NAME);
Messages messages = AppBeans.get(Messages.NAME);
try {
new CronSequenceGenerator(value.toString(), serverInfoService.getTimeZone());
} catch (Exception e) {
throw new ValidationException(messages.getMessage(CronValidator.class, "validation.cronInvalid"));
}
}
}
Aggregations