sap.prd.cmintegration.cli.GetTransportDevelopmentSystemSOLMAN Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ci-integration-cli Show documentation
Show all versions of ci-integration-cli Show documentation
SAP Change Management Integration
package sap.prd.cmintegration.cli;
import static sap.prd.cmintegration.cli.Commands.Helpers.getCommandName;
import java.util.function.Function;
import org.apache.commons.cli.Options;
import org.apache.commons.lang3.StringUtils;
import com.sap.cmclient.Transport;
import sap.ai.st.cm.plugins.ciintegration.odataclient.CMODataTransport;
/**
* Command for retrieving the description of a transport.
*/
@CommandDescriptor(name="get-transport-development-system", type = BackendType.SOLMAN)
class GetTransportDevelopmentSystemSOLMAN extends TransportRelatedSOLMAN {
GetTransportDevelopmentSystemSOLMAN(String host, String user, String password, String changeId, String transportId, boolean isReturnCodeMode) {
super(host, user, password, changeId, transportId, isReturnCodeMode);
}
@Override
protected Function getAction() {
return new Function() {
@Override
public String apply(Transport t) {
String developmentSystem = ((CMODataTransport)t).getDevelopmentSystemID();
if(StringUtils.isBlank(developmentSystem)) {
developmentSystem = "";
}
return developmentSystem;
};
};
}
public final static void main(String[] args) throws Exception {
TransportRelatedSOLMAN.main(GetTransportDevelopmentSystemSOLMAN.class, new Options(), args,
getCommandName(GetTransportDevelopmentSystemSOLMAN.class),
"Returns the development system id for the given transport.", "");
}
}