Interface ScimFilter
- All Known Implementing Classes:
ScimFilter.And, ScimFilter.Comparison, ScimFilter.Not, ScimFilter.Or, ScimFilter.Present, ScimFilter.ValuePath
A successful syntax parse does not bind paths to schemas, validate attribute types, approve a filter policy, or authorize query execution. Applications must perform those checks before using a tree to select resources.
Parsed and schema-bound roots privately retain their bounded original expression for later receiving-provider checks. This text may contain personal data and grants no query permission. Equality is structural, with the path's ASCII case-insensitive equality and numeric-value literal equality. Explicit serialization contains the complete filter and may expose personal data; every diagnostic toString redacts it.
The six permitted node kinds are stable within a major version and may be matched exhaustively. Adding a node kind or an abstract visitor callback requires a major release.
- Since:
- 1.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classAn ordered flattened conjunction.static final classAn attribute comparison with a JSON literal.static final classNegation of a grouped predicate.static final classAn ordered flattened disjunction.static final classAn attribute presence test.static final classA predicate whose relative paths refer to the same array element. -
Method Summary
Modifier and TypeMethodDescriptionaccept(@NonNull ScimFilterVisitor<@NonNull R> visitor) Dispatches this node to a Java 17 visitor.static @NonNull ScimFilterParseResultfromExpressionResult(@NonNull String expression) Parses filter syntax under the shared immutable default limits.static @NonNull ScimFilterParseResultfromExpressionResult(@NonNull String expression, @NonNull ScimFilterLimits limits) Parses filter syntax directly into a result, without exception-driven handling of malformed input.Emits a canonical filter with lowercase operators and minimal grouping.
-
Method Details
-
fromExpressionResult
@CheckReturnValue static @NonNull ScimFilterParseResult fromExpressionResult(@NonNull String expression) Parses filter syntax under the shared immutable default limits.- Parameters:
expression- untrusted filter expression- Returns:
- success or a fixed rejection with a UTF-16 expression offset
- Throws:
NullPointerException- if expression is null- Since:
- 1.0.0
-
fromExpressionResult
@CheckReturnValue static @NonNull ScimFilterParseResult fromExpressionResult(@NonNull String expression, @NonNull ScimFilterLimits limits) Parses filter syntax directly into a result, without exception-driven handling of malformed input. Bounds apply before recursive stack growth, AST construction and literal/number allocation. Depth covers retained AST levels as well as transient grouping/NOT/ValuePath nesting; nodes count the retained flattened tree, rather than discarded parentheses.- Parameters:
expression- untrusted filter expressionlimits- immutable limits- Returns:
- syntax success or a fixed rejection with a UTF-16 expression offset
- Throws:
NullPointerException- if either argument is null- Since:
- 1.0.0
-
accept
@CheckReturnValue <R extends @NonNull Object> @NonNull R accept(@NonNull ScimFilterVisitor<@NonNull R> visitor) Dispatches this node to a Java 17 visitor. The visitor controls traversal.- Type Parameters:
R- nonnull result type- Parameters:
visitor- visitor- Returns:
- the visitor's result
- Throws:
NullPointerException- if visitor or its result is null- Since:
- 1.0.0
-
toScimString
Emits a canonical filter with lowercase operators and minimal grouping. Strings use JSON escapes; numeric exponent notation remains compact and never expands an exponent into zeros. The output contains personal data and can exceed the original input-character limit after schema normalization. Rendering does not prove that this text fits a receiving parser's limits.- Returns:
- canonical SCIM syntax, subject to receiving parser limits
- Since:
- 1.0.0
-