use of com.microsoft.tooling.msservices.serviceexplorer.azure.webapp.base.WebAppBasePropertyViewPresenter in project azure-tools-for-java by Microsoft.
the class FunctionAppPropertyView method createPresenter.
@Override
protected WebAppBasePropertyViewPresenter createPresenter() {
return new WebAppBasePropertyViewPresenter() {
@Override
protected IFunctionApp getWebAppBase(String subscriptionId, String functionAppId, String name) {
return Azure.az(AzureAppService.class).subscription(subscriptionId).functionApp(functionAppId);
}
@Override
protected void updateAppSettings(String subscriptionId, String functionAppId, String name, Map toUpdate, Set toRemove) {
final IFunctionApp functionApp = getWebAppBase(subscriptionId, functionAppId, name);
final IAppServiceUpdater appServiceUpdater = functionApp.update();
appServiceUpdater.withAppSettings(toUpdate);
toRemove.forEach(key -> appServiceUpdater.withoutAppSettings((String) key));
appServiceUpdater.commit();
}
};
}
Aggregations