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

com.teamscale.index.metadata.abap.AbapFileMetadata Maven / Gradle / Ivy

package com.teamscale.index.metadata.abap;

import org.conqat.lib.commons.test.IndexValueClass;
import org.conqat.lib.commons.js_export.ExportToTypeScript;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.teamscale.index.metadata.IFileMetadata;

/**
 * Collects various information about an ABAP object, from an ABAP full or
 * incremental export zip file, that will be persisted and used for analysis in
 * Teamscale.
 */
@ExportToTypeScript

@IndexValueClass
public class AbapFileMetadata implements IFileMetadata {

	private static final long serialVersionUID = 1L;

	private static final String FILE_PATH_PROPERTY = "filePath";
	/**
	 * Originating system property. This id must not be changed, it is used in the
	 * .metadata files stored in the Abap git.
	 */
	public static final String ORIGINATING_SYSTEM_PROPERTY = "originatingSystem";
	/**
	 * Creation date property. This id must not be changed, it is used in the
	 * .metadata files stored in the Abap git.
	 */
	public static final String CREATION_DATE_PROPERTY = "creationDate";
	/**
	 * Last update date/time property. This id must not be changed, it is used in
	 * the .metadata files stored in the Abap git.
	 */
	public static final String LAST_UPDATE_DATE_TIME_PROPERTY = "lastUpdateDateTime";

	/**
	 * Program type property. This id must not be changed, it is used in the
	 * .metadata files stored in the Abap git.
	 */
	public static final String PROGRAM_TYPE_PROPERTY = "programType";
	/**
	 * Authorization group property. This id must not be changed, it is used in the
	 * .metadata files stored in the Abap git.
	 */
	public static final String AUTHORIZATION_GROUP_PROPERTY = "authorizationGroup";
	/**
	 * RFC Enablement property. This id must not be changed, it is used in the
	 * .metadata files stored in the Abap git.
	 */
	public static final String IS_RFC_ENABLED_PROPERTY = "isRfcEnabled";
	/**
	 * Code generation property. This id must not be changed, it is used in the
	 * .metadata files stored in the Abap git.
	 */
	public static final String IS_GENERATED_CODE_PROPERTY = "isGeneratedCode";

	/**
	 * Path to the file.
	 */
	@JsonProperty(FILE_PATH_PROPERTY)
	private final String filePath;

	/**
	 * The SAP system in which this ABAP object was created.
	 */
	@JsonProperty(ORIGINATING_SYSTEM_PROPERTY)
	private String originatingSystem;

	/**
	 * The date at which this ABAP object was created.
	 */
	@JsonProperty(CREATION_DATE_PROPERTY)
	private long creationDate;

	/**
	 * The date and time at which an ABAP object was last modified.
	 */
	@JsonProperty(LAST_UPDATE_DATE_TIME_PROPERTY)
	private long lastUpdateDateTime;
	/**
	 * The type of program that must be defined at its creation e.g. Executable
	 * program, include program, e.t.c. Read docs
	 * for more information.
	 */
	@JsonProperty(PROGRAM_TYPE_PROPERTY)
	private EAbapProgramType programType;

	/**
	 * Authorization group are objects that secure ABAP programs against
	 * unauthorized access e.g. S_PROGRAM. Read the following docs for more
	 * information.
	 * 
	 */
	@JsonProperty(AUTHORIZATION_GROUP_PROPERTY)
	private String authorizationGroup;

	/**
	 * Stores whether an ABAP object is enabled for RFC communication.
	 */
	@JsonProperty(IS_RFC_ENABLED_PROPERTY)
	private boolean rfcIsEnabled;

	/**
	 * Stores whether an ABAP object is generated. Read docs
	 * for more information.
	 */
	@JsonProperty(IS_GENERATED_CODE_PROPERTY)
	private boolean codeIsGenerated;

	/**
	 * Constructor to help create JSON objects.
	 */
	@JsonCreator
	public AbapFileMetadata(@JsonProperty(FILE_PATH_PROPERTY) String filePath,
			@JsonProperty(CREATION_DATE_PROPERTY) long creationDate,
			@JsonProperty(LAST_UPDATE_DATE_TIME_PROPERTY) long lastUpdateDateTime,
			@JsonProperty(ORIGINATING_SYSTEM_PROPERTY) String originatingSystem,
			@JsonProperty(PROGRAM_TYPE_PROPERTY) EAbapProgramType programType,
			@JsonProperty(AUTHORIZATION_GROUP_PROPERTY) String authorizationGroup,
			@JsonProperty(IS_RFC_ENABLED_PROPERTY) boolean rfcIsEnabled,
			@JsonProperty(IS_GENERATED_CODE_PROPERTY) boolean codeIsGenerated) {
		this.filePath = filePath;
		this.creationDate = creationDate;
		this.lastUpdateDateTime = lastUpdateDateTime;
		this.originatingSystem = originatingSystem;
		this.programType = programType;
		this.authorizationGroup = authorizationGroup;
		this.rfcIsEnabled = rfcIsEnabled;
		this.codeIsGenerated = codeIsGenerated;
	}

	/** Returns the {@link #filePath}. */
	public String getFilePath() {
		return filePath;
	}

	/** Returns the {@link #originatingSystem}. */
	public String getOriginatingSystem() {
		return originatingSystem;
	}

	/** Returns the creation date. */
	public long getCreationDate() {
		return creationDate;
	}

	/** Returns the last update date and time. */
	public long getLastUpdateDateTime() {
		return lastUpdateDateTime;
	}

	/** @see #originatingSystem */
	public void setOriginatingSystem(String originatingSystem) {
		this.originatingSystem = originatingSystem;
	}

	/** @see #lastUpdateDateTime */
	public void setLastUpdateDateTime(long lastUpdateDateTime) {
		this.lastUpdateDateTime = lastUpdateDateTime;
	}

	/** @see #creationDate */
	public void setCreationDate(long creationDate) {
		this.creationDate = creationDate;
	}

	/** @see #rfcIsEnabled */
	public boolean isRfcEnabled() {
		return rfcIsEnabled;
	}

	/** @see #rfcIsEnabled */
	public void setRfcEnabled(boolean rfcIsEnabled) {
		this.rfcIsEnabled = rfcIsEnabled;
	}

	/** @see #programType */
	public void setProgramType(EAbapProgramType programType) {
		this.programType = programType;
	}

	/** @see #authorizationGroup */
	public void setAuthorizationGroup(String authorizationGroup) {
		this.authorizationGroup = authorizationGroup;
	}

	/** @see #codeIsGenerated */
	public void setCodeIsGenerated(boolean codeIsGenerated) {
		this.codeIsGenerated = codeIsGenerated;
	}

	/** @see #programType */
	public EAbapProgramType getProgramType() {
		return programType;
	}

	/** @see #authorizationGroup */
	public String getAuthorizationGroup() {
		return authorizationGroup;
	}

	/** @see #codeIsGenerated */
	public boolean isCodeGenerated() {
		return codeIsGenerated;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy