class Configuration {

    public static void setGpsDataIfValid(GpsMode mode, String gpsCoordinates) throws ConfigurationItemException {
    	LoggingService.logDebug(MODULE_NAME, "Start set Gps Data If Valid ");
        if (!isValidCoordinates(gpsCoordinates)) {
            throw new ConfigurationItemException("Incorrect GPS coordinates value: " + gpsCoordinates + "\n"
                    + "Correct format is <DDD.DDDDD(lat),DDD.DDDDD(lon)> (GPS DD format)");
        }
        setGpsMode(mode);
        if (gpsCoordinates != null && !StringUtils.isBlank(gpsCoordinates) && !gpsCoordinates.isEmpty()) {
            setGpsCoordinates(gpsCoordinates.trim());
        }
        LoggingService.logDebug(MODULE_NAME, "Finished set Gps Data If Valid ");
    }

}