mirror of
https://github.com/dalbodeule/snap-admin.git
synced 2025-06-08 13:28:21 +00:00
Migrate build system from Maven to Gradle
Replaced Maven with Gradle by introducing a Gradle build structure, updating dependencies, and configuration files. Additionally, refactored package structure from `tech.ailef` to `space.mori.dalbodeule` for consistency.
This commit is contained in:
parent
297224dafe
commit
e4ea60fd85
1
.gitignore
vendored
1
.gitignore
vendored
@ -34,3 +34,4 @@ build/
|
|||||||
|
|
||||||
### VS Code ###
|
### VS Code ###
|
||||||
.vscode/
|
.vscode/
|
||||||
|
.env
|
||||||
|
72
build.gradle.kts
Normal file
72
build.gradle.kts
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
/*
|
||||||
|
* This file was generated by the Gradle 'init' task.
|
||||||
|
*
|
||||||
|
* This project uses @Incubating APIs which are subject to change.
|
||||||
|
*/
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
`java-library`
|
||||||
|
`maven-publish`
|
||||||
|
id("co.uzzu.dotenv.gradle") version "4.0.0"
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
mavenLocal()
|
||||||
|
maven {
|
||||||
|
url = uri("https://repo.maven.apache.org/maven2/")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
name = "Gitea"
|
||||||
|
url = uri(
|
||||||
|
"https://git.mori.space/api/packages/${env.GITEA_USERNAME.value}/maven"
|
||||||
|
)
|
||||||
|
|
||||||
|
credentials(HttpHeaderCredentials::class) {
|
||||||
|
name = "Authorization"
|
||||||
|
value = "token ${env.GITEA_TOKEN.value}"
|
||||||
|
}
|
||||||
|
|
||||||
|
authentication {
|
||||||
|
create<HttpHeaderAuthentication>("header")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
api(libs.org.apache.poi.poi)
|
||||||
|
api(libs.org.apache.poi.poi.ooxml)
|
||||||
|
api(libs.org.apache.tika.tika.core)
|
||||||
|
api(libs.org.springframework.boot.spring.boot.starter.data.jpa)
|
||||||
|
api(libs.org.springframework.boot.spring.boot.starter.thymeleaf)
|
||||||
|
api(libs.org.springframework.boot.spring.boot.starter.jdbc)
|
||||||
|
api(libs.com.h2database.h2)
|
||||||
|
api(libs.org.apache.commons.commons.csv)
|
||||||
|
api(libs.org.springframework.boot.spring.boot.starter.validation)
|
||||||
|
api(libs.org.springframework.boot.spring.boot.starter.web)
|
||||||
|
api(libs.org.springframework.boot.spring.boot.configuration.processor)
|
||||||
|
testImplementation(libs.org.springframework.boot.spring.boot.starter.test)
|
||||||
|
}
|
||||||
|
|
||||||
|
group = "space.mori.dalbodeule"
|
||||||
|
version = "0.4.1"
|
||||||
|
description = "SnapAdmin"
|
||||||
|
java.sourceCompatibility = JavaVersion.VERSION_17
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications.create<MavenPublication>("maven") {
|
||||||
|
from(components["java"])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType<JavaCompile>() {
|
||||||
|
options.encoding = "UTF-8"
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType<Javadoc>() {
|
||||||
|
options.encoding = "UTF-8"
|
||||||
|
}
|
7
gradle.properties
Normal file
7
gradle.properties
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# This file was generated by the Gradle 'init' task.
|
||||||
|
# https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties
|
||||||
|
|
||||||
|
org.gradle.configuration-cache=true
|
||||||
|
org.gradle.parallel=true
|
||||||
|
org.gradle.caching=true
|
||||||
|
|
30
gradle/libs.versions.toml
Normal file
30
gradle/libs.versions.toml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
# This file was generated by the Gradle 'init' task.
|
||||||
|
# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format
|
||||||
|
|
||||||
|
[versions]
|
||||||
|
com-h2database-h2 = "2.3.232"
|
||||||
|
org-apache-commons-commons-csv = "1.14.0"
|
||||||
|
org-apache-poi-poi = "5.4.1"
|
||||||
|
org-apache-poi-poi-ooxml = "5.4.1"
|
||||||
|
org-apache-tika-tika-core = "3.1.0"
|
||||||
|
org-springframework-boot-spring-boot-configuration-processor = "3.4.5"
|
||||||
|
org-springframework-boot-spring-boot-starter-data-jpa = "3.4.5"
|
||||||
|
org-springframework-boot-spring-boot-starter-jdbc = "3.4.5"
|
||||||
|
org-springframework-boot-spring-boot-starter-test = "3.4.5"
|
||||||
|
org-springframework-boot-spring-boot-starter-thymeleaf = "3.4.5"
|
||||||
|
org-springframework-boot-spring-boot-starter-validation = "3.4.5"
|
||||||
|
org-springframework-boot-spring-boot-starter-web = "3.4.5"
|
||||||
|
|
||||||
|
[libraries]
|
||||||
|
com-h2database-h2 = { module = "com.h2database:h2", version.ref = "com-h2database-h2" }
|
||||||
|
org-apache-commons-commons-csv = { module = "org.apache.commons:commons-csv", version.ref = "org-apache-commons-commons-csv" }
|
||||||
|
org-apache-poi-poi = { module = "org.apache.poi:poi", version.ref = "org-apache-poi-poi" }
|
||||||
|
org-apache-poi-poi-ooxml = { module = "org.apache.poi:poi-ooxml", version.ref = "org-apache-poi-poi-ooxml" }
|
||||||
|
org-apache-tika-tika-core = { module = "org.apache.tika:tika-core", version.ref = "org-apache-tika-tika-core" }
|
||||||
|
org-springframework-boot-spring-boot-configuration-processor = { module = "org.springframework.boot:spring-boot-configuration-processor", version.ref = "org-springframework-boot-spring-boot-configuration-processor" }
|
||||||
|
org-springframework-boot-spring-boot-starter-data-jpa = { module = "org.springframework.boot:spring-boot-starter-data-jpa", version.ref = "org-springframework-boot-spring-boot-starter-data-jpa" }
|
||||||
|
org-springframework-boot-spring-boot-starter-jdbc = { module = "org.springframework.boot:spring-boot-starter-jdbc", version.ref = "org-springframework-boot-spring-boot-starter-jdbc" }
|
||||||
|
org-springframework-boot-spring-boot-starter-test = { module = "org.springframework.boot:spring-boot-starter-test", version.ref = "org-springframework-boot-spring-boot-starter-test" }
|
||||||
|
org-springframework-boot-spring-boot-starter-thymeleaf = { module = "org.springframework.boot:spring-boot-starter-thymeleaf", version.ref = "org-springframework-boot-spring-boot-starter-thymeleaf" }
|
||||||
|
org-springframework-boot-spring-boot-starter-validation = { module = "org.springframework.boot:spring-boot-starter-validation", version.ref = "org-springframework-boot-spring-boot-starter-validation" }
|
||||||
|
org-springframework-boot-spring-boot-starter-web = { module = "org.springframework.boot:spring-boot-starter-web", version.ref = "org-springframework-boot-spring-boot-starter-web" }
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
Binary file not shown.
7
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
7
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
distributionBase=GRADLE_USER_HOME
|
||||||
|
distributionPath=wrapper/dists
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
|
||||||
|
networkTimeout=10000
|
||||||
|
validateDistributionUrl=true
|
||||||
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
zipStorePath=wrapper/dists
|
251
gradlew
vendored
Executable file
251
gradlew
vendored
Executable file
@ -0,0 +1,251 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
#
|
||||||
|
# Copyright © 2015-2021 the original authors.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# Gradle start up script for POSIX generated by Gradle.
|
||||||
|
#
|
||||||
|
# Important for running:
|
||||||
|
#
|
||||||
|
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||||
|
# noncompliant, but you have some other compliant shell such as ksh or
|
||||||
|
# bash, then to run this script, type that shell name before the whole
|
||||||
|
# command line, like:
|
||||||
|
#
|
||||||
|
# ksh Gradle
|
||||||
|
#
|
||||||
|
# Busybox and similar reduced shells will NOT work, because this script
|
||||||
|
# requires all of these POSIX shell features:
|
||||||
|
# * functions;
|
||||||
|
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||||
|
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||||
|
# * compound commands having a testable exit status, especially «case»;
|
||||||
|
# * various built-in commands including «command», «set», and «ulimit».
|
||||||
|
#
|
||||||
|
# Important for patching:
|
||||||
|
#
|
||||||
|
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||||
|
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||||
|
#
|
||||||
|
# The "traditional" practice of packing multiple parameters into a
|
||||||
|
# space-separated string is a well documented source of bugs and security
|
||||||
|
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||||
|
# options in "$@", and eventually passing that to Java.
|
||||||
|
#
|
||||||
|
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||||
|
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||||
|
# see the in-line comments for details.
|
||||||
|
#
|
||||||
|
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||||
|
# Darwin, MinGW, and NonStop.
|
||||||
|
#
|
||||||
|
# (3) This script is generated from the Groovy template
|
||||||
|
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||||
|
# within the Gradle project.
|
||||||
|
#
|
||||||
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
# Attempt to set APP_HOME
|
||||||
|
|
||||||
|
# Resolve links: $0 may be a link
|
||||||
|
app_path=$0
|
||||||
|
|
||||||
|
# Need this for daisy-chained symlinks.
|
||||||
|
while
|
||||||
|
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||||
|
[ -h "$app_path" ]
|
||||||
|
do
|
||||||
|
ls=$( ls -ld "$app_path" )
|
||||||
|
link=${ls#*' -> '}
|
||||||
|
case $link in #(
|
||||||
|
/*) app_path=$link ;; #(
|
||||||
|
*) app_path=$APP_HOME$link ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# This is normally unused
|
||||||
|
# shellcheck disable=SC2034
|
||||||
|
APP_BASE_NAME=${0##*/}
|
||||||
|
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||||
|
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||||
|
|
||||||
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
|
MAX_FD=maximum
|
||||||
|
|
||||||
|
warn () {
|
||||||
|
echo "$*"
|
||||||
|
} >&2
|
||||||
|
|
||||||
|
die () {
|
||||||
|
echo
|
||||||
|
echo "$*"
|
||||||
|
echo
|
||||||
|
exit 1
|
||||||
|
} >&2
|
||||||
|
|
||||||
|
# OS specific support (must be 'true' or 'false').
|
||||||
|
cygwin=false
|
||||||
|
msys=false
|
||||||
|
darwin=false
|
||||||
|
nonstop=false
|
||||||
|
case "$( uname )" in #(
|
||||||
|
CYGWIN* ) cygwin=true ;; #(
|
||||||
|
Darwin* ) darwin=true ;; #(
|
||||||
|
MSYS* | MINGW* ) msys=true ;; #(
|
||||||
|
NONSTOP* ) nonstop=true ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
CLASSPATH="\\\"\\\""
|
||||||
|
|
||||||
|
|
||||||
|
# Determine the Java command to use to start the JVM.
|
||||||
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
|
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||||
|
else
|
||||||
|
JAVACMD=$JAVA_HOME/bin/java
|
||||||
|
fi
|
||||||
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
|
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
JAVACMD=java
|
||||||
|
if ! command -v java >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Increase the maximum file descriptors if we can.
|
||||||
|
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||||
|
case $MAX_FD in #(
|
||||||
|
max*)
|
||||||
|
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||||
|
# shellcheck disable=SC2039,SC3045
|
||||||
|
MAX_FD=$( ulimit -H -n ) ||
|
||||||
|
warn "Could not query maximum file descriptor limit"
|
||||||
|
esac
|
||||||
|
case $MAX_FD in #(
|
||||||
|
'' | soft) :;; #(
|
||||||
|
*)
|
||||||
|
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||||
|
# shellcheck disable=SC2039,SC3045
|
||||||
|
ulimit -n "$MAX_FD" ||
|
||||||
|
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Collect all arguments for the java command, stacking in reverse order:
|
||||||
|
# * args from the command line
|
||||||
|
# * the main class name
|
||||||
|
# * -classpath
|
||||||
|
# * -D...appname settings
|
||||||
|
# * --module-path (only if needed)
|
||||||
|
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||||
|
|
||||||
|
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||||
|
if "$cygwin" || "$msys" ; then
|
||||||
|
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||||
|
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||||
|
|
||||||
|
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||||
|
|
||||||
|
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||||
|
for arg do
|
||||||
|
if
|
||||||
|
case $arg in #(
|
||||||
|
-*) false ;; # don't mess with options #(
|
||||||
|
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||||
|
[ -e "$t" ] ;; #(
|
||||||
|
*) false ;;
|
||||||
|
esac
|
||||||
|
then
|
||||||
|
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||||
|
fi
|
||||||
|
# Roll the args list around exactly as many times as the number of
|
||||||
|
# args, so each arg winds up back in the position where it started, but
|
||||||
|
# possibly modified.
|
||||||
|
#
|
||||||
|
# NB: a `for` loop captures its iteration list before it begins, so
|
||||||
|
# changing the positional parameters here affects neither the number of
|
||||||
|
# iterations, nor the values presented in `arg`.
|
||||||
|
shift # remove old arg
|
||||||
|
set -- "$@" "$arg" # push replacement arg
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
|
# Collect all arguments for the java command:
|
||||||
|
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||||
|
# and any embedded shellness will be escaped.
|
||||||
|
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||||
|
# treated as '${Hostname}' itself on the command line.
|
||||||
|
|
||||||
|
set -- \
|
||||||
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||||
|
-classpath "$CLASSPATH" \
|
||||||
|
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||||
|
"$@"
|
||||||
|
|
||||||
|
# Stop when "xargs" is not available.
|
||||||
|
if ! command -v xargs >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
die "xargs is not available"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Use "xargs" to parse quoted args.
|
||||||
|
#
|
||||||
|
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||||
|
#
|
||||||
|
# In Bash we could simply go:
|
||||||
|
#
|
||||||
|
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||||
|
# set -- "${ARGS[@]}" "$@"
|
||||||
|
#
|
||||||
|
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||||
|
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||||
|
# character that might be a shell metacharacter, then use eval to reverse
|
||||||
|
# that process (while maintaining the separation between arguments), and wrap
|
||||||
|
# the whole thing up as a single "set" statement.
|
||||||
|
#
|
||||||
|
# This will of course break if any of these variables contains a newline or
|
||||||
|
# an unmatched quote.
|
||||||
|
#
|
||||||
|
|
||||||
|
eval "set -- $(
|
||||||
|
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||||
|
xargs -n1 |
|
||||||
|
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||||
|
tr '\n' ' '
|
||||||
|
)" '"$@"'
|
||||||
|
|
||||||
|
exec "$JAVACMD" "$@"
|
94
gradlew.bat
vendored
Normal file
94
gradlew.bat
vendored
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
@rem
|
||||||
|
@rem Copyright 2015 the original author or authors.
|
||||||
|
@rem
|
||||||
|
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
@rem you may not use this file except in compliance with the License.
|
||||||
|
@rem You may obtain a copy of the License at
|
||||||
|
@rem
|
||||||
|
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
@rem
|
||||||
|
@rem Unless required by applicable law or agreed to in writing, software
|
||||||
|
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
@rem See the License for the specific language governing permissions and
|
||||||
|
@rem limitations under the License.
|
||||||
|
@rem
|
||||||
|
@rem SPDX-License-Identifier: Apache-2.0
|
||||||
|
@rem
|
||||||
|
|
||||||
|
@if "%DEBUG%"=="" @echo off
|
||||||
|
@rem ##########################################################################
|
||||||
|
@rem
|
||||||
|
@rem Gradle startup script for Windows
|
||||||
|
@rem
|
||||||
|
@rem ##########################################################################
|
||||||
|
|
||||||
|
@rem Set local scope for the variables with windows NT shell
|
||||||
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
|
set DIRNAME=%~dp0
|
||||||
|
if "%DIRNAME%"=="" set DIRNAME=.
|
||||||
|
@rem This is normally unused
|
||||||
|
set APP_BASE_NAME=%~n0
|
||||||
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
|
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||||
|
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||||
|
|
||||||
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||||
|
|
||||||
|
@rem Find java.exe
|
||||||
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
|
set JAVA_EXE=java.exe
|
||||||
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
|
if %ERRORLEVEL% equ 0 goto execute
|
||||||
|
|
||||||
|
echo. 1>&2
|
||||||
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||||
|
echo. 1>&2
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||||
|
echo location of your Java installation. 1>&2
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:findJavaFromJavaHome
|
||||||
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
|
if exist "%JAVA_EXE%" goto execute
|
||||||
|
|
||||||
|
echo. 1>&2
|
||||||
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||||
|
echo. 1>&2
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||||
|
echo location of your Java installation. 1>&2
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:execute
|
||||||
|
@rem Setup the command line
|
||||||
|
|
||||||
|
set CLASSPATH=
|
||||||
|
|
||||||
|
|
||||||
|
@rem Execute Gradle
|
||||||
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||||
|
|
||||||
|
:end
|
||||||
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||||
|
|
||||||
|
:fail
|
||||||
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
|
rem the _cmd.exe /c_ return code!
|
||||||
|
set EXIT_CODE=%ERRORLEVEL%
|
||||||
|
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||||
|
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||||
|
exit /b %EXIT_CODE%
|
||||||
|
|
||||||
|
:mainEnd
|
||||||
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|
||||||
|
:omega
|
150
pom.xml
150
pom.xml
@ -1,150 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<parent>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
|
||||||
<version>3.1.5</version>
|
|
||||||
<relativePath /> <!-- lookup parent from repository -->
|
|
||||||
</parent>
|
|
||||||
<groupId>tech.ailef</groupId>
|
|
||||||
<artifactId>snap-admin</artifactId>
|
|
||||||
<version>0.2.2</version>
|
|
||||||
<name>SnapAdmin</name>
|
|
||||||
<description>SnapAdmin is an auto-generated CRUD admin panel for Spring Boot/JPA apps</description>
|
|
||||||
<properties>
|
|
||||||
<java.version>17</java.version>
|
|
||||||
</properties>
|
|
||||||
<licenses>
|
|
||||||
<license>
|
|
||||||
<name>MIT License</name>
|
|
||||||
<url>https://opensource.org/license/mit</url>
|
|
||||||
</license>
|
|
||||||
</licenses>
|
|
||||||
|
|
||||||
<profiles>
|
|
||||||
<profile>
|
|
||||||
<id>release</id>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.jreleaser</groupId>
|
|
||||||
<artifactId>jreleaser-maven-plugin</artifactId>
|
|
||||||
<version>1.3.1</version>
|
|
||||||
<configuration>
|
|
||||||
<jreleaser>
|
|
||||||
<signing>
|
|
||||||
<active>ALWAYS</active>
|
|
||||||
<armored>true</armored>
|
|
||||||
</signing>
|
|
||||||
<deploy>
|
|
||||||
<maven>
|
|
||||||
<nexus2>
|
|
||||||
<maven-central>
|
|
||||||
<active>ALWAYS</active>
|
|
||||||
<url>https://s01.oss.sonatype.org/service/local</url>
|
|
||||||
<closeRepository>true</closeRepository>
|
|
||||||
<releaseRepository>true</releaseRepository>
|
|
||||||
<stagingRepositories>target/staging-deploy</stagingRepositories>
|
|
||||||
</maven-central>
|
|
||||||
</nexus2>
|
|
||||||
</maven>
|
|
||||||
</deploy>
|
|
||||||
</jreleaser>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
|
||||||
<version>3.4.1</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>attach-javadoc</id>
|
|
||||||
<goals>
|
|
||||||
<goal>jar</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-source-plugin</artifactId>
|
|
||||||
<version>3.2.1</version>
|
|
||||||
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>attach-source</id>
|
|
||||||
<goals>
|
|
||||||
<goal>jar</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
</profiles>
|
|
||||||
<dependencies>
|
|
||||||
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.poi</groupId>
|
|
||||||
<artifactId>poi</artifactId>
|
|
||||||
<version>5.2.4</version>
|
|
||||||
</dependency>
|
|
||||||
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.poi</groupId>
|
|
||||||
<artifactId>poi-ooxml</artifactId>
|
|
||||||
<version>5.2.4</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- https://mvnrepository.com/artifact/org.apache.tika/tika-core -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.tika</groupId>
|
|
||||||
<artifactId>tika-core</artifactId>
|
|
||||||
<version>2.9.0</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-jdbc</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.h2database</groupId>
|
|
||||||
<artifactId>h2</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-csv -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.commons</groupId>
|
|
||||||
<artifactId>commons-csv</artifactId>
|
|
||||||
<version>1.10.0</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-validation</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-web</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-test</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
|
||||||
<optional>true</optional>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</project>
|
|
7
settings.gradle.kts
Normal file
7
settings.gradle.kts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
/*
|
||||||
|
* This file was generated by the Gradle 'init' task.
|
||||||
|
*
|
||||||
|
* This project uses @Incubating APIs which are subject to change.
|
||||||
|
*/
|
||||||
|
|
||||||
|
rootProject.name = "snap-admin"
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external;
|
package space.mori.dalbodeule.snapadmin.external;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
@ -50,20 +50,20 @@ import jakarta.persistence.ManyToMany;
|
|||||||
import jakarta.persistence.ManyToOne;
|
import jakarta.persistence.ManyToOne;
|
||||||
import jakarta.persistence.OneToMany;
|
import jakarta.persistence.OneToMany;
|
||||||
import jakarta.persistence.OneToOne;
|
import jakarta.persistence.OneToOne;
|
||||||
import tech.ailef.snapadmin.external.annotations.Disable;
|
import space.mori.dalbodeule.snapadmin.external.annotations.Disable;
|
||||||
import tech.ailef.snapadmin.external.annotations.DisplayFormat;
|
import space.mori.dalbodeule.snapadmin.external.annotations.DisplayFormat;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.CustomJpaRepository;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.CustomJpaRepository;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.DbObjectSchema;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.DbObjectSchema;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.fields.DbField;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.fields.DbField;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.fields.DbFieldType;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.fields.DbFieldType;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.fields.EnumFieldType;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.fields.EnumFieldType;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.fields.StringFieldType;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.fields.StringFieldType;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.fields.TextFieldType;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.fields.TextFieldType;
|
||||||
import tech.ailef.snapadmin.external.dto.MappingError;
|
import space.mori.dalbodeule.snapadmin.external.dto.MappingError;
|
||||||
import tech.ailef.snapadmin.external.exceptions.SnapAdminException;
|
import space.mori.dalbodeule.snapadmin.external.exceptions.SnapAdminException;
|
||||||
import tech.ailef.snapadmin.external.exceptions.SnapAdminNotFoundException;
|
import space.mori.dalbodeule.snapadmin.external.exceptions.SnapAdminNotFoundException;
|
||||||
import tech.ailef.snapadmin.external.exceptions.UnsupportedFieldTypeException;
|
import space.mori.dalbodeule.snapadmin.external.exceptions.UnsupportedFieldTypeException;
|
||||||
import tech.ailef.snapadmin.external.misc.Utils;
|
import space.mori.dalbodeule.snapadmin.external.misc.Utils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The main SnapAdmin class is responsible for the initialization phase. This class scans
|
* The main SnapAdmin class is responsible for the initialization phase. This class scans
|
||||||
@ -88,7 +88,7 @@ public class SnapAdmin {
|
|||||||
|
|
||||||
private boolean authenticated;
|
private boolean authenticated;
|
||||||
|
|
||||||
private static final String VERSION = "0.2.0";
|
private static final String VERSION = "0.4.1";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds the SnapAdmin instance by scanning the `@Entity` beans and loading
|
* Builds the SnapAdmin instance by scanning the `@Entity` beans and loading
|
@ -16,7 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external;
|
package space.mori.dalbodeule.snapadmin.external;
|
||||||
|
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.transaction.support.TransactionTemplate;
|
import org.springframework.transaction.support.TransactionTemplate;
|
||||||
|
|
||||||
import tech.ailef.snapadmin.internal.InternalSnapAdminConfiguration;
|
import space.mori.dalbodeule.snapadmin.internal.InternalSnapAdminConfiguration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The configuration class for "internal" data source. This is not the
|
* The configuration class for "internal" data source. This is not the
|
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external;
|
package space.mori.dalbodeule.snapadmin.external;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external;
|
package space.mori.dalbodeule.snapadmin.external;
|
||||||
|
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
|
@ -16,7 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external;
|
package space.mori.dalbodeule.snapadmin.external;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.HttpURLConnection;
|
import java.net.HttpURLConnection;
|
||||||
@ -30,7 +30,7 @@ import org.springframework.context.ApplicationListener;
|
|||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
import tech.ailef.snapadmin.external.exceptions.SnapAdminException;
|
import space.mori.dalbodeule.snapadmin.external.exceptions.SnapAdminException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Runs at startup to determine if SnapAdmin is protected with authentication.
|
* Runs at startup to determine if SnapAdmin is protected with authentication.
|
7
src/main/java/space/mori/dalbodeule/snapadmin/external/ThymeleafUtils.java
vendored
Normal file
7
src/main/java/space/mori/dalbodeule/snapadmin/external/ThymeleafUtils.java
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
package space.mori.dalbodeule.snapadmin.external;
|
||||||
|
|
||||||
|
public class ThymeleafUtils {
|
||||||
|
public String getSimpleName(Class<?> clazz) {
|
||||||
|
return clazz.getSimpleName();
|
||||||
|
}
|
||||||
|
}
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.annotations;
|
package space.mori.dalbodeule.snapadmin.external.annotations;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.annotations;
|
package space.mori.dalbodeule.snapadmin.external.annotations;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.annotations;
|
package space.mori.dalbodeule.snapadmin.external.annotations;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.annotations;
|
package space.mori.dalbodeule.snapadmin.external.annotations;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.annotations;
|
package space.mori.dalbodeule.snapadmin.external.annotations;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.annotations;
|
package space.mori.dalbodeule.snapadmin.external.annotations;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.annotations;
|
package space.mori.dalbodeule.snapadmin.external.annotations;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.annotations;
|
package space.mori.dalbodeule.snapadmin.external.annotations;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.annotations;
|
package space.mori.dalbodeule.snapadmin.external.annotations;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.annotations;
|
package space.mori.dalbodeule.snapadmin.external.annotations;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.annotations;
|
package space.mori.dalbodeule.snapadmin.external.annotations;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Type of filters that can be used in the faceted search.
|
* Type of filters that can be used in the faceted search.
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.annotations;
|
package space.mori.dalbodeule.snapadmin.external.annotations;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.annotations;
|
package space.mori.dalbodeule.snapadmin.external.annotations;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
@ -19,4 +19,4 @@
|
|||||||
/**
|
/**
|
||||||
* Annotations defined to allow user customization
|
* Annotations defined to allow user customization
|
||||||
*/
|
*/
|
||||||
package tech.ailef.snapadmin.external.annotations;
|
package space.mori.dalbodeule.snapadmin.external.annotations;
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.controller;
|
package space.mori.dalbodeule.snapadmin.external.controller;
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -41,6 +41,7 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.annotation.Import;
|
||||||
import org.springframework.http.HttpHeaders;
|
import org.springframework.http.HttpHeaders;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
@ -54,38 +55,43 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
|||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
|
||||||
import tech.ailef.snapadmin.external.SnapAdmin;
|
import space.mori.dalbodeule.snapadmin.external.SnapAdmin;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.DbFieldValue;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.DbFieldValue;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.DbObject;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.DbObject;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.DbObjectSchema;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.DbObjectSchema;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.SnapAdminRepository;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.SnapAdminRepository;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.fields.DbField;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.fields.DbField;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.query.DbQueryResult;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.query.DbQueryResult;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.query.DbQueryResultRow;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.query.DbQueryResultRow;
|
||||||
import tech.ailef.snapadmin.external.dto.DataExportFormat;
|
import space.mori.dalbodeule.snapadmin.external.dto.DataExportFormat;
|
||||||
import tech.ailef.snapadmin.external.dto.QueryFilter;
|
import space.mori.dalbodeule.snapadmin.external.dto.QueryFilter;
|
||||||
import tech.ailef.snapadmin.external.exceptions.SnapAdminException;
|
import space.mori.dalbodeule.snapadmin.external.exceptions.SnapAdminException;
|
||||||
import tech.ailef.snapadmin.external.exceptions.SnapAdminNotFoundException;
|
import space.mori.dalbodeule.snapadmin.external.exceptions.SnapAdminNotFoundException;
|
||||||
import tech.ailef.snapadmin.external.misc.Utils;
|
import space.mori.dalbodeule.snapadmin.external.misc.Utils;
|
||||||
import tech.ailef.snapadmin.internal.model.ConsoleQuery;
|
import space.mori.dalbodeule.snapadmin.internal.model.ConsoleQuery;
|
||||||
import tech.ailef.snapadmin.internal.repository.ConsoleQueryRepository;
|
import space.mori.dalbodeule.snapadmin.internal.repository.ConsoleQueryRepository;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping(value = { "/${snapadmin.baseUrl}/", "/${snapadmin.baseUrl}" })
|
@RequestMapping(value = { "/${snapadmin.baseUrl}/", "/${snapadmin.baseUrl}" })
|
||||||
|
@Import(ObjectMapper.class)
|
||||||
public class DataExportController {
|
public class DataExportController {
|
||||||
private static final Logger logger = LoggerFactory.getLogger(DataExportFormat.class);
|
private static final Logger logger = LoggerFactory.getLogger(DataExportFormat.class);
|
||||||
|
private final SnapAdmin snapAdmin;
|
||||||
@Autowired
|
private final SnapAdminRepository repository;
|
||||||
private SnapAdmin snapAdmin;
|
private final ConsoleQueryRepository queryRepository;
|
||||||
|
private final ObjectMapper mapper;
|
||||||
|
|
||||||
@Autowired
|
public DataExportController(
|
||||||
private SnapAdminRepository repository;
|
@Autowired SnapAdmin snapAdmin,
|
||||||
|
@Autowired SnapAdminRepository repository,
|
||||||
@Autowired
|
@Autowired ConsoleQueryRepository queryRepository,
|
||||||
private ConsoleQueryRepository queryRepository;
|
@Autowired ObjectMapper mapper
|
||||||
|
) {
|
||||||
@Autowired
|
this.snapAdmin = snapAdmin;
|
||||||
private ObjectMapper mapper;
|
this.repository = repository;
|
||||||
|
this.queryRepository = queryRepository;
|
||||||
|
this.mapper = mapper;
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("/console/export/{queryId}")
|
@GetMapping("/console/export/{queryId}")
|
||||||
public ResponseEntity<byte[]> export(@PathVariable String queryId, @RequestParam String format,
|
public ResponseEntity<byte[]> export(@PathVariable String queryId, @RequestParam String format,
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.controller;
|
package space.mori.dalbodeule.snapadmin.external.controller;
|
||||||
|
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
@ -36,12 +36,12 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
import org.springframework.web.server.ResponseStatusException;
|
import org.springframework.web.server.ResponseStatusException;
|
||||||
|
|
||||||
import tech.ailef.snapadmin.external.SnapAdmin;
|
import space.mori.dalbodeule.snapadmin.external.SnapAdmin;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.DbFieldValue;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.DbFieldValue;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.DbObject;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.DbObject;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.DbObjectSchema;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.DbObjectSchema;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.SnapAdminRepository;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.SnapAdminRepository;
|
||||||
import tech.ailef.snapadmin.external.exceptions.SnapAdminException;
|
import space.mori.dalbodeule.snapadmin.external.exceptions.SnapAdminException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Controller to serve file or images (`@DisplayImage`)
|
* Controller to serve file or images (`@DisplayImage`)
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.controller;
|
package space.mori.dalbodeule.snapadmin.external.controller;
|
||||||
|
|
||||||
import java.security.Principal;
|
import java.security.Principal;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -30,11 +30,12 @@ import org.springframework.web.bind.annotation.ModelAttribute;
|
|||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import tech.ailef.snapadmin.external.SnapAdmin;
|
import space.mori.dalbodeule.snapadmin.external.SnapAdmin;
|
||||||
import tech.ailef.snapadmin.external.SnapAdminProperties;
|
import space.mori.dalbodeule.snapadmin.external.SnapAdminProperties;
|
||||||
import tech.ailef.snapadmin.external.exceptions.SnapAdminException;
|
import space.mori.dalbodeule.snapadmin.external.ThymeleafUtils;
|
||||||
import tech.ailef.snapadmin.external.exceptions.SnapAdminNotFoundException;
|
import space.mori.dalbodeule.snapadmin.external.exceptions.SnapAdminException;
|
||||||
import tech.ailef.snapadmin.internal.UserConfiguration;
|
import space.mori.dalbodeule.snapadmin.external.exceptions.SnapAdminNotFoundException;
|
||||||
|
import space.mori.dalbodeule.snapadmin.internal.UserConfiguration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class registers some global ModelAttributes and exception handlers.
|
* This class registers some global ModelAttributes and exception handlers.
|
||||||
@ -61,6 +62,7 @@ public class GlobalController {
|
|||||||
model.addAttribute("snapadmin_baseUrl", getBaseUrl());
|
model.addAttribute("snapadmin_baseUrl", getBaseUrl());
|
||||||
model.addAttribute("snapadmin_version", snapAdmin.getVersion());
|
model.addAttribute("snapadmin_version", snapAdmin.getVersion());
|
||||||
model.addAttribute("snapadmin_properties", props);
|
model.addAttribute("snapadmin_properties", props);
|
||||||
|
model.addAttribute("utils", new ThymeleafUtils());
|
||||||
return "snapadmin/other/error";
|
return "snapadmin/other/error";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,6 +75,7 @@ public class GlobalController {
|
|||||||
model.addAttribute("snapadmin_baseUrl", getBaseUrl());
|
model.addAttribute("snapadmin_baseUrl", getBaseUrl());
|
||||||
model.addAttribute("snapadmin_version", snapAdmin.getVersion());
|
model.addAttribute("snapadmin_version", snapAdmin.getVersion());
|
||||||
model.addAttribute("snapadmin_properties", props);
|
model.addAttribute("snapadmin_properties", props);
|
||||||
|
model.addAttribute("utils", new ThymeleafUtils());
|
||||||
response.setStatus(404);
|
response.setStatus(404);
|
||||||
return "snapadmin/other/error";
|
return "snapadmin/other/error";
|
||||||
}
|
}
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.controller;
|
package space.mori.dalbodeule.snapadmin.external.controller;
|
||||||
|
|
||||||
import java.security.Principal;
|
import java.security.Principal;
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
@ -56,29 +56,30 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
|||||||
import jakarta.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import jakarta.validation.ConstraintViolationException;
|
import jakarta.validation.ConstraintViolationException;
|
||||||
import tech.ailef.snapadmin.external.SnapAdmin;
|
import space.mori.dalbodeule.snapadmin.external.SnapAdmin;
|
||||||
import tech.ailef.snapadmin.external.SnapAdminProperties;
|
import space.mori.dalbodeule.snapadmin.external.SnapAdminProperties;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.DbObject;
|
import space.mori.dalbodeule.snapadmin.external.ThymeleafUtils;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.DbObjectSchema;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.DbObject;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.SnapAdminRepository;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.DbObjectSchema;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.query.DbQueryResult;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.SnapAdminRepository;
|
||||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.query.DbQueryResult;
|
||||||
import tech.ailef.snapadmin.external.dto.FacetedSearchRequest;
|
import space.mori.dalbodeule.snapadmin.external.dto.CompareOperator;
|
||||||
import tech.ailef.snapadmin.external.dto.LogsSearchRequest;
|
import space.mori.dalbodeule.snapadmin.external.dto.FacetedSearchRequest;
|
||||||
import tech.ailef.snapadmin.external.dto.PaginatedResult;
|
import space.mori.dalbodeule.snapadmin.external.dto.LogsSearchRequest;
|
||||||
import tech.ailef.snapadmin.external.dto.PaginationInfo;
|
import space.mori.dalbodeule.snapadmin.external.dto.PaginatedResult;
|
||||||
import tech.ailef.snapadmin.external.dto.QueryFilter;
|
import space.mori.dalbodeule.snapadmin.external.dto.PaginationInfo;
|
||||||
import tech.ailef.snapadmin.external.dto.ValidationErrorsContainer;
|
import space.mori.dalbodeule.snapadmin.external.dto.QueryFilter;
|
||||||
import tech.ailef.snapadmin.external.exceptions.InvalidPageException;
|
import space.mori.dalbodeule.snapadmin.external.dto.ValidationErrorsContainer;
|
||||||
import tech.ailef.snapadmin.external.exceptions.SnapAdminException;
|
import space.mori.dalbodeule.snapadmin.external.exceptions.InvalidPageException;
|
||||||
import tech.ailef.snapadmin.external.exceptions.SnapAdminNotFoundException;
|
import space.mori.dalbodeule.snapadmin.external.exceptions.SnapAdminException;
|
||||||
import tech.ailef.snapadmin.external.misc.Utils;
|
import space.mori.dalbodeule.snapadmin.external.exceptions.SnapAdminNotFoundException;
|
||||||
import tech.ailef.snapadmin.internal.model.ConsoleQuery;
|
import space.mori.dalbodeule.snapadmin.external.misc.Utils;
|
||||||
import tech.ailef.snapadmin.internal.model.UserAction;
|
import space.mori.dalbodeule.snapadmin.internal.model.ConsoleQuery;
|
||||||
import tech.ailef.snapadmin.internal.model.UserSetting;
|
import space.mori.dalbodeule.snapadmin.internal.model.UserAction;
|
||||||
import tech.ailef.snapadmin.internal.service.ConsoleQueryService;
|
import space.mori.dalbodeule.snapadmin.internal.model.UserSetting;
|
||||||
import tech.ailef.snapadmin.internal.service.UserActionService;
|
import space.mori.dalbodeule.snapadmin.internal.service.ConsoleQueryService;
|
||||||
import tech.ailef.snapadmin.internal.service.UserSettingsService;
|
import space.mori.dalbodeule.snapadmin.internal.service.UserActionService;
|
||||||
|
import space.mori.dalbodeule.snapadmin.internal.service.UserSettingsService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The main SnapAdmin controller that register most of the routes of the web interface.
|
* The main SnapAdmin controller that register most of the routes of the web interface.
|
||||||
@ -222,6 +223,7 @@ public class SnapAdminController {
|
|||||||
model.addAttribute("query", query);
|
model.addAttribute("query", query);
|
||||||
model.addAttribute("sortOrder", sortOrder);
|
model.addAttribute("sortOrder", sortOrder);
|
||||||
model.addAttribute("activeFilters", queryFilters);
|
model.addAttribute("activeFilters", queryFilters);
|
||||||
|
model.addAttribute("utils", new ThymeleafUtils());
|
||||||
return "snapadmin/model/list";
|
return "snapadmin/model/list";
|
||||||
|
|
||||||
} catch (InvalidPageException e) {
|
} catch (InvalidPageException e) {
|
||||||
@ -235,6 +237,7 @@ public class SnapAdminController {
|
|||||||
model.addAttribute("query", query);
|
model.addAttribute("query", query);
|
||||||
model.addAttribute("sortOrder", sortOrder);
|
model.addAttribute("sortOrder", sortOrder);
|
||||||
model.addAttribute("activeFilters", queryFilters);
|
model.addAttribute("activeFilters", queryFilters);
|
||||||
|
model.addAttribute("utils", new ThymeleafUtils());
|
||||||
return "snapadmin/model/list";
|
return "snapadmin/model/list";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -251,6 +254,7 @@ public class SnapAdminController {
|
|||||||
|
|
||||||
model.addAttribute("activePage", "entities");
|
model.addAttribute("activePage", "entities");
|
||||||
model.addAttribute("schema", schema);
|
model.addAttribute("schema", schema);
|
||||||
|
model.addAttribute("utils", new ThymeleafUtils());
|
||||||
|
|
||||||
return "snapadmin/model/schema";
|
return "snapadmin/model/schema";
|
||||||
}
|
}
|
||||||
@ -278,6 +282,7 @@ public class SnapAdminController {
|
|||||||
model.addAttribute("object", object);
|
model.addAttribute("object", object);
|
||||||
model.addAttribute("activePage", "entities");
|
model.addAttribute("activePage", "entities");
|
||||||
model.addAttribute("schema", schema);
|
model.addAttribute("schema", schema);
|
||||||
|
model.addAttribute("utils", new ThymeleafUtils());
|
||||||
|
|
||||||
return "snapadmin/model/show";
|
return "snapadmin/model/show";
|
||||||
}
|
}
|
||||||
@ -298,6 +303,7 @@ public class SnapAdminController {
|
|||||||
model.addAttribute("title", "Entities | " + schema.getJavaClass().getSimpleName() + " | Create");
|
model.addAttribute("title", "Entities | " + schema.getJavaClass().getSimpleName() + " | Create");
|
||||||
model.addAttribute("activePage", "entities");
|
model.addAttribute("activePage", "entities");
|
||||||
model.addAttribute("create", true);
|
model.addAttribute("create", true);
|
||||||
|
model.addAttribute("utils", new ThymeleafUtils());
|
||||||
|
|
||||||
return "snapadmin/model/create";
|
return "snapadmin/model/create";
|
||||||
}
|
}
|
||||||
@ -326,6 +332,7 @@ public class SnapAdminController {
|
|||||||
model.addAttribute("schema", schema);
|
model.addAttribute("schema", schema);
|
||||||
model.addAttribute("activePage", "entities");
|
model.addAttribute("activePage", "entities");
|
||||||
model.addAttribute("create", false);
|
model.addAttribute("create", false);
|
||||||
|
model.addAttribute("utils", new ThymeleafUtils());
|
||||||
|
|
||||||
return "snapadmin/model/create";
|
return "snapadmin/model/create";
|
||||||
}
|
}
|
||||||
@ -543,6 +550,7 @@ public class SnapAdminController {
|
|||||||
model.addAttribute("title", "Action logs");
|
model.addAttribute("title", "Action logs");
|
||||||
model.addAttribute("schemas", snapAdmin.getSchemas());
|
model.addAttribute("schemas", snapAdmin.getSchemas());
|
||||||
model.addAttribute("searchRequest", searchRequest);
|
model.addAttribute("searchRequest", searchRequest);
|
||||||
|
model.addAttribute("utils", new ThymeleafUtils());
|
||||||
return "snapadmin/logs";
|
return "snapadmin/logs";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -551,6 +559,7 @@ public class SnapAdminController {
|
|||||||
public String settings(Model model) {
|
public String settings(Model model) {
|
||||||
model.addAttribute("title", "Settings");
|
model.addAttribute("title", "Settings");
|
||||||
model.addAttribute("activePage", "settings");
|
model.addAttribute("activePage", "settings");
|
||||||
|
model.addAttribute("utils", new ThymeleafUtils());
|
||||||
return "snapadmin/settings/settings";
|
return "snapadmin/settings/settings";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -558,6 +567,7 @@ public class SnapAdminController {
|
|||||||
public String help(Model model) {
|
public String help(Model model) {
|
||||||
model.addAttribute("title", "Help");
|
model.addAttribute("title", "Help");
|
||||||
model.addAttribute("activePage", "help");
|
model.addAttribute("activePage", "help");
|
||||||
|
model.addAttribute("utils", new ThymeleafUtils());
|
||||||
return "snapadmin/help";
|
return "snapadmin/help";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -664,6 +674,7 @@ public class SnapAdminController {
|
|||||||
model.addAttribute("title", "SQL Console | " + activeQuery.getTitle());
|
model.addAttribute("title", "SQL Console | " + activeQuery.getTitle());
|
||||||
double elapsedTime = (System.currentTimeMillis() - startTime) / 1000.0;
|
double elapsedTime = (System.currentTimeMillis() - startTime) / 1000.0;
|
||||||
model.addAttribute("elapsedTime", new DecimalFormat("0.0#").format(elapsedTime));
|
model.addAttribute("elapsedTime", new DecimalFormat("0.0#").format(elapsedTime));
|
||||||
|
model.addAttribute("utils", new ThymeleafUtils());
|
||||||
return "snapadmin/console";
|
return "snapadmin/console";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -671,6 +682,7 @@ public class SnapAdminController {
|
|||||||
@GetMapping("/settings/appearance")
|
@GetMapping("/settings/appearance")
|
||||||
public String settingsAppearance(Model model) {
|
public String settingsAppearance(Model model) {
|
||||||
model.addAttribute("activePage", "settings");
|
model.addAttribute("activePage", "settings");
|
||||||
|
model.addAttribute("utils", new ThymeleafUtils());
|
||||||
return "snapadmin/settings/appearance";
|
return "snapadmin/settings/appearance";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -679,6 +691,7 @@ public class SnapAdminController {
|
|||||||
model.addAttribute("error", "Forbidden");
|
model.addAttribute("error", "Forbidden");
|
||||||
model.addAttribute("status", "403");
|
model.addAttribute("status", "403");
|
||||||
model.addAttribute("message", "You don't have the privileges to perform this action");
|
model.addAttribute("message", "You don't have the privileges to perform this action");
|
||||||
|
model.addAttribute("utils", new ThymeleafUtils());
|
||||||
return "snapadmin/other/error";
|
return "snapadmin/other/error";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -692,6 +705,7 @@ public class SnapAdminController {
|
|||||||
userSettingsService.save(new UserSetting(paramName, params.get(paramName)));
|
userSettingsService.save(new UserSetting(paramName, params.get(paramName)));
|
||||||
}
|
}
|
||||||
model.addAttribute("activePage", "settings");
|
model.addAttribute("activePage", "settings");
|
||||||
|
model.addAttribute("utils", new ThymeleafUtils());
|
||||||
return next;
|
return next;
|
||||||
}
|
}
|
||||||
|
|
@ -20,4 +20,4 @@
|
|||||||
/**
|
/**
|
||||||
* Controllers registered for the web UI
|
* Controllers registered for the web UI
|
||||||
*/
|
*/
|
||||||
package tech.ailef.snapadmin.external.controller;
|
package space.mori.dalbodeule.snapadmin.external.controller;
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.controller.rest;
|
package space.mori.dalbodeule.snapadmin.external.controller.rest;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@ -30,10 +30,10 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import tech.ailef.snapadmin.external.SnapAdmin;
|
import space.mori.dalbodeule.snapadmin.external.SnapAdmin;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.DbObjectSchema;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.DbObjectSchema;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.SnapAdminRepository;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.SnapAdminRepository;
|
||||||
import tech.ailef.snapadmin.external.dto.AutocompleteSearchResult;
|
import space.mori.dalbodeule.snapadmin.external.dto.AutocompleteSearchResult;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* API controller for autocomplete results
|
* API controller for autocomplete results
|
4
src/main/java/space/mori/dalbodeule/snapadmin/external/controller/rest/package-info.java
vendored
Normal file
4
src/main/java/space/mori/dalbodeule/snapadmin/external/controller/rest/package-info.java
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
/**
|
||||||
|
* Rest controllers
|
||||||
|
*/
|
||||||
|
package space.mori.dalbodeule.snapadmin.external.controller.rest;
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dbmapping;
|
package space.mori.dalbodeule.snapadmin.external.dbmapping;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
@ -40,12 +40,12 @@ import jakarta.persistence.criteria.CriteriaUpdate;
|
|||||||
import jakarta.persistence.criteria.Path;
|
import jakarta.persistence.criteria.Path;
|
||||||
import jakarta.persistence.criteria.Predicate;
|
import jakarta.persistence.criteria.Predicate;
|
||||||
import jakarta.persistence.criteria.Root;
|
import jakarta.persistence.criteria.Root;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.fields.DbField;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.fields.DbField;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.fields.StringFieldType;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.fields.StringFieldType;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.fields.TextFieldType;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.fields.TextFieldType;
|
||||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
import space.mori.dalbodeule.snapadmin.external.dto.CompareOperator;
|
||||||
import tech.ailef.snapadmin.external.dto.QueryFilter;
|
import space.mori.dalbodeule.snapadmin.external.dto.QueryFilter;
|
||||||
import tech.ailef.snapadmin.external.exceptions.SnapAdminException;
|
import space.mori.dalbodeule.snapadmin.external.exceptions.SnapAdminException;
|
||||||
|
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
public class CustomJpaRepository extends SimpleJpaRepository {
|
public class CustomJpaRepository extends SimpleJpaRepository {
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dbmapping;
|
package space.mori.dalbodeule.snapadmin.external.dbmapping;
|
||||||
|
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
@ -27,7 +27,7 @@ import java.util.Objects;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
|
||||||
import tech.ailef.snapadmin.external.dbmapping.fields.DbField;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.fields.DbField;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wrapper for the value of a field
|
* Wrapper for the value of a field
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dbmapping;
|
package space.mori.dalbodeule.snapadmin.external.dbmapping;
|
||||||
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
@ -34,10 +34,10 @@ import jakarta.persistence.ManyToMany;
|
|||||||
import jakarta.persistence.ManyToOne;
|
import jakarta.persistence.ManyToOne;
|
||||||
import jakarta.persistence.OneToMany;
|
import jakarta.persistence.OneToMany;
|
||||||
import jakarta.persistence.OneToOne;
|
import jakarta.persistence.OneToOne;
|
||||||
import tech.ailef.snapadmin.external.annotations.DisplayName;
|
import space.mori.dalbodeule.snapadmin.external.annotations.DisplayName;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.fields.BooleanFieldType;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.fields.BooleanFieldType;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.fields.DbField;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.fields.DbField;
|
||||||
import tech.ailef.snapadmin.external.exceptions.SnapAdminException;
|
import space.mori.dalbodeule.snapadmin.external.exceptions.SnapAdminException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wrapper for all objects retrieved from the database.
|
* Wrapper for all objects retrieved from the database.
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dbmapping;
|
package space.mori.dalbodeule.snapadmin.external.dbmapping;
|
||||||
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
@ -39,18 +39,18 @@ import jakarta.persistence.ManyToMany;
|
|||||||
import jakarta.persistence.OneToMany;
|
import jakarta.persistence.OneToMany;
|
||||||
import jakarta.persistence.OneToOne;
|
import jakarta.persistence.OneToOne;
|
||||||
import jakarta.persistence.Table;
|
import jakarta.persistence.Table;
|
||||||
import tech.ailef.snapadmin.external.SnapAdmin;
|
import space.mori.dalbodeule.snapadmin.external.SnapAdmin;
|
||||||
import tech.ailef.snapadmin.external.annotations.ComputedColumn;
|
import space.mori.dalbodeule.snapadmin.external.annotations.ComputedColumn;
|
||||||
import tech.ailef.snapadmin.external.annotations.DisableCreate;
|
import space.mori.dalbodeule.snapadmin.external.annotations.DisableCreate;
|
||||||
import tech.ailef.snapadmin.external.annotations.DisableDelete;
|
import space.mori.dalbodeule.snapadmin.external.annotations.DisableDelete;
|
||||||
import tech.ailef.snapadmin.external.annotations.DisableEdit;
|
import space.mori.dalbodeule.snapadmin.external.annotations.DisableEdit;
|
||||||
import tech.ailef.snapadmin.external.annotations.DisableExport;
|
import space.mori.dalbodeule.snapadmin.external.annotations.DisableExport;
|
||||||
import tech.ailef.snapadmin.external.annotations.HiddenColumn;
|
import space.mori.dalbodeule.snapadmin.external.annotations.HiddenColumn;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.fields.DbField;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.fields.DbField;
|
||||||
import tech.ailef.snapadmin.external.dto.MappingError;
|
import space.mori.dalbodeule.snapadmin.external.dto.MappingError;
|
||||||
import tech.ailef.snapadmin.external.exceptions.SnapAdminException;
|
import space.mori.dalbodeule.snapadmin.external.exceptions.SnapAdminException;
|
||||||
import tech.ailef.snapadmin.external.exceptions.SnapAdminNotFoundException;
|
import space.mori.dalbodeule.snapadmin.external.exceptions.SnapAdminNotFoundException;
|
||||||
import tech.ailef.snapadmin.external.misc.Utils;
|
import space.mori.dalbodeule.snapadmin.external.misc.Utils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A class that represents a table/`@Entity` as reconstructed from the
|
* A class that represents a table/`@Entity` as reconstructed from the
|
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dbmapping;
|
package space.mori.dalbodeule.snapadmin.external.dbmapping;
|
||||||
|
|
||||||
import java.sql.ResultSetMetaData;
|
import java.sql.ResultSetMetaData;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -46,18 +46,18 @@ import jakarta.validation.ConstraintViolation;
|
|||||||
import jakarta.validation.ConstraintViolationException;
|
import jakarta.validation.ConstraintViolationException;
|
||||||
import jakarta.validation.Validation;
|
import jakarta.validation.Validation;
|
||||||
import jakarta.validation.Validator;
|
import jakarta.validation.Validator;
|
||||||
import tech.ailef.snapadmin.external.SnapAdmin;
|
import space.mori.dalbodeule.snapadmin.external.SnapAdmin;
|
||||||
import tech.ailef.snapadmin.external.annotations.ReadOnly;
|
import space.mori.dalbodeule.snapadmin.external.annotations.ReadOnly;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.fields.DbField;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.fields.DbField;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.query.DbQueryOutputField;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.query.DbQueryOutputField;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.query.DbQueryResult;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.query.DbQueryResult;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.query.DbQueryResultRow;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.query.DbQueryResultRow;
|
||||||
import tech.ailef.snapadmin.external.dto.FacetedSearchRequest;
|
import space.mori.dalbodeule.snapadmin.external.dto.FacetedSearchRequest;
|
||||||
import tech.ailef.snapadmin.external.dto.PaginatedResult;
|
import space.mori.dalbodeule.snapadmin.external.dto.PaginatedResult;
|
||||||
import tech.ailef.snapadmin.external.dto.PaginationInfo;
|
import space.mori.dalbodeule.snapadmin.external.dto.PaginationInfo;
|
||||||
import tech.ailef.snapadmin.external.dto.QueryFilter;
|
import space.mori.dalbodeule.snapadmin.external.dto.QueryFilter;
|
||||||
import tech.ailef.snapadmin.external.exceptions.InvalidPageException;
|
import space.mori.dalbodeule.snapadmin.external.exceptions.InvalidPageException;
|
||||||
import tech.ailef.snapadmin.external.exceptions.SnapAdminException;
|
import space.mori.dalbodeule.snapadmin.external.exceptions.SnapAdminException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements the basic CRUD operations (and some more)
|
* Implements the basic CRUD operations (and some more)
|
@ -16,12 +16,12 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
package space.mori.dalbodeule.snapadmin.external.dbmapping.fields;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
import space.mori.dalbodeule.snapadmin.external.dto.CompareOperator;
|
||||||
|
|
||||||
public class BigDecimalFieldType extends DbFieldType {
|
public class BigDecimalFieldType extends DbFieldType {
|
||||||
@Override
|
@Override
|
@ -16,12 +16,12 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
package space.mori.dalbodeule.snapadmin.external.dbmapping.fields;
|
||||||
|
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
import space.mori.dalbodeule.snapadmin.external.dto.CompareOperator;
|
||||||
|
|
||||||
public class BigIntegerFieldType extends DbFieldType {
|
public class BigIntegerFieldType extends DbFieldType {
|
||||||
@Override
|
@Override
|
@ -16,11 +16,11 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
package space.mori.dalbodeule.snapadmin.external.dbmapping.fields;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
import space.mori.dalbodeule.snapadmin.external.dto.CompareOperator;
|
||||||
|
|
||||||
public class BooleanFieldType extends DbFieldType {
|
public class BooleanFieldType extends DbFieldType {
|
||||||
@Override
|
@Override
|
@ -16,15 +16,15 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
package space.mori.dalbodeule.snapadmin.external.dbmapping.fields;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
import space.mori.dalbodeule.snapadmin.external.dto.CompareOperator;
|
||||||
import tech.ailef.snapadmin.external.exceptions.SnapAdminException;
|
import space.mori.dalbodeule.snapadmin.external.exceptions.SnapAdminException;
|
||||||
|
|
||||||
public class ByteArrayFieldType extends DbFieldType {
|
public class ByteArrayFieldType extends DbFieldType {
|
||||||
@Override
|
@Override
|
@ -16,12 +16,12 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
package space.mori.dalbodeule.snapadmin.external.dbmapping.fields;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
import space.mori.dalbodeule.snapadmin.external.dto.CompareOperator;
|
||||||
import tech.ailef.snapadmin.external.exceptions.SnapAdminException;
|
import space.mori.dalbodeule.snapadmin.external.exceptions.SnapAdminException;
|
||||||
|
|
||||||
public class ByteFieldType extends DbFieldType {
|
public class ByteFieldType extends DbFieldType {
|
||||||
@Override
|
@Override
|
@ -17,11 +17,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
package space.mori.dalbodeule.snapadmin.external.dbmapping.fields;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
import space.mori.dalbodeule.snapadmin.external.dto.CompareOperator;
|
||||||
|
|
||||||
public class CharFieldType extends DbFieldType {
|
public class CharFieldType extends DbFieldType {
|
||||||
@Override
|
@Override
|
@ -16,12 +16,12 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
package space.mori.dalbodeule.snapadmin.external.dbmapping.fields;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
import space.mori.dalbodeule.snapadmin.external.dto.CompareOperator;
|
||||||
import tech.ailef.snapadmin.external.exceptions.SnapAdminException;
|
import space.mori.dalbodeule.snapadmin.external.exceptions.SnapAdminException;
|
||||||
|
|
||||||
public class ComputedFieldType extends DbFieldType {
|
public class ComputedFieldType extends DbFieldType {
|
||||||
@Override
|
@Override
|
@ -16,15 +16,15 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
package space.mori.dalbodeule.snapadmin.external.dbmapping.fields;
|
||||||
|
|
||||||
import java.sql.Date;
|
import java.sql.Date;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.format.DateTimeParseException;
|
import java.time.format.DateTimeParseException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
import space.mori.dalbodeule.snapadmin.external.dto.CompareOperator;
|
||||||
import tech.ailef.snapadmin.external.exceptions.SnapAdminException;
|
import space.mori.dalbodeule.snapadmin.external.exceptions.SnapAdminException;
|
||||||
|
|
||||||
public class DateFieldType extends DbFieldType {
|
public class DateFieldType extends DbFieldType {
|
||||||
@Override
|
@Override
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
package space.mori.dalbodeule.snapadmin.external.dbmapping.fields;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -32,13 +32,13 @@ import jakarta.persistence.ManyToMany;
|
|||||||
import jakarta.persistence.ManyToOne;
|
import jakarta.persistence.ManyToOne;
|
||||||
import jakarta.persistence.OneToMany;
|
import jakarta.persistence.OneToMany;
|
||||||
import jakarta.persistence.OneToOne;
|
import jakarta.persistence.OneToOne;
|
||||||
import tech.ailef.snapadmin.external.annotations.DisplayImage;
|
import space.mori.dalbodeule.snapadmin.external.annotations.DisplayImage;
|
||||||
import tech.ailef.snapadmin.external.annotations.Filterable;
|
import space.mori.dalbodeule.snapadmin.external.annotations.Filterable;
|
||||||
import tech.ailef.snapadmin.external.annotations.FilterableType;
|
import space.mori.dalbodeule.snapadmin.external.annotations.FilterableType;
|
||||||
import tech.ailef.snapadmin.external.annotations.ReadOnly;
|
import space.mori.dalbodeule.snapadmin.external.annotations.ReadOnly;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.DbFieldValue;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.DbFieldValue;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.DbObject;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.DbObject;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.DbObjectSchema;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.DbObjectSchema;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represent a field on the database, generated from an Entity class instance variable.
|
* Represent a field on the database, generated from an Entity class instance variable.
|
@ -16,7 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
package space.mori.dalbodeule.snapadmin.external.dbmapping.fields;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
@ -27,9 +27,9 @@ import java.time.LocalDateTime;
|
|||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
import space.mori.dalbodeule.snapadmin.external.dto.CompareOperator;
|
||||||
import tech.ailef.snapadmin.external.exceptions.UnsupportedFieldTypeException;
|
import space.mori.dalbodeule.snapadmin.external.exceptions.UnsupportedFieldTypeException;
|
||||||
import tech.ailef.snapadmin.external.misc.Utils;
|
import space.mori.dalbodeule.snapadmin.external.misc.Utils;
|
||||||
|
|
||||||
public abstract class DbFieldType {
|
public abstract class DbFieldType {
|
||||||
|
|
@ -16,11 +16,11 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
package space.mori.dalbodeule.snapadmin.external.dbmapping.fields;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
import space.mori.dalbodeule.snapadmin.external.dto.CompareOperator;
|
||||||
|
|
||||||
public class DoubleFieldType extends DbFieldType {
|
public class DoubleFieldType extends DbFieldType {
|
||||||
@Override
|
@Override
|
@ -16,7 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
package space.mori.dalbodeule.snapadmin.external.dbmapping.fields;
|
||||||
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
@ -25,8 +25,8 @@ import java.util.List;
|
|||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import jakarta.persistence.EnumType;
|
import jakarta.persistence.EnumType;
|
||||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
import space.mori.dalbodeule.snapadmin.external.dto.CompareOperator;
|
||||||
import tech.ailef.snapadmin.external.exceptions.SnapAdminException;
|
import space.mori.dalbodeule.snapadmin.external.exceptions.SnapAdminException;
|
||||||
|
|
||||||
public class EnumFieldType extends DbFieldType {
|
public class EnumFieldType extends DbFieldType {
|
||||||
|
|
@ -16,11 +16,11 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
package space.mori.dalbodeule.snapadmin.external.dbmapping.fields;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
import space.mori.dalbodeule.snapadmin.external.dto.CompareOperator;
|
||||||
|
|
||||||
public class FloatFieldType extends DbFieldType {
|
public class FloatFieldType extends DbFieldType {
|
||||||
@Override
|
@Override
|
@ -16,14 +16,14 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
package space.mori.dalbodeule.snapadmin.external.dbmapping.fields;
|
||||||
|
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.ZoneOffset;
|
import java.time.ZoneOffset;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
import space.mori.dalbodeule.snapadmin.external.dto.CompareOperator;
|
||||||
|
|
||||||
public class InstantFieldType extends DbFieldType {
|
public class InstantFieldType extends DbFieldType {
|
||||||
@Override
|
@Override
|
@ -16,11 +16,11 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
package space.mori.dalbodeule.snapadmin.external.dbmapping.fields;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
import space.mori.dalbodeule.snapadmin.external.dto.CompareOperator;
|
||||||
|
|
||||||
public class IntegerFieldType extends DbFieldType {
|
public class IntegerFieldType extends DbFieldType {
|
||||||
@Override
|
@Override
|
@ -16,12 +16,12 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
package space.mori.dalbodeule.snapadmin.external.dbmapping.fields;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
import space.mori.dalbodeule.snapadmin.external.dto.CompareOperator;
|
||||||
|
|
||||||
public class LocalDateFieldType extends DbFieldType {
|
public class LocalDateFieldType extends DbFieldType {
|
||||||
@Override
|
@Override
|
@ -16,12 +16,12 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
package space.mori.dalbodeule.snapadmin.external.dbmapping.fields;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
import space.mori.dalbodeule.snapadmin.external.dto.CompareOperator;
|
||||||
|
|
||||||
public class LocalDateTimeFieldType extends DbFieldType {
|
public class LocalDateTimeFieldType extends DbFieldType {
|
||||||
@Override
|
@Override
|
@ -16,11 +16,11 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
package space.mori.dalbodeule.snapadmin.external.dbmapping.fields;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
import space.mori.dalbodeule.snapadmin.external.dto.CompareOperator;
|
||||||
|
|
||||||
public class LongFieldType extends DbFieldType {
|
public class LongFieldType extends DbFieldType {
|
||||||
@Override
|
@Override
|
@ -16,13 +16,13 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
package space.mori.dalbodeule.snapadmin.external.dbmapping.fields;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import jakarta.persistence.ManyToMany;
|
import jakarta.persistence.ManyToMany;
|
||||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
import space.mori.dalbodeule.snapadmin.external.dto.CompareOperator;
|
||||||
import tech.ailef.snapadmin.external.exceptions.SnapAdminException;
|
import space.mori.dalbodeule.snapadmin.external.exceptions.SnapAdminException;
|
||||||
|
|
||||||
public class ManyToManyFieldType extends DbFieldType {
|
public class ManyToManyFieldType extends DbFieldType {
|
||||||
@Override
|
@Override
|
@ -16,12 +16,12 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
package space.mori.dalbodeule.snapadmin.external.dbmapping.fields;
|
||||||
|
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
import space.mori.dalbodeule.snapadmin.external.dto.CompareOperator;
|
||||||
|
|
||||||
public class OffsetDateTimeFieldType extends DbFieldType {
|
public class OffsetDateTimeFieldType extends DbFieldType {
|
||||||
@Override
|
@Override
|
@ -16,13 +16,13 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
package space.mori.dalbodeule.snapadmin.external.dbmapping.fields;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import jakarta.persistence.OneToMany;
|
import jakarta.persistence.OneToMany;
|
||||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
import space.mori.dalbodeule.snapadmin.external.dto.CompareOperator;
|
||||||
import tech.ailef.snapadmin.external.exceptions.SnapAdminException;
|
import space.mori.dalbodeule.snapadmin.external.exceptions.SnapAdminException;
|
||||||
|
|
||||||
public class OneToManyFieldType extends DbFieldType {
|
public class OneToManyFieldType extends DbFieldType {
|
||||||
@Override
|
@Override
|
@ -16,13 +16,13 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
package space.mori.dalbodeule.snapadmin.external.dbmapping.fields;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import jakarta.persistence.OneToOne;
|
import jakarta.persistence.OneToOne;
|
||||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
import space.mori.dalbodeule.snapadmin.external.dto.CompareOperator;
|
||||||
import tech.ailef.snapadmin.external.exceptions.SnapAdminException;
|
import space.mori.dalbodeule.snapadmin.external.exceptions.SnapAdminException;
|
||||||
|
|
||||||
public class OneToOneFieldType extends DbFieldType {
|
public class OneToOneFieldType extends DbFieldType {
|
||||||
@Override
|
@Override
|
@ -16,11 +16,11 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
package space.mori.dalbodeule.snapadmin.external.dbmapping.fields;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
import space.mori.dalbodeule.snapadmin.external.dto.CompareOperator;
|
||||||
|
|
||||||
public class ShortFieldType extends DbFieldType {
|
public class ShortFieldType extends DbFieldType {
|
||||||
@Override
|
@Override
|
@ -16,11 +16,11 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
package space.mori.dalbodeule.snapadmin.external.dbmapping.fields;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
import space.mori.dalbodeule.snapadmin.external.dto.CompareOperator;
|
||||||
|
|
||||||
public class StringFieldType extends DbFieldType {
|
public class StringFieldType extends DbFieldType {
|
||||||
@Override
|
@Override
|
@ -16,11 +16,11 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
package space.mori.dalbodeule.snapadmin.external.dbmapping.fields;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
import space.mori.dalbodeule.snapadmin.external.dto.CompareOperator;
|
||||||
|
|
||||||
public class TextFieldType extends DbFieldType {
|
public class TextFieldType extends DbFieldType {
|
||||||
@Override
|
@Override
|
@ -16,11 +16,11 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
package space.mori.dalbodeule.snapadmin.external.dbmapping.fields;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
import space.mori.dalbodeule.snapadmin.external.dto.CompareOperator;
|
||||||
|
|
||||||
public class UUIDFieldType extends DbFieldType {
|
public class UUIDFieldType extends DbFieldType {
|
||||||
@Override
|
@Override
|
@ -20,4 +20,4 @@
|
|||||||
/**
|
/**
|
||||||
* Representation of the user database and repository classes.
|
* Representation of the user database and repository classes.
|
||||||
*/
|
*/
|
||||||
package tech.ailef.snapadmin.external.dbmapping;
|
package space.mori.dalbodeule.snapadmin.external.dbmapping;
|
@ -18,17 +18,17 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dbmapping.query;
|
package space.mori.dalbodeule.snapadmin.external.dbmapping.query;
|
||||||
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import tech.ailef.snapadmin.external.SnapAdmin;
|
import space.mori.dalbodeule.snapadmin.external.SnapAdmin;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.DbObjectSchema;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.DbObjectSchema;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.fields.DbField;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.fields.DbField;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.fields.DbFieldType;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.fields.DbFieldType;
|
||||||
import tech.ailef.snapadmin.external.exceptions.SnapAdminException;
|
import space.mori.dalbodeule.snapadmin.external.exceptions.SnapAdminException;
|
||||||
import tech.ailef.snapadmin.external.exceptions.UnsupportedFieldTypeException;
|
import space.mori.dalbodeule.snapadmin.external.exceptions.UnsupportedFieldTypeException;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* A class that holds output fields from a user-provided SQL query
|
* A class that holds output fields from a user-provided SQL query
|
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dbmapping.query;
|
package space.mori.dalbodeule.snapadmin.external.dbmapping.query;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
@ -18,13 +18,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dbmapping.query;
|
package space.mori.dalbodeule.snapadmin.external.dbmapping.query;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import tech.ailef.snapadmin.external.exceptions.SnapAdminException;
|
import space.mori.dalbodeule.snapadmin.external.exceptions.SnapAdminException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A single row of results coming from a user-provided SQL query
|
* A single row of results coming from a user-provided SQL query
|
@ -17,10 +17,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dto;
|
package space.mori.dalbodeule.snapadmin.external.dto;
|
||||||
|
|
||||||
import tech.ailef.snapadmin.external.controller.rest.AutocompleteController;
|
import space.mori.dalbodeule.snapadmin.external.controller.rest.AutocompleteController;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.DbObject;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.DbObject;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An object to hold autocomplete results returned from the {@linkplain AutocompleteController}.
|
* An object to hold autocomplete results returned from the {@linkplain AutocompleteController}.
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dto;
|
package space.mori.dalbodeule.snapadmin.external.dto;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A list of operators that are used in faceted search.
|
* A list of operators that are used in faceted search.
|
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dto;
|
package space.mori.dalbodeule.snapadmin.external.dto;
|
||||||
|
|
||||||
public enum DataExportFormat {
|
public enum DataExportFormat {
|
||||||
CSV,
|
CSV,
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dto;
|
package space.mori.dalbodeule.snapadmin.external.dto;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dto;
|
package space.mori.dalbodeule.snapadmin.external.dto;
|
||||||
|
|
||||||
import org.springframework.util.LinkedMultiValueMap;
|
import org.springframework.util.LinkedMultiValueMap;
|
||||||
import org.springframework.util.MultiValueMap;
|
import org.springframework.util.MultiValueMap;
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dto;
|
package space.mori.dalbodeule.snapadmin.external.dto;
|
||||||
|
|
||||||
import org.springframework.data.domain.PageRequest;
|
import org.springframework.data.domain.PageRequest;
|
||||||
import org.springframework.data.domain.Sort;
|
import org.springframework.data.domain.Sort;
|
@ -16,7 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dto;
|
package space.mori.dalbodeule.snapadmin.external.dto;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A wrapper class for information about mapping errors, i.e. errors that happen
|
* A wrapper class for information about mapping errors, i.e. errors that happen
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dto;
|
package space.mori.dalbodeule.snapadmin.external.dto;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dto;
|
package space.mori.dalbodeule.snapadmin.external.dto;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -26,7 +26,7 @@ import java.util.stream.IntStream;
|
|||||||
|
|
||||||
import org.springframework.util.MultiValueMap;
|
import org.springframework.util.MultiValueMap;
|
||||||
|
|
||||||
import tech.ailef.snapadmin.external.misc.Utils;
|
import space.mori.dalbodeule.snapadmin.external.misc.Utils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Attached as output to requests that have a paginated response,
|
* Attached as output to requests that have a paginated response,
|
@ -17,12 +17,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dto;
|
package space.mori.dalbodeule.snapadmin.external.dto;
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import tech.ailef.snapadmin.external.dbmapping.fields.DbField;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.fields.DbField;
|
||||||
import tech.ailef.snapadmin.external.exceptions.SnapAdminException;
|
import space.mori.dalbodeule.snapadmin.external.exceptions.SnapAdminException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A single filter in a FacetedSearchRequest. This describes a
|
* A single filter in a FacetedSearchRequest. This describes a
|
@ -16,7 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.dto;
|
package space.mori.dalbodeule.snapadmin.external.dto;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
@ -20,4 +20,4 @@
|
|||||||
/**
|
/**
|
||||||
* Data objects used in primarily in requests and responses
|
* Data objects used in primarily in requests and responses
|
||||||
*/
|
*/
|
||||||
package tech.ailef.snapadmin.external.dto;
|
package space.mori.dalbodeule.snapadmin.external.dto;
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.exceptions;
|
package space.mori.dalbodeule.snapadmin.external.exceptions;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Thrown during the computation of pagination if the requested
|
* Thrown during the computation of pagination if the requested
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.exceptions;
|
package space.mori.dalbodeule.snapadmin.external.exceptions;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generic top-level exception for everything thrown by us
|
* Generic top-level exception for everything thrown by us
|
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.exceptions;
|
package space.mori.dalbodeule.snapadmin.external.exceptions;
|
||||||
|
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.web.server.ResponseStatusException;
|
import org.springframework.web.server.ResponseStatusException;
|
@ -16,7 +16,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.exceptions;
|
package space.mori.dalbodeule.snapadmin.external.exceptions;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Thrown when a field of an `@Entity` class has a type that is not
|
* Thrown when a field of an `@Entity` class has a type that is not
|
@ -20,4 +20,4 @@
|
|||||||
/**
|
/**
|
||||||
* Exception classes
|
* Exception classes
|
||||||
*/
|
*/
|
||||||
package tech.ailef.snapadmin.external.exceptions;
|
package space.mori.dalbodeule.snapadmin.external.exceptions;
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.misc;
|
package space.mori.dalbodeule.snapadmin.external.misc;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
@ -26,11 +26,11 @@ import java.util.Set;
|
|||||||
|
|
||||||
import org.springframework.util.MultiValueMap;
|
import org.springframework.util.MultiValueMap;
|
||||||
|
|
||||||
import tech.ailef.snapadmin.external.dbmapping.DbObjectSchema;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.DbObjectSchema;
|
||||||
import tech.ailef.snapadmin.external.dbmapping.fields.DbField;
|
import space.mori.dalbodeule.snapadmin.external.dbmapping.fields.DbField;
|
||||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
import space.mori.dalbodeule.snapadmin.external.dto.CompareOperator;
|
||||||
import tech.ailef.snapadmin.external.dto.QueryFilter;
|
import space.mori.dalbodeule.snapadmin.external.dto.QueryFilter;
|
||||||
import tech.ailef.snapadmin.external.exceptions.SnapAdminException;
|
import space.mori.dalbodeule.snapadmin.external.exceptions.SnapAdminException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Collection of utility functions used across the project
|
* Collection of utility functions used across the project
|
@ -21,4 +21,4 @@
|
|||||||
* Miscellaneous utility classes.
|
* Miscellaneous utility classes.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package tech.ailef.snapadmin.external.misc;
|
package space.mori.dalbodeule.snapadmin.external.misc;
|
@ -20,6 +20,6 @@
|
|||||||
* Root package of SnapAdmin.
|
* Root package of SnapAdmin.
|
||||||
*
|
*
|
||||||
* It contains the configuration class which handles the initialization
|
* It contains the configuration class which handles the initialization
|
||||||
* and the main {@link tech.ailef.snapadmin.external.SnapAdmin} class.
|
* and the main {@link space.mori.dalbodeule.snapadmin.external.SnapAdmin} class.
|
||||||
*/
|
*/
|
||||||
package tech.ailef.snapadmin.external;
|
package space.mori.dalbodeule.snapadmin.external;
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.internal;
|
package space.mori.dalbodeule.snapadmin.internal;
|
||||||
|
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
import org.springframework.context.annotation.ComponentScan;
|
import org.springframework.context.annotation.ComponentScan;
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.internal;
|
package space.mori.dalbodeule.snapadmin.internal;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -26,9 +26,9 @@ import java.util.Optional;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import tech.ailef.snapadmin.external.exceptions.SnapAdminException;
|
import space.mori.dalbodeule.snapadmin.external.exceptions.SnapAdminException;
|
||||||
import tech.ailef.snapadmin.internal.model.UserSetting;
|
import space.mori.dalbodeule.snapadmin.internal.model.UserSetting;
|
||||||
import tech.ailef.snapadmin.internal.repository.UserSettingsRepository;
|
import space.mori.dalbodeule.snapadmin.internal.repository.UserSettingsRepository;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wrapper class for the UserSettingsRepository that provides a better
|
* Wrapper class for the UserSettingsRepository that provides a better
|
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.internal.model;
|
package space.mori.dalbodeule.snapadmin.internal.model;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.internal.model;
|
package space.mori.dalbodeule.snapadmin.internal.model;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.internal.model;
|
package space.mori.dalbodeule.snapadmin.internal.model;
|
||||||
|
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
import jakarta.persistence.Id;
|
import jakarta.persistence.Id;
|
@ -20,4 +20,4 @@
|
|||||||
/**
|
/**
|
||||||
* Entity classes for the internal data source (action logs and user settings).
|
* Entity classes for the internal data source (action logs and user settings).
|
||||||
*/
|
*/
|
||||||
package tech.ailef.snapadmin.internal.model;
|
package space.mori.dalbodeule.snapadmin.internal.model;
|
@ -23,7 +23,7 @@
|
|||||||
* Boot Database Admin in order to save information.
|
* Boot Database Admin in order to save information.
|
||||||
*
|
*
|
||||||
* Due to the way Spring Boot component scanning works, it is needed to create this package and the
|
* Due to the way Spring Boot component scanning works, it is needed to create this package and the
|
||||||
* respective {@link tech.ailef.snapadmin.internal.InternalSnapAdminConfiguration} in order to
|
* respective {@link space.mori.dalbodeule.snapadmin.internal.InternalSnapAdminConfiguration} in order to
|
||||||
* have the component scanning only pick the correct entities/repositories.
|
* have the component scanning only pick the correct entities/repositories.
|
||||||
*/
|
*/
|
||||||
package tech.ailef.snapadmin.internal;
|
package space.mori.dalbodeule.snapadmin.internal;
|
@ -17,12 +17,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package tech.ailef.snapadmin.internal.repository;
|
package space.mori.dalbodeule.snapadmin.internal.repository;
|
||||||
|
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import tech.ailef.snapadmin.internal.model.ConsoleQuery;
|
import space.mori.dalbodeule.snapadmin.internal.model.ConsoleQuery;
|
||||||
|
|
||||||
@Repository
|
@Repository
|
||||||
public interface ConsoleQueryRepository extends JpaRepository<ConsoleQuery, String>, CustomActionRepository {
|
public interface ConsoleQueryRepository extends JpaRepository<ConsoleQuery, String>, CustomActionRepository {
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user