Upd deps, packages

This commit is contained in:
Egor Cherniak 2022-01-13 14:36:32 +03:00
parent 86fb710c5a
commit 94e23660a5
No known key found for this signature in database
GPG Key ID: 26F47333B7BE4ED9
46 changed files with 86 additions and 107 deletions

3
.gitmodules vendored
View File

@ -1,3 +0,0 @@
[submodule "build_utils"]
path = build_utils
url = git@github.com:rbkmoney/build_utils.git

13
Jenkinsfile vendored
View File

@ -1,13 +0,0 @@
#!groovy
build('magista_dsl', 'docker-host') {
checkoutRepo()
loadBuildUtils()
def javaLibPipeline
runStage('load JavaLib pipeline') {
javaLibPipeline = load("build_utils/jenkins_lib/pipeJavaLib.groovy")
}
def buildImageTag = "fcf116dd775cc2e91bffb6a36835754e3f2d5321"
javaLibPipeline(buildImageTag)
}

@ -1 +0,0 @@
Subproject commit e1318727d4d0c3e48f5122bf3197158b6695f50e

View File

@ -5,9 +5,9 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.rbkmoney</groupId>
<artifactId>parent</artifactId>
<version>1.0.5</version>
<groupId>dev.vality</groupId>
<artifactId>library-parent-pom</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>magista-dsl</artifactId>

View File

@ -1,4 +1,4 @@
package com.rbkmoney.magista.dsl;
package dev.vality.magista.dsl;
public class BadTokenException extends IllegalArgumentException {

View File

@ -1,4 +1,4 @@
package com.rbkmoney.magista.dsl;
package dev.vality.magista.dsl;
import java.util.List;

View File

@ -1,4 +1,4 @@
package com.rbkmoney.magista.dsl;
package dev.vality.magista.dsl;
public abstract class BaseFunction<T, CT> extends BaseQuery<T, CT> implements FunctionQuery<T, CT> {

View File

@ -1,4 +1,4 @@
package com.rbkmoney.magista.dsl;
package dev.vality.magista.dsl;
public abstract class BaseQuery<T, CT> implements Query<T, CT> {
private final Object descriptor;

View File

@ -1,4 +1,4 @@
package com.rbkmoney.magista.dsl;
package dev.vality.magista.dsl;
import java.util.function.Supplier;
import java.util.stream.Stream;

View File

@ -1,4 +1,4 @@
package com.rbkmoney.magista.dsl;
package dev.vality.magista.dsl;
import java.time.Instant;
import java.time.temporal.TemporalAccessor;

View File

@ -1,4 +1,4 @@
package com.rbkmoney.magista.dsl;
package dev.vality.magista.dsl;
import java.util.List;

View File

@ -1,4 +1,4 @@
package com.rbkmoney.magista.dsl;
package dev.vality.magista.dsl;
public interface FunctionQuery<T, CT> extends Query<T, CT> {

View File

@ -1,10 +1,8 @@
package com.rbkmoney.magista.dsl;
package dev.vality.magista.dsl;
import java.util.Map;
import java.util.Optional;
import static com.rbkmoney.magista.dsl.Parameters.SIZE_PARAMETER;
public abstract class PagedBaseFunction<T, CT> extends BaseFunction<T, CT> {
public static final int MAX_SIZE_VALUE = 1000;
@ -35,7 +33,7 @@ public abstract class PagedBaseFunction<T, CT> extends BaseFunction<T, CT> {
}
public Integer getSize() {
return Optional.ofNullable(getIntParameter(SIZE_PARAMETER, true))
return Optional.ofNullable(getIntParameter(Parameters.SIZE_PARAMETER, true))
.orElse(MAX_SIZE_VALUE);
}

View File

@ -1,4 +1,4 @@
package com.rbkmoney.magista.dsl;
package dev.vality.magista.dsl;
public class Parameters {
public static final String QUERY_PARAMETER = "query";

View File

@ -1,4 +1,4 @@
package com.rbkmoney.magista.dsl;
package dev.vality.magista.dsl;
public interface Query<T, CT> {
Object getDescriptor();

View File

@ -1,4 +1,4 @@
package com.rbkmoney.magista.dsl;
package dev.vality.magista.dsl;
public interface QueryContext {
}

View File

@ -1,4 +1,4 @@
package com.rbkmoney.magista.dsl;
package dev.vality.magista.dsl;
public interface QueryContextFactory {
QueryContext getContext();

View File

@ -1,4 +1,4 @@
package com.rbkmoney.magista.dsl;
package dev.vality.magista.dsl;
public class QueryExecutionException extends QueryProcessingException {
public QueryExecutionException() {

View File

@ -1,4 +1,4 @@
package com.rbkmoney.magista.dsl;
package dev.vality.magista.dsl;
import com.rbkmoney.geck.common.util.TypeUtil;

View File

@ -1,4 +1,4 @@
package com.rbkmoney.magista.dsl;
package dev.vality.magista.dsl;
public class QueryProcessingException extends RuntimeException {
public QueryProcessingException() {

View File

@ -1,4 +1,4 @@
package com.rbkmoney.magista.dsl;
package dev.vality.magista.dsl;
public interface QueryProcessor<S, R> {
R processQuery(S source) throws BadTokenException, QueryProcessingException;

View File

@ -1,4 +1,4 @@
package com.rbkmoney.magista.dsl;
package dev.vality.magista.dsl;
import java.util.stream.Stream;

View File

@ -1,4 +1,4 @@
package com.rbkmoney.magista.dsl;
package dev.vality.magista.dsl;
public interface QueryValidator {
void validateParameters(QueryParameters parameters) throws IllegalArgumentException;

View File

@ -1,11 +1,11 @@
package com.rbkmoney.magista.dsl;
package dev.vality.magista.dsl;
import com.rbkmoney.magista.dsl.builder.AbstractQueryBuilder;
import com.rbkmoney.magista.dsl.builder.QueryBuilder;
import com.rbkmoney.magista.dsl.builder.QueryBuilderException;
import com.rbkmoney.magista.dsl.parser.AbstractQueryParser;
import com.rbkmoney.magista.dsl.parser.QueryParserException;
import com.rbkmoney.magista.dsl.parser.QueryPart;
import dev.vality.magista.dsl.builder.AbstractQueryBuilder;
import dev.vality.magista.dsl.builder.QueryBuilder;
import dev.vality.magista.dsl.builder.QueryBuilderException;
import dev.vality.magista.dsl.parser.AbstractQueryParser;
import dev.vality.magista.dsl.parser.QueryParserException;
import dev.vality.magista.dsl.parser.QueryPart;
import java.util.Collection;
import java.util.List;
@ -14,8 +14,6 @@ import java.util.Optional;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import static com.rbkmoney.magista.dsl.Parameters.QUERY_PARAMETER;
public class RootQuery extends BaseQuery {
private final Query childQuery;
@ -39,12 +37,12 @@ public class RootQuery extends BaseQuery {
}
public Map getQuery() {
Object obj = getParameter(QUERY_PARAMETER, false);
Object obj = getParameter(Parameters.QUERY_PARAMETER, false);
return obj instanceof Map ? (Map) obj : null;
}
public QueryParameters getRestParameters() {
return removeParameters(QueryParameters::new, QUERY_PARAMETER);
return removeParameters(QueryParameters::new, Parameters.QUERY_PARAMETER);
}
}
@ -56,7 +54,7 @@ public class RootQuery extends BaseQuery {
super.validateParameters(parameters);
RootParameters rootParameters = super.checkParamsType(parameters, RootParameters.class);
if (rootParameters.getQuery() == null) {
checkParamsResult(true, QUERY_PARAMETER, DEFAULT_ERR_MSG_STRING);
checkParamsResult(true, Parameters.QUERY_PARAMETER, DEFAULT_ERR_MSG_STRING);
}
}
@ -98,7 +96,7 @@ public class RootQuery extends BaseQuery {
}
public static String getMainDescriptor() {
return QUERY_PARAMETER;
return Parameters.QUERY_PARAMETER;
}
}

View File

@ -1,4 +1,4 @@
package com.rbkmoney.magista.dsl;
package dev.vality.magista.dsl;
import java.util.Optional;
import java.util.UUID;

View File

@ -1,7 +1,7 @@
package com.rbkmoney.magista.dsl.builder;
package dev.vality.magista.dsl.builder;
import com.rbkmoney.magista.dsl.*;
import com.rbkmoney.magista.dsl.parser.QueryPart;
import dev.vality.magista.dsl.*;
import dev.vality.magista.dsl.parser.QueryPart;
import java.util.Collections;
import java.util.List;

View File

@ -1,8 +1,8 @@
package com.rbkmoney.magista.dsl.builder;
package dev.vality.magista.dsl.builder;
import com.rbkmoney.magista.dsl.BadTokenException;
import com.rbkmoney.magista.dsl.Query;
import com.rbkmoney.magista.dsl.parser.QueryPart;
import dev.vality.magista.dsl.BadTokenException;
import dev.vality.magista.dsl.Query;
import dev.vality.magista.dsl.parser.QueryPart;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

View File

@ -1,7 +1,7 @@
package com.rbkmoney.magista.dsl.builder;
package dev.vality.magista.dsl.builder;
import com.rbkmoney.magista.dsl.Query;
import com.rbkmoney.magista.dsl.parser.QueryPart;
import dev.vality.magista.dsl.Query;
import dev.vality.magista.dsl.parser.QueryPart;
import java.util.List;

View File

@ -1,6 +1,6 @@
package com.rbkmoney.magista.dsl.builder;
package dev.vality.magista.dsl.builder;
import com.rbkmoney.magista.dsl.QueryProcessingException;
import dev.vality.magista.dsl.QueryProcessingException;
public class QueryBuilderException extends QueryProcessingException {
public QueryBuilderException() {

View File

@ -1,7 +1,7 @@
package com.rbkmoney.magista.dsl.parser;
package dev.vality.magista.dsl.parser;
import com.rbkmoney.magista.dsl.QueryParameters;
import com.rbkmoney.magista.dsl.QueryValidator;
import dev.vality.magista.dsl.QueryParameters;
import dev.vality.magista.dsl.QueryValidator;
import java.util.Map;

View File

@ -1,4 +1,4 @@
package com.rbkmoney.magista.dsl.parser;
package dev.vality.magista.dsl.parser;
import java.util.ArrayList;
import java.util.Collections;

View File

@ -1,4 +1,4 @@
package com.rbkmoney.magista.dsl.parser;
package dev.vality.magista.dsl.parser;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;

View File

@ -1,4 +1,4 @@
package com.rbkmoney.magista.dsl.parser;
package dev.vality.magista.dsl.parser;
import java.util.List;

View File

@ -1,6 +1,6 @@
package com.rbkmoney.magista.dsl.parser;
package dev.vality.magista.dsl.parser;
import com.rbkmoney.magista.dsl.QueryExecutionException;
import dev.vality.magista.dsl.QueryExecutionException;
public class QueryParserException extends QueryExecutionException {
public QueryParserException() {

View File

@ -1,6 +1,6 @@
package com.rbkmoney.magista.dsl.parser;
package dev.vality.magista.dsl.parser;
import com.rbkmoney.magista.dsl.QueryParameters;
import dev.vality.magista.dsl.QueryParameters;
import java.util.List;

View File

@ -1,11 +1,11 @@
package com.rbkmoney.magista.dsl;
package dev.vality.magista.dsl;
import com.rbkmoney.magista.dsl.builder.AbstractQueryBuilder;
import com.rbkmoney.magista.dsl.builder.QueryBuilder;
import com.rbkmoney.magista.dsl.builder.QueryBuilderException;
import com.rbkmoney.magista.dsl.parser.AbstractQueryParser;
import com.rbkmoney.magista.dsl.parser.QueryParserException;
import com.rbkmoney.magista.dsl.parser.QueryPart;
import dev.vality.magista.dsl.builder.AbstractQueryBuilder;
import dev.vality.magista.dsl.builder.QueryBuilder;
import dev.vality.magista.dsl.builder.QueryBuilderException;
import dev.vality.magista.dsl.parser.AbstractQueryParser;
import dev.vality.magista.dsl.parser.QueryParserException;
import dev.vality.magista.dsl.parser.QueryPart;
import java.time.temporal.TemporalAccessor;
import java.util.Arrays;

View File

@ -1,4 +1,4 @@
package com.rbkmoney.magista.dsl;
package dev.vality.magista.dsl;
public class Dummy {
private Long id;

View File

@ -1,4 +1,4 @@
package com.rbkmoney.magista.dsl;
package dev.vality.magista.dsl;
import java.util.*;
import java.util.stream.Collectors;

View File

@ -1,4 +1,4 @@
package com.rbkmoney.magista.dsl;
package dev.vality.magista.dsl;
public class StatTestRequest {

View File

@ -1,4 +1,4 @@
package com.rbkmoney.magista.dsl;
package dev.vality.magista.dsl;
import java.util.List;

View File

@ -1,4 +1,4 @@
package com.rbkmoney.magista.dsl;
package dev.vality.magista.dsl;
import java.util.List;

View File

@ -1,4 +1,4 @@
package com.rbkmoney.magista.dsl;
package dev.vality.magista.dsl;
public class TestQueryContext implements QueryContext {

View File

@ -1,13 +1,13 @@
package com.rbkmoney.magista.dsl.builder;
package dev.vality.magista.dsl.builder;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.rbkmoney.magista.dsl.DummiesFunction;
import com.rbkmoney.magista.dsl.Query;
import com.rbkmoney.magista.dsl.RootQuery;
import com.rbkmoney.magista.dsl.parser.BaseQueryParser;
import com.rbkmoney.magista.dsl.parser.JsonQueryParser;
import com.rbkmoney.magista.dsl.parser.QueryPart;
import dev.vality.magista.dsl.DummiesFunction;
import dev.vality.magista.dsl.Query;
import dev.vality.magista.dsl.RootQuery;
import dev.vality.magista.dsl.parser.BaseQueryParser;
import dev.vality.magista.dsl.parser.JsonQueryParser;
import dev.vality.magista.dsl.parser.QueryPart;
import org.junit.Test;
import java.util.Arrays;

View File

@ -1,9 +1,9 @@
package com.rbkmoney.magista.dsl.parser;
package dev.vality.magista.dsl.parser;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.rbkmoney.magista.dsl.DummiesFunction;
import com.rbkmoney.magista.dsl.RootQuery;
import dev.vality.magista.dsl.DummiesFunction;
import dev.vality.magista.dsl.RootQuery;
import org.junit.Test;
import java.util.Arrays;

View File

@ -1,11 +1,11 @@
package com.rbkmoney.magista.dsl.search;
package dev.vality.magista.dsl.search;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.rbkmoney.magista.dsl.*;
import com.rbkmoney.magista.dsl.builder.BaseQueryBuilder;
import com.rbkmoney.magista.dsl.builder.QueryBuilder;
import com.rbkmoney.magista.dsl.parser.*;
import dev.vality.magista.dsl.builder.BaseQueryBuilder;
import dev.vality.magista.dsl.builder.QueryBuilder;
import dev.vality.magista.dsl.*;
import dev.vality.magista.dsl.parser.*;
import org.junit.Test;
import java.util.Arrays;

View File

@ -1,5 +1,5 @@
#log4j.rootLogger=ALL, stdout
log4j.logger.com.rbkmoney=INFO, stdout
log4j.logger.dev.vality=INFO, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout