Extend Query Langage Support (#2696)

* add option for parser replacement - so, one could replace the query language and don't use RSQL
* add easy way to modify query root Node 
* add easy Node modification utilities
* code refactored and naming more 'QL' than 'RSQL' oriented

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2025-09-26 14:19:25 +03:00
committed by GitHub
parent d0fe120a3b
commit b181b66ee5
45 changed files with 308 additions and 211 deletions

View File

@@ -0,0 +1,41 @@
/**
* Copyright (c) 2015 Bosch Software Innovations GmbH and others
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.eclipse.hawkbit.repository.exception;
import java.io.Serial;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.eclipse.hawkbit.exception.AbstractServerRtException;
import org.eclipse.hawkbit.exception.SpServerError;
/**
* Exception used by the REST API in case of RSQL search filter query.
*/
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public abstract class QueryException extends AbstractServerRtException {
QueryException(final SpServerError error) {
super(error);
}
QueryException(final SpServerError error, final String message) {
super(error, message);
}
QueryException(final SpServerError error, final Throwable cause) {
super(error, cause);
}
QueryException(final SpServerError error, final String message, final Throwable cause) {
super(error, message, cause);
}
}

View File

@@ -21,7 +21,7 @@ import org.eclipse.hawkbit.exception.SpServerError;
*/
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class RSQLParameterSyntaxException extends AbstractServerRtException {
public class RSQLParameterSyntaxException extends QueryException {
@Serial
private static final long serialVersionUID = 1L;

View File

@@ -21,7 +21,7 @@ import org.eclipse.hawkbit.exception.SpServerError;
*/
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class RSQLParameterUnsupportedFieldException extends AbstractServerRtException {
public class RSQLParameterUnsupportedFieldException extends QueryException {
@Serial
private static final long serialVersionUID = 1L;