Package io.vertx.reactivex.ext.auth.abac
Class Attribute
- java.lang.Object
-
- io.vertx.reactivex.ext.auth.abac.Attribute
-
- All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate
public class Attribute extends Object implements io.vertx.lang.rx.RxDelegate
An attribute is a simple matcher for policies. A Attribute is created from a JsonPointer to the object and a logical operator:has(java.lang.String, java.lang.Object)
- the value must be in the JsonArray or JsonObjecteq(java.lang.String, java.lang.Object)
- the value must be equals to the pointed locationne(java.lang.String, java.lang.Object)
- the value must not be equals to the pointed location
NOTE: This class has been automatically generated from the
original
non RX-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static io.vertx.lang.rx.TypeArg<Attribute>
__TYPE_ARG
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Attribute
create(Function<User,Boolean> function)
A custom function to be used during matching.static Attribute
eq(String pointer, Object value)
Verifies whether the attribute matches the specified.boolean
equals(Object o)
Attribute
getDelegate()
static Attribute
has(String pointer, Object value)
Verifies whether the attribute matches the specified.int
hashCode()
boolean
match(User user)
Verifies whether the attribute matches the specified user.static Attribute
ne(String pointer, Object value)
Verifies whether the attribute matches the specified.static Attribute
newInstance(Attribute arg)
JsonObject
toJson()
String
toString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final io.vertx.lang.rx.TypeArg<Attribute> __TYPE_ARG
-
-
Method Detail
-
getDelegate
public Attribute getDelegate()
- Specified by:
getDelegate
in interfaceio.vertx.lang.rx.RxDelegate
-
has
public static Attribute has(String pointer, Object value)
Verifies whether the attribute matches the specified. The value must be in the JsonArray or JsonObject referenced by the json pointer.- Parameters:
pointer
-value
-- Returns:
-
eq
public static Attribute eq(String pointer, Object value)
Verifies whether the attribute matches the specified. The value must be equal to the value referenced by the json pointer.- Parameters:
pointer
-value
-- Returns:
-
ne
public static Attribute ne(String pointer, Object value)
Verifies whether the attribute matches the specified. The value must not be equal to the value referenced by the json pointer.- Parameters:
pointer
-value
-- Returns:
-
create
public static Attribute create(Function<User,Boolean> function)
A custom function to be used during matching.- Parameters:
function
-- Returns:
-
match
public boolean match(User user)
Verifies whether the attribute matches the specified user.- Parameters:
user
- the user.- Returns:
- true if there's a match
-
toJson
public JsonObject toJson()
-
-