Class FilterPredicate
- java.lang.Object
-
- org.restheart.security.plugins.authorizers.FilterPredicate
-
public class FilterPredicate extends Object
- Author:
- Andrea Di Cesare <andrea@softinstigate.com>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FilterPredicatefrom(io.undertow.server.HttpServerExchange exchange)org.bson.BsonValuegetId()io.undertow.predicate.PredicategetPredicate()intgetPriority()org.bson.BsonDocumentgetReadFilter()Set<String>getRoles()org.bson.BsonDocumentgetWriteFilter()static com.google.gson.JsonObjectinterpolateFilterVars(io.undertow.server.HttpServerExchange exchange, org.bson.BsonDocument filter)resolves the a filter variables such as %USER, %ROLES, and %NOWbooleanresolve(io.undertow.server.HttpServerExchange exchange)
-
-
-
Method Detail
-
getPredicate
public io.undertow.predicate.Predicate getPredicate()
- Returns:
- the predicate
-
getReadFilter
public org.bson.BsonDocument getReadFilter()
- Returns:
- the readFilter
-
getWriteFilter
public org.bson.BsonDocument getWriteFilter()
- Returns:
- the writeFilter
-
getPriority
public int getPriority()
- Returns:
- the priority
-
getId
public org.bson.BsonValue getId()
- Returns:
- the _id
-
from
public static FilterPredicate from(io.undertow.server.HttpServerExchange exchange)
- Parameters:
exchange-- Returns:
- the acl predicate associated with this request
-
resolve
public boolean resolve(io.undertow.server.HttpServerExchange exchange)
-
interpolateFilterVars
public static com.google.gson.JsonObject interpolateFilterVars(io.undertow.server.HttpServerExchange exchange, org.bson.BsonDocument filter)resolves the a filter variables such as %USER, %ROLES, and %NOW- Parameters:
exchange-filter-- Returns:
- the filter with interpolated variables
-
-