Class ApplicationResourcePrivileges
java.lang.Object
org.elasticsearch.client.security.user.privileges.ApplicationResourcePrivileges
- All Implemented Interfaces:
org.elasticsearch.common.xcontent.ToXContent
,org.elasticsearch.common.xcontent.ToXContentObject
public final class ApplicationResourcePrivileges
extends java.lang.Object
implements org.elasticsearch.common.xcontent.ToXContentObject
Represents privileges over resources that are scoped under an application.
The application, resources and privileges are completely managed by the
client and can be arbitrary string identifiers. Elasticsearch is not
concerned by any resources under an application scope.
-
Nested Class Summary
Nested 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 interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
Constructors Constructor Description ApplicationResourcePrivileges(java.lang.String application, java.util.Collection<java.lang.String> privileges, java.util.Collection<java.lang.String> resources)
Constructs privileges for resources under an application scope. -
Method Summary
Modifier and Type Method Description boolean
equals(java.lang.Object o)
static ApplicationResourcePrivileges
fromXContent(org.elasticsearch.common.xcontent.XContentParser parser)
java.lang.String
getApplication()
java.util.Set<java.lang.String>
getPrivileges()
java.util.Set<java.lang.String>
getResources()
int
hashCode()
java.lang.String
toString()
org.elasticsearch.common.xcontent.XContentBuilder
toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
Constructor Details
-
ApplicationResourcePrivileges
public ApplicationResourcePrivileges(java.lang.String application, java.util.Collection<java.lang.String> privileges, java.util.Collection<java.lang.String> resources)Constructs privileges for resources under an application scope.- Parameters:
application
- The application name. This identifier is completely under the clients control.privileges
- The privileges names. Cannot be null or empty. Privilege identifiers are completely under the clients control.resources
- The resources names. Cannot be null or empty. Resource identifiers are completely under the clients control.
-
-
Method Details
-
getApplication
public java.lang.String getApplication() -
getResources
public java.util.Set<java.lang.String> getResources() -
getPrivileges
public java.util.Set<java.lang.String> getPrivileges() -
equals
public boolean equals(java.lang.Object o)- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()- Overrides:
toString
in 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:
toXContent
in interfaceorg.elasticsearch.common.xcontent.ToXContent
- Throws:
java.io.IOException
-
fromXContent
public static ApplicationResourcePrivileges fromXContent(org.elasticsearch.common.xcontent.XContentParser parser)
-