Skip to content

Commit c2a9936

Browse files
Seamless handling of Cross-level consumption of destination-fragment pairs
1 parent 9963244 commit c2a9936

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

cloudplatform/connectivity-destination-service/src/main/java/com/sap/cloud/sdk/cloudplatform/connectivity/TransparentProxyDestination.java

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ public class TransparentProxyDestination implements HttpDestination
3737
static final String TENANT_SUBDOMAIN_HEADER_KEY = "x-tenant-subdomain";
3838
static final String TENANT_ID_HEADER_KEY = "x-tenant-id";
3939
static final String FRAGMENT_OPTIONAL_HEADER_KEY = "x-fragment-optional";
40+
static final String DESTINATION_LEVEL_HEADER_KEY = "x-destination-level";
41+
static final String FRAGMENT_LEVEL_HEADER_KEY = "x-fragment-level";
4042
static final String TOKEN_SERVICE_TENANT_HEADER_KEY = "x-token-service-tenant";
4143
static final String CLIENT_ASSERTION_HEADER_KEY = "x-client-assertion";
4244
static final String CLIENT_ASSERTION_TYPE_HEADER_KEY = "x-client-assertion-type";
@@ -673,6 +675,34 @@ public DynamicBuilder fragmentName( @Nonnull final String fragmentName )
673675
return header(new Header(FRAGMENT_NAME_HEADER_KEY, fragmentName));
674676
}
675677

678+
/**
679+
* Sets the destination level for the dynamic destination. See
680+
* https://help.sap.com/docs/connectivity/sap-btp-connectivity-cf/dynamic-lookup-of-destinations
681+
*
682+
* @param destinationLevel
683+
* The level of the destination to use.
684+
* @return This builder instance for method chaining.
685+
*/
686+
@Nonnull
687+
public DynamicBuilder destinationLevel( @Nonnull final String destinationLevel )
688+
{
689+
return header(new Header(DESTINATION_LEVEL_HEADER_KEY, destinationLevel));
690+
}
691+
692+
/**
693+
* Sets the fragment level for the dynamic destination. See
694+
* https://help.sap.com/docs/connectivity/sap-btp-connectivity-cf/dynamic-lookup-of-destinations
695+
*
696+
* @param fragmentLevel
697+
* The level of the fragment to use.
698+
* @return This builder instance for method chaining.
699+
*/
700+
@Nonnull
701+
public DynamicBuilder fragmentLevel( @Nonnull final String fragmentLevel )
702+
{
703+
return header(new Header(FRAGMENT_LEVEL_HEADER_KEY, fragmentLevel));
704+
}
705+
676706
/**
677707
* Sets the fragment optional flag for the dynamic destination. See
678708
* https://help.sap.com/docs/connectivity/sap-btp-connectivity-cf/dynamic-lookup-of-destinations

0 commit comments

Comments
 (0)