com.sap.core.connectivity.api.configuration

## Interface ConnectivityConfiguration

-     public interface ConnectivityConfiguration

  `ConnectivityConfiguration` provides read only access to destination properties.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clearCache()` Removes all destination configurations from the destination cache if such exist.
    `DestinationConfiguration` | `getConfiguration(String name)` Retrieves the destination configuration with the provided name.
    `DestinationConfiguration` | `getConfiguration(String accountId, String name)` Retrieves the destination configuration on account level with the provided name for the provided account Id.
    `Map<String,DestinationConfiguration>` | `getConfigurations(String accountId)` Retrieves all destination configurations on account level for the provided account Id.

- - ### Method Detail

    - #### getConfiguration

          DestinationConfiguration getConfiguration(String name)

      Retrieves the destination configuration with the provided name.
      Parameters:
        `name` - destination name.
      Returns:
        `DestinationConfiguration` or `null` if configuration is not found.

    - #### getConfiguration

          DestinationConfiguration getConfiguration(String accountId,
                                                  String name)

      Retrieves the destination configuration on account level with the provided name for the provided account Id. Applications are able to access destination configurations only of accounts which are subscribed to them.
      Parameters:
        `accountId` - Id of the account that is associated with current tenant can be accessed via `TenantContext.getTenant().getAccount().getId()` . Id of the provider account of the calling application is accessible via environment property HC_ACCOUNT.
        `name` - destination name
      Returns:
        `DestinationConfiguration` or `null` if configuration is not found.
      Throws:
        `NotAuthorizedException` - if account Id is not found, missing access permissions for the account, or method is called in the HCP local development scenario (there is no account information).

    - #### getConfigurations

          Map<String,DestinationConfiguration> getConfigurations(String accountId)

      Retrieves all destination configurations on account level for the provided account Id. Applications are able to access destination configurations only of accounts which are subscribed to them.
      Parameters:
        `accountId` - Id of the account that is associated with current tenant can be accessed via `TenantContext.getTenant().getAccount().getId()` . Id of the provider account of the calling application is accessible via environment property HC_ACCOUNT.
      Returns:
        `Map` with key destination name and value `DestinationConfiguration` or `null` if configurations are not found.
      Throws:
        `NotAuthorizedException` - if account Id is not found, missing access permissions for the account, or method is called in the HCP local development scenario (there is no account information).

    - #### clearCache

          void clearCache()

      Removes all destination configurations from the destination cache if such exist. Note that each application instance has its own cache instance.

Copyright © 2016 SAP. All Rights Reserved.