public class ScpCfDestinationFacade extends AbstractDestinationFacade
In addition to reading destinations via the SCP CF destination service REST API , this class provides the ability to read HTTP destination information from the environment variable "destinations". The environment variable is expected to be in JSON format.
Example:
[{
"name": "ErpQueryEndpoint",
"url": "https://my-erp.com",
"username": "username",
"password": "password",
"properties": [
{
"key": "proxyHost",
"value": "my-proxy.com"
},
{
"key": "proxyPort",
"value": "8080"
},
{
"key": "TrustAll",
"value": "false"
}
]
}]
Constructor and Description |
---|
ScpCfDestinationFacade()
Creates a new facade based on the
XsuaaService . |
ScpCfDestinationFacade(com.sap.cloud.sdk.cloudplatform.connectivity.DestinationService destinationService)
Creates a new facade based on the given destination service.
|
Modifier and Type | Method and Description |
---|---|
GenericDestination |
getGenericDestination(String destinationName)
Returns the
GenericDeclaration for the given name. |
Map<String,? extends GenericDestination> |
getGenericDestinationsByName()
Returns all destinations by their names.
|
declareDestinations, getDestination, getDestinationsByName, getDestinationType, getRfcDestination, getRfcDestinationsByName
public ScpCfDestinationFacade()
XsuaaService
.public ScpCfDestinationFacade(@NonNull com.sap.cloud.sdk.cloudplatform.connectivity.DestinationService destinationService)
destinationService
- The destination service to be used by this facade.public GenericDestination getGenericDestination(String destinationName) throws DestinationNotFoundException, DestinationAccessException
GenericDeclaration
for the given name.destinationName
- The destination name to get the associated destination for.DestinationNotFoundException
- If the GenericDeclaration
cannot be found.DestinationAccessException
- If there is an issue while accessing destination information.public Map<String,? extends GenericDestination> getGenericDestinationsByName() throws DestinationAccessException
DestinationAccessException
- If there is an issue while accessing destination information.Copyright © 2018 SAP SE. All rights reserved.