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

org.conqat.engine.index.shared.IProjectId Maven / Gradle / Ivy

The newest version!
package org.conqat.engine.index.shared;

import org.checkerframework.checker.nullness.qual.Nullable;
import org.conqat.lib.commons.test.IndexValueClass;

import com.fasterxml.jackson.annotation.JsonCreator;

/** Unambiguous ID for Teamscale projects. */
@IndexValueClass(containedInBackup = true)
public interface IProjectId extends Comparable {

	/**
	 * Returns true when this is an {@link InternalProjectId}. Returns false when this is a
	 * {@link PublicProjectId}.
	 */
	boolean isInternal();

	/**
	 * Deserializes a project ID either to an {@link InternalProjectId} or a {@link PublicProjectId}.
	 * Empty or null values are deserialized to null.
	 */
	@JsonCreator
	static @Nullable IProjectId getInstance(String projectId) {
		return ProjectIdBase.convert(projectId);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy