Module org.elasticsearch.xcore
Class ApplicationPrivilegeDescriptor
java.lang.Object
org.elasticsearch.xpack.core.security.authz.privilege.ApplicationPrivilegeDescriptor
- All Implemented Interfaces:
Writeable,org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentObject
public class ApplicationPrivilegeDescriptor
extends Object
implements org.elasticsearch.xcontent.ToXContentObject, Writeable
An
ApplicationPrivilegeDescriptor is a representation of a stored ApplicationPrivilege.
A user (via a role) can be granted an application privilege by name (e.g. ("myapp", "read").
In general, this privilege name will correspond to a pre-defined ApplicationPrivilegeDescriptor, which then
is used to determine the set of actions granted by the privilege.-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetName()inthashCode()parse(org.elasticsearch.xcontent.XContentParser parser, String defaultApplication, String defaultName, boolean allowType) Construct a newApplicationPrivilegeDescriptorfrom XContent.toString()org.elasticsearch.xcontent.XContentBuildertoXContent(org.elasticsearch.xcontent.XContentBuilder builder, boolean includeTypeField) org.elasticsearch.xcontent.XContentBuildertoXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) voidwriteTo(StreamOutput out) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
DOC_TYPE_VALUE
- See Also:
-
-
Constructor Details
-
ApplicationPrivilegeDescriptor
-
ApplicationPrivilegeDescriptor
- Throws:
IOException
-
-
Method Details
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
getApplication
-
getName
-
getActions
-
getMetadata
-
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
-
toXContent
public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, boolean includeTypeField) throws IOException - Throws:
IOException
-
toString
-
parse
public static ApplicationPrivilegeDescriptor parse(org.elasticsearch.xcontent.XContentParser parser, String defaultApplication, String defaultName, boolean allowType) throws IOException Construct a newApplicationPrivilegeDescriptorfrom XContent.- Parameters:
defaultApplication- The application name to use if none is specified in the XContent bodydefaultName- The privilege name to use if none is specified in the XContent bodyallowType- If true, accept a "type" field (for which the value must matchDOC_TYPE_VALUE);- Throws:
IOException
-
equals
-
hashCode
public int hashCode()
-