Interface ConnectivityConfiguration
public interface ConnectivityConfiguration
ConnectivityConfiguration
provides read only access to
destination properties.-
Method Summary
Modifier and TypeMethodDescriptionvoid
Removes all destination configurations from the destination cache if such exist.getConfiguration
(String name) Retrieves the destination configuration with the provided name.getConfiguration
(String accountId, String name) Retrieves the destination configuration on account level with the provided name for the provided account Id.getConfigurations
(String accountId) Retrieves all destination configurations on account level for the provided account Id.
-
Method Details
-
getConfiguration
Retrieves the destination configuration with the provided name.- Parameters:
name
- destination name. The name must match the following pattern: "^[A-Za-z0-9-_]{1,200}$".- Returns:
DestinationConfiguration
ornull
if configuration is not found.- Throws:
IllegalArgumentException
- if the name doesn't match the pattern or the found destination configuration is not valid.IllegalStateException
- if there are problems to get the destination configuration.
-
getConfiguration
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 viaTenantContext.getTenant().getAccount().getId()
. Id of the provider account of the calling application is accessible via environment property HC_ACCOUNT. The id must match the following pattern: "^[a-z][a-z0-9]{0,29}$".name
- destination name. The name must match the following pattern: "^[A-Za-z0-9-_]{1,200}$".- Returns:
DestinationConfiguration
ornull
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 SCP local development scenario (there is no account information).IllegalArgumentException
- if the account id and/or name don't match the pattern or the found destination configuration is not valid.IllegalStateException
- if there are problems to get the destination configuration.
-
getConfigurations
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 viaTenantContext.getTenant().getAccount().getId()
. Id of the provider account of the calling application is accessible via environment property HC_ACCOUNT. The id must match the following pattern: "^[a-z][a-z0-9]{0,29}$".- Returns:
Map
with key destination name and valueDestinationConfiguration
ornull
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 SCP local development scenario (there is no account information).IllegalArgumentException
- if the account id doesn't match the pattern.IllegalStateException
- if there are problems to get the destination configurations.
-
clearCache
void clearCache()Removes all destination configurations from the destination cache if such exist. Note that each application instance has its own cache instance.
-