Skip to content

Commit

Permalink
Improved support for FIWARE smart data models
Browse files Browse the repository at this point in the history
  • Loading branch information
computate committed Jan 4, 2025
1 parent e569295 commit 7fd3900
Show file tree
Hide file tree
Showing 2 changed files with 246 additions and 206 deletions.
34 changes: 34 additions & 0 deletions src/main/java/org/computate/frFR/java/ConfigSite.java
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,38 @@ protected void _clientSolrComputate() throws Exception {
clientSolrComputate = new HttpSolrClient.Builder(solrUrlComputate).withHttpClient(httpClient).build();
}

public String solrUrlFiware;

public String getSolrUrlFiware() {
return solrUrlFiware;
}

public void setSolrUrlFiware(String solrUrlFiware) {
this.solrUrlFiware = solrUrlFiware;
}

protected void _solrUrlFiware() throws Exception {
solrUrlFiware = config
.getString(langueConfigGlobale.getString(I18n.var_SOLR_URL_FIWARE));
}

public SolrClient clientSolrFiware;
protected void _clientSolrFiware() throws Exception {
SSLContextBuilder builder = new SSLContextBuilder();
builder.loadTrustMaterial(null, new TrustSelfSignedStrategy());
SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(builder.build(), NoopHostnameVerifier.INSTANCE);
UsernamePasswordCredentials credentials = new UsernamePasswordCredentials(solrUtilisateur, solrMotDePasse);
CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
PreemptiveAuth requestInterceptor = new PreemptiveAuth(new BasicScheme());
credentialsProvider.setCredentials(AuthScope.ANY, credentials);
CloseableHttpClient httpClient = HttpClients.custom()
.setSSLSocketFactory(sslsf)
.setDefaultCredentialsProvider(credentialsProvider)
.addInterceptorLast(requestInterceptor)
.build();
clientSolrFiware = new HttpSolrClient.Builder(solrUrlFiware).withHttpClient(httpClient).build();
}

/**
* Var.enUS: sourcePaths enUS: The absolute paths to source code directories in
* the app to watch for changes.
Expand Down Expand Up @@ -952,7 +984,9 @@ public void initConfigSite() throws Exception {
_solrUtilisateur();
_solrMotDePasse();
_solrUrlComputate();
_solrUrlFiware();
_clientSolrComputate();
_clientSolrFiware();
_cheminsSource();
_toutCheminsSource();
_nomsMethodeTest();
Expand Down
Loading

0 comments on commit 7fd3900

Please sign in to comment.