Skip to content
Snippets Groups Projects

Resolve "Update to Java17 and CXF4"

Merged Stefan E. Funk requested to merge 202-update-to-java17 into develop
Files
3
@@ -84,15 +84,14 @@ public abstract class ElasticSearchUtils {
* @param theClient
* @param theUri
* @param theJson
* @param theType
* @param theIndex
* @return
* @throws IOException
*/
public IndexResponse createObject(RestHighLevelClient theClient, URI theUri,
String theJson, String theType, String theIndex) throws IOException {
String theJson, String theIndex) throws IOException {
IndexRequest indexRequest =
new IndexRequest().index(theIndex).type(theType)
new IndexRequest().index(theIndex)
.id(forgetUriPrefix(theUri)).source(theJson, XContentType.JSON);
return theClient.index(indexRequest, RequestOptions.DEFAULT);
}
@@ -105,14 +104,13 @@ public abstract class ElasticSearchUtils {
* @param theClient
* @param theUri
* @param theName
* @param theType
* @return A JSON string containing all information ElasticSearch holds for
* that ID.
* @throws IOException
*/
public String getObject(RestHighLevelClient theClient, URI theUri,
String theName, String theType) throws IOException {
GetRequest getRequest = new GetRequest(theName, theType, forgetUriPrefix(theUri));
String theName) throws IOException {
GetRequest getRequest = new GetRequest(theName, forgetUriPrefix(theUri));
GetResponse response = theClient.get(getRequest, RequestOptions.DEFAULT);
return response.getSourceAsString();
}
@@ -120,7 +118,7 @@ public abstract class ElasticSearchUtils {
/**
* <p>
* Get index name from hostname (MUST be NOT NULL after INIT taken from URL
* path as: /textgrid-nonpublic/metadata/[indexName]/[indexType]/!
* path as: /textgrid-nonpublic/metadata/[indexName]/!
* </p>
*
* @param theHost
@@ -137,13 +135,15 @@ public abstract class ElasticSearchUtils {
/**
* <p>
* Get index type from hostname (MUST be NOT NULL after INIT taken from URL
* path as: /textgrid-nonpublic/metadata/[indexName]/[indexType]/!
* path as: /textgrid-nonpublic/metadata/[indexName]/!
* </p>
*
* @param theHost
* @return
* @throws MalformedURLException
* @deprecated
*/
@Deprecated
public static String getIndexType(String theHost)
throws MalformedURLException {
String index[] = new URL(theHost).getPath().split("/");
Loading