class VersionHandler {

	static void changeVersion(JsonObject actionData) {
		LoggingService.logInfo(MODULE_NAME, "Start performing change version operation, received from ioFog controller");
		if (SystemUtils.IS_OS_WINDOWS) {
			return; // TODO implement
		}

		try{

			VersionCommand versionCommand = parseJson(actionData);
			String provisionKey = actionData.getString("provisionKey");

			if (isValidChangeVersionOperation(versionCommand)) {
				executeChangeVersionScript(versionCommand, provisionKey);
			}

		} catch (UnknownVersionCommandException e) {
			logError(MODULE_NAME, "Error performing change version operation : Invalid command", e);
		} catch (Exception e){
			logError(MODULE_NAME, "Error performing change version operation", new AgentSystemException(e.getMessage(), e));
		}
		LoggingService.logInfo(MODULE_NAME, "Finished performing change version operation, received from ioFog controller");
	}

}