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

org.conqat.engine.service.shared.client.EServiceApiVersion Maven / Gradle / Ivy

There is a newer version: 2025.1.0-rc2
Show newest version
/*
 * Copyright (c) CQSE GmbH
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.conqat.engine.service.shared.client;

/**
 * The version of the service API as used by the service clients. In case of
 * compatible extensions to the API, we increase {@link #CURRENT_VERSION}, thus
 * old clients can still talk to this server. For breaking changes we set both
 * {@link #CURRENT_VERSION} and {@link #MIN_SUPPORTED_VERSION} to the value of (
 * {@link #CURRENT_VERSION} + 1).
 * 
 * @deprecated Use @PublicApi to version new api endpoints, which uses a
 *             versioning scheme that matches the Teamscale version.
 */
public enum EServiceApiVersion {

	/** The first version */
	VERSION_1(1),

	/** The second version (Teamscale 3.0) */
	VERSION_2(2),

	/** Third version (Teamscale 3.2) */
	VERSION_3(3),

	/** Fourth version (Teamscale 3.8) */
	VERSION_4(4),

	/** Fifth version (Teamscale 3.9) */
	VERSION_5(5),

	/** Sixth version (Teamscale 4.1) */
	VERSION_6(6),

	/**
	 * Seventh version (Teamscale 4.7) introducing blacklist types (toleration and
	 * false positive)
	 */
	VERSION_7(7),

	/**
	 * Version 8 (Teamscale 5.5)
	 */
	VERSION_8(8),

	/**
	 * Version 9 (Teamscale 5.7) introduction of api/version-info to supersede
	 * service api version.
	 */
	VERSION_9(9);

	// when adding values here, make sure updating the IDE clients, e.g.
	// com.teamscale.ide.commons.client.services.TeamscaleConnectorUtils

	/** The current version of the service API. */
	public static final EServiceApiVersion CURRENT_VERSION = values()[values().length - 1];

	/**
	 * The minimum version of service clients that are still supported by this
	 * server.
	 */
	public static final EServiceApiVersion MIN_SUPPORTED_VERSION = VERSION_6;

	/**
	 * The version number. This can be used by service clients for version
	 * compatibility checking.
	 */
	private final int versionNumber;

	/** Constructor */
	EServiceApiVersion(int versionNumber) {
		this.versionNumber = versionNumber;
	}

	/** Returns number. */
	public int getVersionNumber() {
		return versionNumber;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy