All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.urbanairship.api.schedule.model.ScheduleValidator Maven / Gradle / Ivy

There is a newer version: 9.5.0
Show newest version
/*
 * Copyright 2013 Urban Airship and Contributors
 */

package com.urbanairship.api.schedule.model;


import com.urbanairship.api.common.parse.APIParsingException;

public class ScheduleValidator {

     public void validate(Schedule schedule) throws APIParsingException {

         if (schedule.getScheduledTimestamp().isBeforeNow()) {
             throw new APIParsingException(String.format("Cannot schedule for the past %s", schedule.getScheduledTimestamp().toString()));
         }
     }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy