cloud-sdk-java
cloud-sdk-java copied to clipboard
Adaptation Required for Deprecated ScpCfDestination Methods in SAP Cloud SDK Upgrade (v4.28.0 to v5.13.0)
Issue Description
Hi Colleagues,
We are in the phase of upgrading the SAP cloud sdk version from 4.28.0
to 5.13.0
.
However in the process, we noticed that after upgrading the version, the dependency com.sap.cloud.sdk.cloudplatform:scp-cf
, as shown below, is now deprecated and is to be moved to com.sap.cloud.sdk:sdk-core
:
Hence, we did that but then the classed pertaining to the following imports was no longer supported:
• ScpCfDestination
• ScpCfDestinationLoader
• ScpCfDestinationOptionsAugmenter
• ScpCfDestinationRetrievalStrategy
Hence, as suggested in the migration guide, we imported the relevant classes and made relevant changes.
We have a class ‘S4Destination’ which is designed to retrieve the destination information required to connect to SAP S/4HANA Cloud in a multi-tenant environment. It checks for a specific property on the destinations and ensures only one valid destination is configured, and returns an HttpDestination for communication.
However, at one of the places in our code, as shown below, we were using the method getName()
of the ScpCfDestination
class to retrieve the destination name from an object of the type ScpCfDestination
.
Please refer the entire code from here.
Now, after replacing the ScpCfDestination
with the new Destination
implementation, we see that this method is no more available with the new implementation and its extension class which is DestinationProperties
.
Hence, can you please help us adapt this logic with the new Destination class provided?
Important information:
- Your code : Destination class
Impact / Priority
We are in the phase of upgrading our CAP version to 3.2.0
in a month and hence need to migrate to sdk version 5 as a preparatory step which is a blocker for us now.
Project Details
The main repo of our project as well as the sub-domain Resource Request where this code for destination resides:
- For Resource Management umbrella module : https://github.tools.sap/Cloud4RM/Resource-Management
- For pom file with the version we are migrating from : https://github.tools.sap/Cloud4RM/Resource-Request/blob/master/project-integration-adapter/pom.xml#L16
- For Resource Request module : https://github.tools.sap/Cloud4RM/Resource-Request
- SDK Version:
4.28.0
- Link to GitHub repo: https://github.tools.sap/Cloud4RM/Resource-Management
- Project type, for example:
- [x] CAP Project
- [ ] SDK Maven Archetype
- [ ] None of the above:
- Platform:
- [x] Cloud Foundry
- [ ] Deploy with Confidence (Cloud Foundry)
- [ ] None of the above: