Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
System
Lib
core
OS Core Common
Commits
f70d3862
Commit
f70d3862
authored
Aug 19, 2021
by
neelesh thakur
Browse files
Merge branch 'remove-deprecated-api' into 'master'
remove deprecated search API from client lib See merge request
!113
parents
7d3d9a5b
e2a64496
Pipeline
#61059
failed with stages
in 7 minutes and 39 seconds
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
NOTICE
View file @
f70d3862
...
...
@@ -24,7 +24,7 @@ The following software have components provided under the terms of this license:
- Expression Language 3.0 (from https://projects.eclipse.org/projects/ee4j.el)
- FindBugs-jsr305 (from http://findbugs.sourceforge.net/)
- Google HTTP Client Library for Java (from https://repo1.maven.org/maven2/com/google/http-client/google-http-client)
- Gson (from http://
code.google.
com/
p/
google
-
gson/)
- Gson (from http
s
://
repo1.maven.org/maven2/
com/google
/code/
gson/
gson
)
- Guava InternalFutureFailureAccess and InternalFutures (from https://repo1.maven.org/maven2/com/google/guava/failureaccess)
- Guava: Google Core Libraries for Java (from https://repo1.maven.org/maven2/com/google/guava/guava)
- HPPC Collections (from https://repo1.maven.org/maven2/com/carrotsearch/hppc)
...
...
src/main/java/org/opengroup/osdu/core/common/search/ISearchService.java
View file @
f70d3862
...
...
@@ -14,8 +14,11 @@
package
org.opengroup.osdu.core.common.search
;
import
com.google.gson.JsonObject
;
import
org.opengroup.osdu.core.common.model.search.*
;
import
org.opengroup.osdu.core.common.model.search.CursorQueryRequest
;
import
org.opengroup.osdu.core.common.model.search.CursorQueryResponse
;
import
org.opengroup.osdu.core.common.model.search.QueryRequest
;
import
org.opengroup.osdu.core.common.model.search.QueryResponse
;
import
org.opengroup.osdu.core.common.model.search.SearchException
;
public
interface
ISearchService
{
CursorQueryResponse
getAllKindEntries
(
String
kind
)
throws
SearchException
;
...
...
@@ -23,8 +26,4 @@ public interface ISearchService {
QueryResponse
search
(
QueryRequest
searchRequest
)
throws
SearchException
;
CursorQueryResponse
searchCursor
(
CursorQueryRequest
cursorRequest
)
throws
SearchException
;
JsonObject
getIndexSchema
(
String
kind
)
throws
SearchException
;
void
deleteIndex
(
String
kind
)
throws
SearchException
;
}
\ No newline at end of file
src/main/java/org/opengroup/osdu/core/common/search/SearchService.java
View file @
f70d3862
...
...
@@ -14,7 +14,6 @@
package
org.opengroup.osdu.core.common.search
;
import
com.google.gson.JsonObject
;
import
org.opengroup.osdu.core.common.http.json.HttpResponseBodyMapper
;
import
org.opengroup.osdu.core.common.http.json.HttpResponseBodyParsingException
;
import
org.opengroup.osdu.core.common.model.http.DpsHeaders
;
...
...
@@ -74,22 +73,6 @@ public class SearchService implements ISearchService {
return
result
.
IsNotFoundCode
()
?
new
CursorQueryResponse
()
:
this
.
getResult
(
result
,
CursorQueryResponse
.
class
);
}
@Override
public
JsonObject
getIndexSchema
(
String
kind
)
throws
SearchException
{
String
url
=
this
.
createUrl
(
String
.
format
(
"/index/schema/%s"
,
kind
));
HttpResponse
result
=
this
.
httpClient
.
send
(
HttpRequest
.
get
().
url
(
url
).
headers
(
this
.
headers
.
getHeaders
()).
build
());
return
result
.
IsNotFoundCode
()
?
null
:
this
.
getResult
(
result
,
JsonObject
.
class
);
}
@Override
public
void
deleteIndex
(
String
kind
)
throws
SearchException
{
String
url
=
this
.
createUrl
(
String
.
format
(
"/index/%s"
,
kind
));
HttpResponse
result
=
this
.
httpClient
.
send
(
HttpRequest
.
delete
().
url
(
url
).
headers
(
this
.
headers
.
getHeaders
()).
build
());
this
.
getResult
(
result
,
String
.
class
);
}
private
SearchException
generateException
(
HttpResponse
result
)
{
return
new
SearchException
(
"Error making request to Search service. Check the inner HttpResponse for more info."
,
result
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment