Class IndicesPrivileges
java.lang.Object
org.elasticsearch.client.security.user.privileges.AbstractIndicesPrivileges
org.elasticsearch.client.security.user.privileges.IndicesPrivileges
- All Implemented Interfaces:
org.elasticsearch.xcontent.ToXContent
,org.elasticsearch.xcontent.ToXContentObject
public final class IndicesPrivileges
extends AbstractIndicesPrivileges
implements org.elasticsearch.xcontent.ToXContentObject
Represents privileges over indices. There is a canonical set of privilege
names (eg.
IndicesPrivileges#READ_PRIVILEGE_NAME
) but there is
flexibility in the definition of finer grained, more specialized, privileges.
This also encapsulates field and document level security privileges. These
allow to control what fields or documents are readable or queryable.-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.client.security.user.privileges.AbstractIndicesPrivileges
AbstractIndicesPrivileges.FieldSecurity
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.Params
-
Field Summary
Fields inherited from class org.elasticsearch.client.security.user.privileges.AbstractIndicesPrivileges
allowRestrictedIndices, indices, privileges
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS
-
Method Summary
Modifier and TypeMethodDescriptionstatic IndicesPrivileges.Builder
builder()
boolean
static IndicesPrivileges
fromXContent
(org.elasticsearch.xcontent.XContentParser parser) getQuery()
A query limiting the visible documents in the indices.int
hashCode()
boolean
Iftrue
some documents might not be visible.boolean
Iftrue
some document fields might not be visible.toString()
org.elasticsearch.xcontent.XContentBuilder
toXContent
(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) Methods inherited from class org.elasticsearch.client.security.user.privileges.AbstractIndicesPrivileges
allowRestrictedIndices, getIndices, getPrivileges
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Method Details
-
getFieldSecurity
-
getQuery
A query limiting the visible documents in the indices. Can be null, in which case all documents are visible. -
isUsingDocumentLevelSecurity
public boolean isUsingDocumentLevelSecurity()Iftrue
some documents might not be visible. Only the documents matchingquery
will be readable.- Specified by:
isUsingDocumentLevelSecurity
in classAbstractIndicesPrivileges
-
isUsingFieldLevelSecurity
public boolean isUsingFieldLevelSecurity()Iftrue
some document fields might not be visible.- Specified by:
isUsingFieldLevelSecurity
in classAbstractIndicesPrivileges
-
equals
-
hashCode
public int hashCode() -
toString
-
toXContent
public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceorg.elasticsearch.xcontent.ToXContent
- Throws:
IOException
-
fromXContent
-
builder
-