Class FieldRoleMapperExpression
java.lang.Object
org.elasticsearch.client.security.support.expressiondsl.fields.FieldRoleMapperExpression
- All Implemented Interfaces:
RoleMapperExpression
,org.elasticsearch.common.xcontent.ToXContent
,org.elasticsearch.common.xcontent.ToXContentObject
public class FieldRoleMapperExpression extends java.lang.Object implements RoleMapperExpression
An expression that evaluates to
true
if a field (map element) matches
the provided values. A field expression may have more than one provided value, in which
case the expression is true if any of the values are matched.
Expression builder example:
final RoleMapperExpression usernameExpression = FieldRoleMapperExpression.ofUsername("user1@example.org");
-
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 FieldRoleMapperExpression(java.lang.String field, java.lang.Object... values)
-
Method Summary
Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.lang.String
getField()
java.util.List<java.lang.Object>
getValues()
int
hashCode()
static FieldRoleMapperExpression
ofDN(java.lang.Object... values)
static FieldRoleMapperExpression
ofGroups(java.lang.Object... values)
static FieldRoleMapperExpression
ofKeyValues(java.lang.String key, java.lang.Object... values)
static FieldRoleMapperExpression
ofMetadata(java.lang.String key, java.lang.Object... values)
static FieldRoleMapperExpression
ofUsername(java.lang.Object... values)
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, toString, wait, wait, wait
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
Constructor Details
-
FieldRoleMapperExpression
public FieldRoleMapperExpression(java.lang.String field, java.lang.Object... values)
-
-
Method Details
-
getField
public java.lang.String getField() -
getValues
public java.util.List<java.lang.Object> getValues() -
equals
public boolean equals(java.lang.Object o)- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCode
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
-
ofUsername
-
ofGroups
-
ofDN
-
ofMetadata
public static FieldRoleMapperExpression ofMetadata(java.lang.String key, java.lang.Object... values) -
ofKeyValues
public static FieldRoleMapperExpression ofKeyValues(java.lang.String key, java.lang.Object... values)
-