public class VisibilityEvaluator extends Object
Constructor and Description |
---|
VisibilityEvaluator(AuthorizationContainer authsContainer)
Creates a new evaluator for the authorizations found in the given container.
|
VisibilityEvaluator(Authorizations authorizations)
Creates a new evaluator for the given collection of authorizations.
|
Modifier and Type | Method and Description |
---|---|
static byte[] |
escape(byte[] auth,
boolean quote)
Properly escapes an authorization string.
|
boolean |
evaluate(ColumnVisibility visibility)
Evaluates the given column visibility against the authorizations provided to this evaluator.
|
public VisibilityEvaluator(AuthorizationContainer authsContainer)
public VisibilityEvaluator(Authorizations authorizations)
authorizations
- authorizations objectpublic static byte[] escape(byte[] auth, boolean quote)
auth
- authorization string, as UTF-8 encoded bytesquote
- true to wrap escaped authorization in quotespublic boolean evaluate(ColumnVisibility visibility) throws VisibilityParseException
visibility
- column visibility to evaluateVisibilityParseException
- if an AND or OR subexpression has less than two children, or a subexpression is of an
unknown typeCopyright © 2011–2019 The Apache Software Foundation. All rights reserved.