use of com.opentext.ia.sdk.client.api.ServerConfiguration in project infoarchive-sip-sdk by Enterprise-Content-Management.
the class PropertiesBasedConfigurer method getServerConfiguration.
@Override
public ServerConfiguration getServerConfiguration() {
ServerConfiguration result = new ServerConfiguration();
result.setApplicationName(configuration.get(APPLICATION_NAME));
result.setAuthenticationGateway(configuration.get(SERVER_AUTHENTICATION_GATEWAY));
result.setAuthenticationPassword(configuration.get(SERVER_AUTHENTICATION_PASSWORD));
result.setAuthenticationToken(configuration.get(SERVER_AUTENTICATON_TOKEN));
result.setAuthenticationUser(configuration.get(SERVER_AUTHENTICATION_USER));
result.setBillboardUri(configuration.get(SERVER_URI));
result.setClientId(configuration.get(SERVER_CLIENT_ID));
result.setClientSecret(configuration.get(SERVER_CLIENT_SECRET));
result.setHttpClientClassName(configuration.get(HTTP_CLIENT_CLASSNAME));
result.setProxyHost(configuration.get(PROXY_HOST));
result.setProxyPort(configuration.get(PROXY_PORT));
return result;
}
use of com.opentext.ia.sdk.client.api.ServerConfiguration in project infoarchive-sip-sdk by Enterprise-Content-Management.
the class ArchiveClients method configuringServerUsing.
/**
* Returns an ArchiveClient instance and configures the InfoArchive server that it communicates with.
* @param configurer How to configure InfoArchive
* @param optionalClient The REST client to use for communication with the server
* @param optionalClock The clock to use
* @return An ArchiveClient
*/
public static ArchiveClient configuringServerUsing(InfoArchiveConfigurer configurer, RestClient optionalClient, Clock optionalClock) {
ServerConfiguration serverConfiguration = configurer.getServerConfiguration();
Clock clock = Optional.ofNullable(optionalClock).orElseGet(DefaultClock::new);
RestClient client = Optional.ofNullable(optionalClient).orElseGet(() -> createRestClient(serverConfiguration, clock));
configurer.configure();
return usingAlreadyConfiguredServer(serverConfiguration, client, clock);
}
Aggregations