Class IndicesPrivileges

  • All Implemented Interfaces:
    ToXContent, ToXContentObject

    public final class IndicesPrivileges
    extends AbstractIndicesPrivileges
    implements 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.
    • Method Detail

      • getFieldSecurity

        public AbstractIndicesPrivileges.FieldSecurity getFieldSecurity()
        The combination of the granted and denied document fields. May be null, in which case no field level security is applicable, and all the document's fields are granted access to.
      • 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.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object