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 ClassesNested classes/interfaces inherited from class org.elasticsearch.client.security.user.privileges.AbstractIndicesPrivileges
AbstractIndicesPrivileges.FieldSecurityNested 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, privilegesFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS -
Method Summary
Modifier and TypeMethodDescriptionstatic IndicesPrivileges.Builderbuilder()booleanstatic IndicesPrivilegesfromXContent(org.elasticsearch.xcontent.XContentParser parser) getQuery()A query limiting the visible documents in the indices.inthashCode()booleanIftruesome documents might not be visible.booleanIftruesome document fields might not be visible.toString()org.elasticsearch.xcontent.XContentBuildertoXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) Methods inherited from class org.elasticsearch.client.security.user.privileges.AbstractIndicesPrivileges
allowRestrictedIndices, getIndices, getPrivilegesMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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()Iftruesome documents might not be visible. Only the documents matchingquerywill be readable.- Specified by:
isUsingDocumentLevelSecurityin classAbstractIndicesPrivileges
-
isUsingFieldLevelSecurity
public boolean isUsingFieldLevelSecurity()Iftruesome document fields might not be visible.- Specified by:
isUsingFieldLevelSecurityin 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:
toXContentin interfaceorg.elasticsearch.xcontent.ToXContent- Throws:
IOException
-
fromXContent
-
builder
-