Class IndicesPrivileges
java.lang.Object
org.elasticsearch.client.security.user.privileges.AbstractIndicesPrivileges
org.elasticsearch.client.security.user.privileges.IndicesPrivileges
- All Implemented Interfaces:
org.elasticsearch.common.xcontent.ToXContent,org.elasticsearch.common.xcontent.ToXContentObject
public final class IndicesPrivileges extends AbstractIndicesPrivileges implements org.elasticsearch.common.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 Modifier and Type Class Description static classIndicesPrivileges.BuilderNested classes/interfaces inherited from class org.elasticsearch.client.security.user.privileges.AbstractIndicesPrivileges
AbstractIndicesPrivileges.FieldSecurityNested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params -
Field Summary
Fields inherited from class org.elasticsearch.client.security.user.privileges.AbstractIndicesPrivileges
allowRestrictedIndices, indices, privilegesFields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS -
Method Summary
Modifier and Type Method Description static IndicesPrivileges.Builderbuilder()booleanequals(java.lang.Object o)static IndicesPrivilegesfromXContent(org.elasticsearch.common.xcontent.XContentParser parser)AbstractIndicesPrivileges.FieldSecuritygetFieldSecurity()java.lang.StringgetQuery()A query limiting the visible documents in the indices.inthashCode()booleanisUsingDocumentLevelSecurity()Iftruesome documents might not be visible.booleanisUsingFieldLevelSecurity()Iftruesome document fields might not be visible.java.lang.StringtoString()org.elasticsearch.common.xcontent.XContentBuildertoXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.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.common.xcontent.ToXContentObject
isFragment
-
Method Details
-
getFieldSecurity
-
getQuery
@Nullable public java.lang.String 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
public boolean equals(java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
toXContent
public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws java.io.IOException- Specified by:
toXContentin interfaceorg.elasticsearch.common.xcontent.ToXContent- Throws:
java.io.IOException
-
fromXContent
public static IndicesPrivileges fromXContent(org.elasticsearch.common.xcontent.XContentParser parser) -
builder
-