com.teamscale.index.metadata.abap.EReleaseState Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of teamscale-commons Show documentation
Show all versions of teamscale-commons Show documentation
Provides common DTOs for Teamscale
The 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 com.teamscale.index.metadata.abap;
import org.conqat.lib.commons.js_export.ExportToTypeScript;
import org.conqat.lib.commons.test.IndexValueClass;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Defines possible values for state of release of some ABAP object. These values are found in newer
* S4/HANA systems in the interface IF_ARS_API_CONSTANTS. To see them, logon to the SAP system
* through SAP GUI, open transaction SE11 -> Display data type IF_ARS_API_CONSTANTS -> click
* "Attributes" tab. For the row with attribute value "CS_STATE", click the icon under column
* "Associated Type".
*/
@ExportToTypeScript
@IndexValueClass
public enum EReleaseState {
DECOMMISSIONED("Decommissioned"),
/** Deprecated */
DEPRECATED("Deprecated"),
/** Not released */
NOT_RELEASED("Not released"),
/** Not to be released */
NOT_TO_BE_RELEASED("Not to be released"),
/** Not to be released stable */
NOT_TO_BE_RELEASED_STABLE("Not to be released stable"),
/** Released */
RELEASED("Released"),
/** Released with feature toggle */
RELEASED_WITH_FEATURE_TOGGLE("Released with feature toggle"),
/** Revoked. This is obsolete but keep it nevertheless */
REVOKED("Revoked"),
/**
* Represents some new state for which no enumeration exists and a new one needs to be created.
*/
UNKNOWN_STATE("Unknown State");
private static final String HUMAN_READABLE_NAME_PROPERTY = "humanReadableName";
@JsonProperty(HUMAN_READABLE_NAME_PROPERTY)
private final String humanReadableName;
@JsonCreator
EReleaseState(@JsonProperty(HUMAN_READABLE_NAME_PROPERTY) String humanReadableName) {
this.humanReadableName = humanReadableName;
}
/**
* Derives a {@link EReleaseState} from some given enum name. Returns {@link #UNKNOWN_STATE} if the
* id is not defined in this enumeration.
*/
public static EReleaseState getReleaseStateFromName(String enumName) {
for (EReleaseState releaseState : EReleaseState.values()) {
if (releaseState != UNKNOWN_STATE && releaseState.name().equals(enumName)) {
return releaseState;
}
}
return UNKNOWN_STATE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy