Class AbstractSearchRequestFilterImpl
- java.lang.Object
-
- org.nuxeo.elasticsearch.http.readonly.AbstractSearchRequestFilterImpl
-
- All Implemented Interfaces:
SearchRequestFilter
- Direct Known Subclasses:
AuditRequestFilter
,DefaultSearchRequestFilter
public abstract class AbstractSearchRequestFilterImpl extends Object implements SearchRequestFilter
Rewrite an Elsaticsearch search request to add security filter. URI Search are turned into Request body search.- Since:
- 7.3
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
BACKSLASH_MARKER
protected String
filteredPayload
protected String
indices
protected static String
MATCH_ALL
protected String
payload
protected NuxeoPrincipal
principal
protected static String
QUERY_STRING
protected String
rawQuery
protected String
types
Deprecated, for removal: This API element is subject to removal in a future version.since 11.4, types have been removed since Elasticsearch 7.xprotected String
url
-
Constructor Summary
Constructors Constructor Description AbstractSearchRequestFilterImpl()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
extractPayloadFromQuery()
String
getIndices()
abstract String
getPayload()
protected Map<String,String>
getQueryMap()
String
getTypes()
String
getUrl()
void
init(CoreSession session, String indices, String rawQuery, String payload)
protected void
setRawQuery(Map<String,String> map)
String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.nuxeo.elasticsearch.http.readonly.filter.SearchRequestFilter
init
-
-
-
-
Field Detail
-
MATCH_ALL
protected static final String MATCH_ALL
- See Also:
- Constant Field Values
-
QUERY_STRING
protected static final String QUERY_STRING
- See Also:
- Constant Field Values
-
BACKSLASH_MARKER
protected static final String BACKSLASH_MARKER
- See Also:
- Constant Field Values
-
payload
protected String payload
-
rawQuery
protected String rawQuery
-
types
@Deprecated(since="11.4", forRemoval=true) protected String types
Deprecated, for removal: This API element is subject to removal in a future version.since 11.4, types have been removed since Elasticsearch 7.x
-
indices
protected String indices
-
principal
protected NuxeoPrincipal principal
-
url
protected String url
-
filteredPayload
protected String filteredPayload
-
-
Method Detail
-
init
public void init(CoreSession session, String indices, String rawQuery, String payload)
- Specified by:
init
in interfaceSearchRequestFilter
-
getTypes
public String getTypes()
- Specified by:
getTypes
in interfaceSearchRequestFilter
-
getIndices
public String getIndices()
- Specified by:
getIndices
in interfaceSearchRequestFilter
-
getUrl
@NotNull public String getUrl()
- Specified by:
getUrl
in interfaceSearchRequestFilter
-
getPayload
public abstract String getPayload() throws org.json.JSONException
- Specified by:
getPayload
in interfaceSearchRequestFilter
- Throws:
org.json.JSONException
-
extractPayloadFromQuery
protected void extractPayloadFromQuery()
-
-