use of org.guvnor.ala.config.ProviderConfig in project kie-wb-common by kiegroup.
the class ProviderServiceImplTest method prepareConfigurationForCreate.
private void prepareConfigurationForCreate() {
providerConfiguration = mock(ProviderConfiguration.class);
Map values = mock(Map.class);
when(values.size()).thenReturn(5);
when(providerConfiguration.getValues()).thenReturn(values);
providerConfig = mock(ProviderConfig.class);
when(providerConfigConverter.toDomain(providerConfiguration)).thenReturn(providerConfig);
}
use of org.guvnor.ala.config.ProviderConfig in project kie-wb-common by kiegroup.
the class OpenShiftAccessInterfaceImpl method getOpenShiftClient.
@Override
public OpenShiftClient getOpenShiftClient(final ProviderId providerId) {
if (!clientMap.containsKey(providerId.getId())) {
checkInstanceOf("providerId", providerId, OpenShiftProvider.class);
ProviderConfig providerConfig = ((OpenShiftProvider) providerId).getConfig();
OpenShiftClient client = newOpenShiftClient(providerConfig);
clientMap.put(providerId.getId(), client);
}
return clientMap.get(providerId.getId());
}
use of org.guvnor.ala.config.ProviderConfig in project kie-wb-common by kiegroup.
the class RuntimeProvisioningServiceBackendImplTest method testRegisterProvider.
@Test
public void testRegisterProvider() {
ProviderConfig providerConfig = mock(ProviderConfig.class);
runtimeProvisioningServiceBackend.registerProvider(providerConfig);
verify(runtimeProvisioningService, times(1)).registerProvider(providerConfig);
}
use of org.guvnor.ala.config.ProviderConfig in project kie-wb-common by kiegroup.
the class ProviderServiceImpl method createProvider.
@Override
public void createProvider(final ProviderType providerType, final ProviderConfiguration configuration) {
checkNotNull("providerType", providerType);
checkNotNull("providerType.providerTypeKey", providerType.getKey());
checkNotNull("configuration", configuration);
checkNotEmpty("configuration.values", configuration.getValues());
validateForCreateProvider(configuration);
@SuppressWarnings("unchecked") final ProviderConfig providerConfig = (ProviderConfig) providerConverterFactory.getProviderConfigConverter(providerType.getKey()).toDomain(configuration);
runtimeProvisioningService.registerProvider(providerConfig);
}
Aggregations