mirror of
https://github.com/dalbodeule/snap-admin.git
synced 2025-06-09 05:48:20 +00:00
Renamed packages and spring-devtools properties
This commit is contained in:
parent
243e6364fe
commit
2fdce6fffe
@ -1,4 +0,0 @@
|
||||
/**
|
||||
* Rest controllers
|
||||
*/
|
||||
package tech.ailef.dbadmin.external.controller.rest;
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external;
|
||||
package tech.ailef.snapadmin.external;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
@ -49,20 +49,20 @@ import jakarta.persistence.ManyToMany;
|
||||
import jakarta.persistence.ManyToOne;
|
||||
import jakarta.persistence.OneToMany;
|
||||
import jakarta.persistence.OneToOne;
|
||||
import tech.ailef.dbadmin.external.annotations.Disable;
|
||||
import tech.ailef.dbadmin.external.annotations.DisplayFormat;
|
||||
import tech.ailef.dbadmin.external.dbmapping.CustomJpaRepository;
|
||||
import tech.ailef.dbadmin.external.dbmapping.DbObjectSchema;
|
||||
import tech.ailef.dbadmin.external.dbmapping.fields.DbField;
|
||||
import tech.ailef.dbadmin.external.dbmapping.fields.DbFieldType;
|
||||
import tech.ailef.dbadmin.external.dbmapping.fields.EnumFieldType;
|
||||
import tech.ailef.dbadmin.external.dbmapping.fields.StringFieldType;
|
||||
import tech.ailef.dbadmin.external.dbmapping.fields.TextFieldType;
|
||||
import tech.ailef.dbadmin.external.dto.MappingError;
|
||||
import tech.ailef.dbadmin.external.exceptions.DbAdminException;
|
||||
import tech.ailef.dbadmin.external.exceptions.DbAdminNotFoundException;
|
||||
import tech.ailef.dbadmin.external.exceptions.UnsupportedFieldTypeException;
|
||||
import tech.ailef.dbadmin.external.misc.Utils;
|
||||
import tech.ailef.snapadmin.external.annotations.Disable;
|
||||
import tech.ailef.snapadmin.external.annotations.DisplayFormat;
|
||||
import tech.ailef.snapadmin.external.dbmapping.CustomJpaRepository;
|
||||
import tech.ailef.snapadmin.external.dbmapping.DbObjectSchema;
|
||||
import tech.ailef.snapadmin.external.dbmapping.fields.DbField;
|
||||
import tech.ailef.snapadmin.external.dbmapping.fields.DbFieldType;
|
||||
import tech.ailef.snapadmin.external.dbmapping.fields.EnumFieldType;
|
||||
import tech.ailef.snapadmin.external.dbmapping.fields.StringFieldType;
|
||||
import tech.ailef.snapadmin.external.dbmapping.fields.TextFieldType;
|
||||
import tech.ailef.snapadmin.external.dto.MappingError;
|
||||
import tech.ailef.snapadmin.external.exceptions.DbAdminException;
|
||||
import tech.ailef.snapadmin.external.exceptions.DbAdminNotFoundException;
|
||||
import tech.ailef.snapadmin.external.exceptions.UnsupportedFieldTypeException;
|
||||
import tech.ailef.snapadmin.external.misc.Utils;
|
||||
|
||||
/**
|
||||
* The main DbAdmin class responsible for the initialization phase. This class scans
|
||||
@ -74,8 +74,8 @@ import tech.ailef.dbadmin.external.misc.Utils;
|
||||
* to determine the field type.
|
||||
*/
|
||||
@Component
|
||||
public class DbAdmin {
|
||||
private static final Logger logger = LoggerFactory.getLogger(DbAdmin.class.getName());
|
||||
public class SnapAdmin {
|
||||
private static final Logger logger = LoggerFactory.getLogger(SnapAdmin.class.getName());
|
||||
|
||||
private EntityManager entityManager;
|
||||
|
||||
@ -83,9 +83,9 @@ public class DbAdmin {
|
||||
|
||||
private List<String> modelsPackage;
|
||||
|
||||
private DbAdminProperties properties;
|
||||
private SnapAdminProperties properties;
|
||||
|
||||
private static final String VERSION = "0.1.8";
|
||||
private static final String VERSION = "0.1.9";
|
||||
|
||||
/**
|
||||
* Builds the DbAdmin instance by scanning the `@Entity` beans and loading
|
||||
@ -93,7 +93,7 @@ public class DbAdmin {
|
||||
* @param entityManager the entity manager
|
||||
* @param properties the configuration properties
|
||||
*/
|
||||
public DbAdmin(@Autowired EntityManager entityManager, @Autowired DbAdminProperties properties) {
|
||||
public SnapAdmin(@Autowired EntityManager entityManager, @Autowired SnapAdminProperties properties) {
|
||||
this.modelsPackage = Arrays.stream(properties.getModelsPackage().split(",")).map(String::trim).toList();
|
||||
this.entityManager = entityManager;
|
||||
this.properties = properties;
|
@ -16,7 +16,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package tech.ailef.dbadmin.external;
|
||||
package tech.ailef.snapadmin.external;
|
||||
|
||||
import java.util.Properties;
|
||||
|
||||
@ -38,7 +38,7 @@ import org.springframework.transaction.PlatformTransactionManager;
|
||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
import org.springframework.transaction.support.TransactionTemplate;
|
||||
|
||||
import tech.ailef.dbadmin.internal.InternalDbAdminConfiguration;
|
||||
import tech.ailef.snapadmin.internal.InternalDbAdminConfiguration;
|
||||
|
||||
/**
|
||||
* The configuration class for "internal" data source. This is not the
|
||||
@ -48,7 +48,7 @@ import tech.ailef.dbadmin.internal.InternalDbAdminConfiguration;
|
||||
*/
|
||||
@ConditionalOnProperty(name = "dbadmin.enabled", matchIfMissing = true)
|
||||
@ComponentScan
|
||||
@EnableConfigurationProperties(DbAdminProperties.class)
|
||||
@EnableConfigurationProperties(SnapAdminProperties.class)
|
||||
@Configuration
|
||||
@EnableJpaRepositories(
|
||||
entityManagerFactoryRef = "internalEntityManagerFactory",
|
||||
@ -56,9 +56,9 @@ import tech.ailef.dbadmin.internal.InternalDbAdminConfiguration;
|
||||
)
|
||||
@EnableTransactionManagement
|
||||
@Import(InternalDbAdminConfiguration.class)
|
||||
public class DbAdminAutoConfiguration {
|
||||
public class SnapAdminAutoConfiguration {
|
||||
@Autowired
|
||||
private DbAdminProperties props;
|
||||
private SnapAdminProperties props;
|
||||
|
||||
/**
|
||||
* Builds and returns the internal data source.
|
@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external;
|
||||
package tech.ailef.snapadmin.external;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@ -28,9 +28,9 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
@Configuration
|
||||
@EnableWebMvc
|
||||
public class MvcConfig implements WebMvcConfigurer {
|
||||
public class SnapAdminMvcConfig implements WebMvcConfigurer {
|
||||
@Autowired
|
||||
private DbAdminProperties properties;
|
||||
private SnapAdminProperties properties;
|
||||
|
||||
@Override
|
||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external;
|
||||
package tech.ailef.snapadmin.external;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
|
||||
@ -26,7 +26,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
* to configure the behaviour of Spring Boot Admin Panel.
|
||||
*/
|
||||
@ConfigurationProperties("dbadmin")
|
||||
public class DbAdminProperties {
|
||||
public class SnapAdminProperties {
|
||||
/**
|
||||
* Whether Spring Boot Database Admin is enabled.
|
||||
*/
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.annotations;
|
||||
package tech.ailef.snapadmin.external.annotations;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.annotations;
|
||||
package tech.ailef.snapadmin.external.annotations;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.annotations;
|
||||
package tech.ailef.snapadmin.external.annotations;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.annotations;
|
||||
package tech.ailef.snapadmin.external.annotations;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.annotations;
|
||||
package tech.ailef.snapadmin.external.annotations;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.annotations;
|
||||
package tech.ailef.snapadmin.external.annotations;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.annotations;
|
||||
package tech.ailef.snapadmin.external.annotations;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.annotations;
|
||||
package tech.ailef.snapadmin.external.annotations;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.annotations;
|
||||
package tech.ailef.snapadmin.external.annotations;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.annotations;
|
||||
package tech.ailef.snapadmin.external.annotations;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.annotations;
|
||||
package tech.ailef.snapadmin.external.annotations;
|
||||
|
||||
/**
|
||||
* Type of filters that can be used in the faceted search.
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.annotations;
|
||||
package tech.ailef.snapadmin.external.annotations;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.annotations;
|
||||
package tech.ailef.snapadmin.external.annotations;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
@ -19,4 +19,4 @@
|
||||
/**
|
||||
* Annotations defined to allow user customization
|
||||
*/
|
||||
package tech.ailef.dbadmin.external.annotations;
|
||||
package tech.ailef.snapadmin.external.annotations;
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.controller;
|
||||
package tech.ailef.snapadmin.external.controller;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
@ -54,21 +54,21 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
import tech.ailef.dbadmin.external.DbAdmin;
|
||||
import tech.ailef.dbadmin.external.dbmapping.DbAdminRepository;
|
||||
import tech.ailef.dbadmin.external.dbmapping.DbFieldValue;
|
||||
import tech.ailef.dbadmin.external.dbmapping.DbObject;
|
||||
import tech.ailef.dbadmin.external.dbmapping.DbObjectSchema;
|
||||
import tech.ailef.dbadmin.external.dbmapping.fields.DbField;
|
||||
import tech.ailef.dbadmin.external.dbmapping.query.DbQueryResult;
|
||||
import tech.ailef.dbadmin.external.dbmapping.query.DbQueryResultRow;
|
||||
import tech.ailef.dbadmin.external.dto.DataExportFormat;
|
||||
import tech.ailef.dbadmin.external.dto.QueryFilter;
|
||||
import tech.ailef.dbadmin.external.exceptions.DbAdminException;
|
||||
import tech.ailef.dbadmin.external.exceptions.DbAdminNotFoundException;
|
||||
import tech.ailef.dbadmin.external.misc.Utils;
|
||||
import tech.ailef.dbadmin.internal.model.ConsoleQuery;
|
||||
import tech.ailef.dbadmin.internal.repository.ConsoleQueryRepository;
|
||||
import tech.ailef.snapadmin.external.SnapAdmin;
|
||||
import tech.ailef.snapadmin.external.dbmapping.DbAdminRepository;
|
||||
import tech.ailef.snapadmin.external.dbmapping.DbFieldValue;
|
||||
import tech.ailef.snapadmin.external.dbmapping.DbObject;
|
||||
import tech.ailef.snapadmin.external.dbmapping.DbObjectSchema;
|
||||
import tech.ailef.snapadmin.external.dbmapping.fields.DbField;
|
||||
import tech.ailef.snapadmin.external.dbmapping.query.DbQueryResult;
|
||||
import tech.ailef.snapadmin.external.dbmapping.query.DbQueryResultRow;
|
||||
import tech.ailef.snapadmin.external.dto.DataExportFormat;
|
||||
import tech.ailef.snapadmin.external.dto.QueryFilter;
|
||||
import tech.ailef.snapadmin.external.exceptions.DbAdminException;
|
||||
import tech.ailef.snapadmin.external.exceptions.DbAdminNotFoundException;
|
||||
import tech.ailef.snapadmin.external.misc.Utils;
|
||||
import tech.ailef.snapadmin.internal.model.ConsoleQuery;
|
||||
import tech.ailef.snapadmin.internal.repository.ConsoleQueryRepository;
|
||||
|
||||
@Controller
|
||||
@RequestMapping(value = { "/${dbadmin.baseUrl}/", "/${dbadmin.baseUrl}" })
|
||||
@ -76,7 +76,7 @@ public class DataExportController {
|
||||
private static final Logger logger = LoggerFactory.getLogger(DataExportFormat.class);
|
||||
|
||||
@Autowired
|
||||
private DbAdmin dbAdmin;
|
||||
private SnapAdmin dbAdmin;
|
||||
|
||||
@Autowired
|
||||
private DbAdminRepository repository;
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.controller;
|
||||
package tech.ailef.snapadmin.external.controller;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.time.LocalDateTime;
|
||||
@ -54,30 +54,30 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.ConstraintViolationException;
|
||||
import tech.ailef.dbadmin.external.DbAdmin;
|
||||
import tech.ailef.dbadmin.external.DbAdminProperties;
|
||||
import tech.ailef.dbadmin.external.dbmapping.DbAdminRepository;
|
||||
import tech.ailef.dbadmin.external.dbmapping.DbObject;
|
||||
import tech.ailef.dbadmin.external.dbmapping.DbObjectSchema;
|
||||
import tech.ailef.dbadmin.external.dbmapping.query.DbQueryResult;
|
||||
import tech.ailef.dbadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.dbadmin.external.dto.FacetedSearchRequest;
|
||||
import tech.ailef.dbadmin.external.dto.LogsSearchRequest;
|
||||
import tech.ailef.dbadmin.external.dto.PaginatedResult;
|
||||
import tech.ailef.dbadmin.external.dto.PaginationInfo;
|
||||
import tech.ailef.dbadmin.external.dto.QueryFilter;
|
||||
import tech.ailef.dbadmin.external.dto.ValidationErrorsContainer;
|
||||
import tech.ailef.dbadmin.external.exceptions.DbAdminException;
|
||||
import tech.ailef.dbadmin.external.exceptions.DbAdminNotFoundException;
|
||||
import tech.ailef.dbadmin.external.exceptions.InvalidPageException;
|
||||
import tech.ailef.dbadmin.external.misc.Utils;
|
||||
import tech.ailef.dbadmin.internal.model.ConsoleQuery;
|
||||
import tech.ailef.dbadmin.internal.model.UserAction;
|
||||
import tech.ailef.dbadmin.internal.model.UserSetting;
|
||||
import tech.ailef.dbadmin.internal.repository.ConsoleQueryRepository;
|
||||
import tech.ailef.dbadmin.internal.service.ConsoleQueryService;
|
||||
import tech.ailef.dbadmin.internal.service.UserActionService;
|
||||
import tech.ailef.dbadmin.internal.service.UserSettingsService;
|
||||
import tech.ailef.snapadmin.external.SnapAdmin;
|
||||
import tech.ailef.snapadmin.external.SnapAdminProperties;
|
||||
import tech.ailef.snapadmin.external.dbmapping.DbAdminRepository;
|
||||
import tech.ailef.snapadmin.external.dbmapping.DbObject;
|
||||
import tech.ailef.snapadmin.external.dbmapping.DbObjectSchema;
|
||||
import tech.ailef.snapadmin.external.dbmapping.query.DbQueryResult;
|
||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.snapadmin.external.dto.FacetedSearchRequest;
|
||||
import tech.ailef.snapadmin.external.dto.LogsSearchRequest;
|
||||
import tech.ailef.snapadmin.external.dto.PaginatedResult;
|
||||
import tech.ailef.snapadmin.external.dto.PaginationInfo;
|
||||
import tech.ailef.snapadmin.external.dto.QueryFilter;
|
||||
import tech.ailef.snapadmin.external.dto.ValidationErrorsContainer;
|
||||
import tech.ailef.snapadmin.external.exceptions.DbAdminException;
|
||||
import tech.ailef.snapadmin.external.exceptions.DbAdminNotFoundException;
|
||||
import tech.ailef.snapadmin.external.exceptions.InvalidPageException;
|
||||
import tech.ailef.snapadmin.external.misc.Utils;
|
||||
import tech.ailef.snapadmin.internal.model.ConsoleQuery;
|
||||
import tech.ailef.snapadmin.internal.model.UserAction;
|
||||
import tech.ailef.snapadmin.internal.model.UserSetting;
|
||||
import tech.ailef.snapadmin.internal.repository.ConsoleQueryRepository;
|
||||
import tech.ailef.snapadmin.internal.service.ConsoleQueryService;
|
||||
import tech.ailef.snapadmin.internal.service.UserActionService;
|
||||
import tech.ailef.snapadmin.internal.service.UserSettingsService;
|
||||
|
||||
/**
|
||||
* The main DbAdmin controller that register most of the routes of the web interface.
|
||||
@ -88,13 +88,13 @@ public class DefaultDbAdminController {
|
||||
private static final Logger logger = LoggerFactory.getLogger(DefaultDbAdminController.class);
|
||||
|
||||
@Autowired
|
||||
private DbAdminProperties properties;
|
||||
private SnapAdminProperties properties;
|
||||
|
||||
@Autowired
|
||||
private DbAdminRepository repository;
|
||||
|
||||
@Autowired
|
||||
private DbAdmin dbAdmin;
|
||||
private SnapAdmin dbAdmin;
|
||||
|
||||
@Autowired
|
||||
private UserActionService userActionService;
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.controller;
|
||||
package tech.ailef.snapadmin.external.controller;
|
||||
|
||||
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.server.ResponseStatusException;
|
||||
|
||||
import tech.ailef.dbadmin.external.DbAdmin;
|
||||
import tech.ailef.dbadmin.external.dbmapping.DbAdminRepository;
|
||||
import tech.ailef.dbadmin.external.dbmapping.DbFieldValue;
|
||||
import tech.ailef.dbadmin.external.dbmapping.DbObject;
|
||||
import tech.ailef.dbadmin.external.dbmapping.DbObjectSchema;
|
||||
import tech.ailef.dbadmin.external.exceptions.DbAdminException;
|
||||
import tech.ailef.snapadmin.external.SnapAdmin;
|
||||
import tech.ailef.snapadmin.external.dbmapping.DbAdminRepository;
|
||||
import tech.ailef.snapadmin.external.dbmapping.DbFieldValue;
|
||||
import tech.ailef.snapadmin.external.dbmapping.DbObject;
|
||||
import tech.ailef.snapadmin.external.dbmapping.DbObjectSchema;
|
||||
import tech.ailef.snapadmin.external.exceptions.DbAdminException;
|
||||
|
||||
/**
|
||||
* Controller to serve file or images (`@DisplayImage`)
|
||||
@ -53,7 +53,7 @@ public class FileDownloadController {
|
||||
private DbAdminRepository repository;
|
||||
|
||||
@Autowired
|
||||
private DbAdmin dbAdmin;
|
||||
private SnapAdmin dbAdmin;
|
||||
|
||||
|
||||
/**
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.controller;
|
||||
package tech.ailef.snapadmin.external.controller;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ -29,11 +29,11 @@ import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import tech.ailef.dbadmin.external.DbAdmin;
|
||||
import tech.ailef.dbadmin.external.DbAdminProperties;
|
||||
import tech.ailef.dbadmin.external.exceptions.DbAdminException;
|
||||
import tech.ailef.dbadmin.external.exceptions.DbAdminNotFoundException;
|
||||
import tech.ailef.dbadmin.internal.UserConfiguration;
|
||||
import tech.ailef.snapadmin.external.SnapAdmin;
|
||||
import tech.ailef.snapadmin.external.SnapAdminProperties;
|
||||
import tech.ailef.snapadmin.external.exceptions.DbAdminException;
|
||||
import tech.ailef.snapadmin.external.exceptions.DbAdminNotFoundException;
|
||||
import tech.ailef.snapadmin.internal.UserConfiguration;
|
||||
|
||||
/**
|
||||
* This class registers some global ModelAttributes and exception handlers.
|
||||
@ -43,13 +43,13 @@ import tech.ailef.dbadmin.internal.UserConfiguration;
|
||||
public class GlobalController {
|
||||
|
||||
@Autowired
|
||||
private DbAdminProperties props;
|
||||
private SnapAdminProperties props;
|
||||
|
||||
@Autowired
|
||||
private UserConfiguration userConf;
|
||||
|
||||
@Autowired
|
||||
private DbAdmin dbAdmin;
|
||||
private SnapAdmin dbAdmin;
|
||||
|
||||
@ExceptionHandler(DbAdminException.class)
|
||||
public String handleException(Exception e, Model model, HttpServletResponse response) {
|
||||
@ -122,7 +122,7 @@ public class GlobalController {
|
||||
}
|
||||
|
||||
@ModelAttribute("dbadmin_properties")
|
||||
public DbAdminProperties getProps() {
|
||||
public SnapAdminProperties getProps() {
|
||||
return props;
|
||||
}
|
||||
|
@ -20,4 +20,4 @@
|
||||
/**
|
||||
* Controllers registered for the web UI
|
||||
*/
|
||||
package tech.ailef.dbadmin.external.controller;
|
||||
package tech.ailef.snapadmin.external.controller;
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.controller.rest;
|
||||
package tech.ailef.snapadmin.external.controller.rest;
|
||||
|
||||
import java.util.List;
|
||||
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.RestController;
|
||||
|
||||
import tech.ailef.dbadmin.external.DbAdmin;
|
||||
import tech.ailef.dbadmin.external.dbmapping.DbAdminRepository;
|
||||
import tech.ailef.dbadmin.external.dbmapping.DbObjectSchema;
|
||||
import tech.ailef.dbadmin.external.dto.AutocompleteSearchResult;
|
||||
import tech.ailef.snapadmin.external.SnapAdmin;
|
||||
import tech.ailef.snapadmin.external.dbmapping.DbAdminRepository;
|
||||
import tech.ailef.snapadmin.external.dbmapping.DbObjectSchema;
|
||||
import tech.ailef.snapadmin.external.dto.AutocompleteSearchResult;
|
||||
|
||||
/**
|
||||
* API controller for autocomplete results
|
||||
@ -42,7 +42,7 @@ import tech.ailef.dbadmin.external.dto.AutocompleteSearchResult;
|
||||
@RequestMapping(value= {"/${dbadmin.baseUrl}/api/autocomplete", "/${dbadmin.baseUrl}/api/autocomplete/"})
|
||||
public class AutocompleteController {
|
||||
@Autowired
|
||||
private DbAdmin dbAdmin;
|
||||
private SnapAdmin dbAdmin;
|
||||
|
||||
@Autowired
|
||||
private DbAdminRepository repository;
|
4
src/main/java/tech/ailef/snapadmin/external/controller/rest/package-info.java
vendored
Normal file
4
src/main/java/tech/ailef/snapadmin/external/controller/rest/package-info.java
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/**
|
||||
* Rest controllers
|
||||
*/
|
||||
package tech.ailef.snapadmin.external.controller.rest;
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.dbmapping;
|
||||
package tech.ailef.snapadmin.external.dbmapping;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.time.LocalDate;
|
||||
@ -40,12 +40,12 @@ import jakarta.persistence.criteria.CriteriaUpdate;
|
||||
import jakarta.persistence.criteria.Path;
|
||||
import jakarta.persistence.criteria.Predicate;
|
||||
import jakarta.persistence.criteria.Root;
|
||||
import tech.ailef.dbadmin.external.dbmapping.fields.DbField;
|
||||
import tech.ailef.dbadmin.external.dbmapping.fields.StringFieldType;
|
||||
import tech.ailef.dbadmin.external.dbmapping.fields.TextFieldType;
|
||||
import tech.ailef.dbadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.dbadmin.external.dto.QueryFilter;
|
||||
import tech.ailef.dbadmin.external.exceptions.DbAdminException;
|
||||
import tech.ailef.snapadmin.external.dbmapping.fields.DbField;
|
||||
import tech.ailef.snapadmin.external.dbmapping.fields.StringFieldType;
|
||||
import tech.ailef.snapadmin.external.dbmapping.fields.TextFieldType;
|
||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.snapadmin.external.dto.QueryFilter;
|
||||
import tech.ailef.snapadmin.external.exceptions.DbAdminException;
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public class CustomJpaRepository extends SimpleJpaRepository {
|
@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.dbmapping;
|
||||
package tech.ailef.snapadmin.external.dbmapping;
|
||||
|
||||
import java.sql.ResultSetMetaData;
|
||||
import java.util.ArrayList;
|
||||
@ -44,18 +44,18 @@ import jakarta.validation.ConstraintViolation;
|
||||
import jakarta.validation.ConstraintViolationException;
|
||||
import jakarta.validation.Validation;
|
||||
import jakarta.validation.Validator;
|
||||
import tech.ailef.dbadmin.external.DbAdmin;
|
||||
import tech.ailef.dbadmin.external.annotations.ReadOnly;
|
||||
import tech.ailef.dbadmin.external.dbmapping.fields.DbField;
|
||||
import tech.ailef.dbadmin.external.dbmapping.query.DbQueryOutputField;
|
||||
import tech.ailef.dbadmin.external.dbmapping.query.DbQueryResult;
|
||||
import tech.ailef.dbadmin.external.dbmapping.query.DbQueryResultRow;
|
||||
import tech.ailef.dbadmin.external.dto.FacetedSearchRequest;
|
||||
import tech.ailef.dbadmin.external.dto.PaginatedResult;
|
||||
import tech.ailef.dbadmin.external.dto.PaginationInfo;
|
||||
import tech.ailef.dbadmin.external.dto.QueryFilter;
|
||||
import tech.ailef.dbadmin.external.exceptions.DbAdminException;
|
||||
import tech.ailef.dbadmin.external.exceptions.InvalidPageException;
|
||||
import tech.ailef.snapadmin.external.SnapAdmin;
|
||||
import tech.ailef.snapadmin.external.annotations.ReadOnly;
|
||||
import tech.ailef.snapadmin.external.dbmapping.fields.DbField;
|
||||
import tech.ailef.snapadmin.external.dbmapping.query.DbQueryOutputField;
|
||||
import tech.ailef.snapadmin.external.dbmapping.query.DbQueryResult;
|
||||
import tech.ailef.snapadmin.external.dbmapping.query.DbQueryResultRow;
|
||||
import tech.ailef.snapadmin.external.dto.FacetedSearchRequest;
|
||||
import tech.ailef.snapadmin.external.dto.PaginatedResult;
|
||||
import tech.ailef.snapadmin.external.dto.PaginationInfo;
|
||||
import tech.ailef.snapadmin.external.dto.QueryFilter;
|
||||
import tech.ailef.snapadmin.external.exceptions.DbAdminException;
|
||||
import tech.ailef.snapadmin.external.exceptions.InvalidPageException;
|
||||
|
||||
/**
|
||||
* Implements the basic CRUD operations (and some more)
|
||||
@ -66,7 +66,7 @@ public class DbAdminRepository {
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Autowired
|
||||
private DbAdmin dbAdmin;
|
||||
private SnapAdmin dbAdmin;
|
||||
|
||||
public DbAdminRepository() {
|
||||
}
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.dbmapping;
|
||||
package tech.ailef.snapadmin.external.dbmapping;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDateTime;
|
||||
@ -27,7 +27,7 @@ import java.util.Objects;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
|
||||
import tech.ailef.dbadmin.external.dbmapping.fields.DbField;
|
||||
import tech.ailef.snapadmin.external.dbmapping.fields.DbField;
|
||||
|
||||
/**
|
||||
* Wrapper for the value of a field
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.dbmapping;
|
||||
package tech.ailef.snapadmin.external.dbmapping;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
@ -32,10 +32,10 @@ import jakarta.persistence.ManyToMany;
|
||||
import jakarta.persistence.ManyToOne;
|
||||
import jakarta.persistence.OneToMany;
|
||||
import jakarta.persistence.OneToOne;
|
||||
import tech.ailef.dbadmin.external.annotations.DisplayName;
|
||||
import tech.ailef.dbadmin.external.dbmapping.fields.BooleanFieldType;
|
||||
import tech.ailef.dbadmin.external.dbmapping.fields.DbField;
|
||||
import tech.ailef.dbadmin.external.exceptions.DbAdminException;
|
||||
import tech.ailef.snapadmin.external.annotations.DisplayName;
|
||||
import tech.ailef.snapadmin.external.dbmapping.fields.BooleanFieldType;
|
||||
import tech.ailef.snapadmin.external.dbmapping.fields.DbField;
|
||||
import tech.ailef.snapadmin.external.exceptions.DbAdminException;
|
||||
|
||||
/**
|
||||
* Wrapper for all objects retrieved from the database.
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.dbmapping;
|
||||
package tech.ailef.snapadmin.external.dbmapping;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
@ -39,17 +39,17 @@ import jakarta.persistence.ManyToMany;
|
||||
import jakarta.persistence.OneToMany;
|
||||
import jakarta.persistence.OneToOne;
|
||||
import jakarta.persistence.Table;
|
||||
import tech.ailef.dbadmin.external.DbAdmin;
|
||||
import tech.ailef.dbadmin.external.annotations.ComputedColumn;
|
||||
import tech.ailef.dbadmin.external.annotations.DisableCreate;
|
||||
import tech.ailef.dbadmin.external.annotations.DisableDelete;
|
||||
import tech.ailef.dbadmin.external.annotations.DisableEdit;
|
||||
import tech.ailef.dbadmin.external.annotations.DisableExport;
|
||||
import tech.ailef.dbadmin.external.annotations.HiddenColumn;
|
||||
import tech.ailef.dbadmin.external.dbmapping.fields.DbField;
|
||||
import tech.ailef.dbadmin.external.dto.MappingError;
|
||||
import tech.ailef.dbadmin.external.exceptions.DbAdminException;
|
||||
import tech.ailef.dbadmin.external.misc.Utils;
|
||||
import tech.ailef.snapadmin.external.SnapAdmin;
|
||||
import tech.ailef.snapadmin.external.annotations.ComputedColumn;
|
||||
import tech.ailef.snapadmin.external.annotations.DisableCreate;
|
||||
import tech.ailef.snapadmin.external.annotations.DisableDelete;
|
||||
import tech.ailef.snapadmin.external.annotations.DisableEdit;
|
||||
import tech.ailef.snapadmin.external.annotations.DisableExport;
|
||||
import tech.ailef.snapadmin.external.annotations.HiddenColumn;
|
||||
import tech.ailef.snapadmin.external.dbmapping.fields.DbField;
|
||||
import tech.ailef.snapadmin.external.dto.MappingError;
|
||||
import tech.ailef.snapadmin.external.exceptions.DbAdminException;
|
||||
import tech.ailef.snapadmin.external.misc.Utils;
|
||||
|
||||
/**
|
||||
* A class that represents a table/`@Entity` as reconstructed from the
|
||||
@ -75,7 +75,7 @@ public class DbObjectSchema {
|
||||
*/
|
||||
private CustomJpaRepository jpaRepository;
|
||||
|
||||
private DbAdmin dbAdmin;
|
||||
private SnapAdmin dbAdmin;
|
||||
|
||||
/**
|
||||
* The corresponding `@Entity` class that this schema describes
|
||||
@ -97,7 +97,7 @@ public class DbObjectSchema {
|
||||
* @param klass the `@Entity` class
|
||||
* @param dbAdmin the DbAdmin instance
|
||||
*/
|
||||
public DbObjectSchema(Class<?> klass, DbAdmin dbAdmin) {
|
||||
public DbObjectSchema(Class<?> klass, SnapAdmin dbAdmin) {
|
||||
this.dbAdmin = dbAdmin;
|
||||
this.entityClass = klass;
|
||||
|
||||
@ -134,7 +134,7 @@ public class DbObjectSchema {
|
||||
* Returns the DbAdmin instance
|
||||
* @return the DbAdmin instance
|
||||
*/
|
||||
public DbAdmin getDbAdmin() {
|
||||
public SnapAdmin getDbAdmin() {
|
||||
return dbAdmin;
|
||||
}
|
||||
|
@ -16,12 +16,12 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package tech.ailef.dbadmin.external.dbmapping.fields;
|
||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
import tech.ailef.dbadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
||||
|
||||
public class BigDecimalFieldType extends DbFieldType {
|
||||
@Override
|
@ -16,12 +16,12 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package tech.ailef.dbadmin.external.dbmapping.fields;
|
||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.List;
|
||||
|
||||
import tech.ailef.dbadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
||||
|
||||
public class BigIntegerFieldType extends DbFieldType {
|
||||
@Override
|
@ -16,11 +16,11 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package tech.ailef.dbadmin.external.dbmapping.fields;
|
||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import tech.ailef.dbadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
||||
|
||||
public class BooleanFieldType extends DbFieldType {
|
||||
@Override
|
@ -16,15 +16,15 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package tech.ailef.dbadmin.external.dbmapping.fields;
|
||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import tech.ailef.dbadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.dbadmin.external.exceptions.DbAdminException;
|
||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.snapadmin.external.exceptions.DbAdminException;
|
||||
|
||||
public class ByteArrayFieldType extends DbFieldType {
|
||||
@Override
|
@ -16,12 +16,12 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package tech.ailef.dbadmin.external.dbmapping.fields;
|
||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import tech.ailef.dbadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.dbadmin.external.exceptions.DbAdminException;
|
||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.snapadmin.external.exceptions.DbAdminException;
|
||||
|
||||
public class ByteFieldType extends DbFieldType {
|
||||
@Override
|
@ -17,11 +17,11 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.dbmapping.fields;
|
||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import tech.ailef.dbadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
||||
|
||||
public class CharFieldType extends DbFieldType {
|
||||
@Override
|
@ -16,12 +16,12 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package tech.ailef.dbadmin.external.dbmapping.fields;
|
||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import tech.ailef.dbadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.dbadmin.external.exceptions.DbAdminException;
|
||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.snapadmin.external.exceptions.DbAdminException;
|
||||
|
||||
public class ComputedFieldType extends DbFieldType {
|
||||
@Override
|
@ -16,15 +16,15 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package tech.ailef.dbadmin.external.dbmapping.fields;
|
||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
||||
|
||||
import java.sql.Date;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeParseException;
|
||||
import java.util.List;
|
||||
|
||||
import tech.ailef.dbadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.dbadmin.external.exceptions.DbAdminException;
|
||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.snapadmin.external.exceptions.DbAdminException;
|
||||
|
||||
public class DateFieldType extends DbFieldType {
|
||||
@Override
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.dbmapping.fields;
|
||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.List;
|
||||
@ -32,13 +32,13 @@ import jakarta.persistence.ManyToMany;
|
||||
import jakarta.persistence.ManyToOne;
|
||||
import jakarta.persistence.OneToMany;
|
||||
import jakarta.persistence.OneToOne;
|
||||
import tech.ailef.dbadmin.external.annotations.DisplayImage;
|
||||
import tech.ailef.dbadmin.external.annotations.Filterable;
|
||||
import tech.ailef.dbadmin.external.annotations.FilterableType;
|
||||
import tech.ailef.dbadmin.external.annotations.ReadOnly;
|
||||
import tech.ailef.dbadmin.external.dbmapping.DbFieldValue;
|
||||
import tech.ailef.dbadmin.external.dbmapping.DbObject;
|
||||
import tech.ailef.dbadmin.external.dbmapping.DbObjectSchema;
|
||||
import tech.ailef.snapadmin.external.annotations.DisplayImage;
|
||||
import tech.ailef.snapadmin.external.annotations.Filterable;
|
||||
import tech.ailef.snapadmin.external.annotations.FilterableType;
|
||||
import tech.ailef.snapadmin.external.annotations.ReadOnly;
|
||||
import tech.ailef.snapadmin.external.dbmapping.DbFieldValue;
|
||||
import tech.ailef.snapadmin.external.dbmapping.DbObject;
|
||||
import tech.ailef.snapadmin.external.dbmapping.DbObjectSchema;
|
||||
|
||||
/**
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
package tech.ailef.dbadmin.external.dbmapping.fields;
|
||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
@ -27,9 +27,9 @@ import java.time.LocalDateTime;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import tech.ailef.dbadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.dbadmin.external.exceptions.UnsupportedFieldTypeException;
|
||||
import tech.ailef.dbadmin.external.misc.Utils;
|
||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.snapadmin.external.exceptions.UnsupportedFieldTypeException;
|
||||
import tech.ailef.snapadmin.external.misc.Utils;
|
||||
|
||||
public abstract class DbFieldType {
|
||||
|
@ -16,11 +16,11 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package tech.ailef.dbadmin.external.dbmapping.fields;
|
||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import tech.ailef.dbadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
||||
|
||||
public class DoubleFieldType extends DbFieldType {
|
||||
@Override
|
@ -16,7 +16,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package tech.ailef.dbadmin.external.dbmapping.fields;
|
||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
@ -25,8 +25,8 @@ import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import jakarta.persistence.EnumType;
|
||||
import tech.ailef.dbadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.dbadmin.external.exceptions.DbAdminException;
|
||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.snapadmin.external.exceptions.DbAdminException;
|
||||
|
||||
public class EnumFieldType extends DbFieldType {
|
||||
|
@ -16,11 +16,11 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package tech.ailef.dbadmin.external.dbmapping.fields;
|
||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import tech.ailef.dbadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
||||
|
||||
public class FloatFieldType extends DbFieldType {
|
||||
@Override
|
@ -16,14 +16,14 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package tech.ailef.dbadmin.external.dbmapping.fields;
|
||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneOffset;
|
||||
import java.util.List;
|
||||
|
||||
import tech.ailef.dbadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
||||
|
||||
public class InstantFieldType extends DbFieldType {
|
||||
@Override
|
@ -16,11 +16,11 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package tech.ailef.dbadmin.external.dbmapping.fields;
|
||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import tech.ailef.dbadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
||||
|
||||
public class IntegerFieldType extends DbFieldType {
|
||||
@Override
|
@ -16,12 +16,12 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package tech.ailef.dbadmin.external.dbmapping.fields;
|
||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
import tech.ailef.dbadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
||||
|
||||
public class LocalDateFieldType extends DbFieldType {
|
||||
@Override
|
@ -16,12 +16,12 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package tech.ailef.dbadmin.external.dbmapping.fields;
|
||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import tech.ailef.dbadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
||||
|
||||
public class LocalDateTimeFieldType extends DbFieldType {
|
||||
@Override
|
@ -16,11 +16,11 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package tech.ailef.dbadmin.external.dbmapping.fields;
|
||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import tech.ailef.dbadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
||||
|
||||
public class LongFieldType extends DbFieldType {
|
||||
@Override
|
@ -16,13 +16,13 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package tech.ailef.dbadmin.external.dbmapping.fields;
|
||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import jakarta.persistence.ManyToMany;
|
||||
import tech.ailef.dbadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.dbadmin.external.exceptions.DbAdminException;
|
||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.snapadmin.external.exceptions.DbAdminException;
|
||||
|
||||
public class ManyToManyFieldType extends DbFieldType {
|
||||
@Override
|
@ -16,12 +16,12 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package tech.ailef.dbadmin.external.dbmapping.fields;
|
||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
||||
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import tech.ailef.dbadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
||||
|
||||
public class OffsetDateTimeFieldType extends DbFieldType {
|
||||
@Override
|
@ -16,13 +16,13 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package tech.ailef.dbadmin.external.dbmapping.fields;
|
||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import jakarta.persistence.OneToMany;
|
||||
import tech.ailef.dbadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.dbadmin.external.exceptions.DbAdminException;
|
||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.snapadmin.external.exceptions.DbAdminException;
|
||||
|
||||
public class OneToManyFieldType extends DbFieldType {
|
||||
@Override
|
@ -16,13 +16,13 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package tech.ailef.dbadmin.external.dbmapping.fields;
|
||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import jakarta.persistence.OneToOne;
|
||||
import tech.ailef.dbadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.dbadmin.external.exceptions.DbAdminException;
|
||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.snapadmin.external.exceptions.DbAdminException;
|
||||
|
||||
public class OneToOneFieldType extends DbFieldType {
|
||||
@Override
|
@ -16,11 +16,11 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package tech.ailef.dbadmin.external.dbmapping.fields;
|
||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import tech.ailef.dbadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
||||
|
||||
public class ShortFieldType extends DbFieldType {
|
||||
@Override
|
@ -16,11 +16,11 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package tech.ailef.dbadmin.external.dbmapping.fields;
|
||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import tech.ailef.dbadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
||||
|
||||
public class StringFieldType extends DbFieldType {
|
||||
@Override
|
@ -16,11 +16,11 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package tech.ailef.dbadmin.external.dbmapping.fields;
|
||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import tech.ailef.dbadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
||||
|
||||
public class TextFieldType extends DbFieldType {
|
||||
@Override
|
@ -16,11 +16,11 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package tech.ailef.dbadmin.external.dbmapping.fields;
|
||||
package tech.ailef.snapadmin.external.dbmapping.fields;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import tech.ailef.dbadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
||||
|
||||
public class UUIDFieldType extends DbFieldType {
|
||||
@Override
|
@ -20,4 +20,4 @@
|
||||
/**
|
||||
* Representation of the user database and repository classes.
|
||||
*/
|
||||
package tech.ailef.dbadmin.external.dbmapping;
|
||||
package tech.ailef.snapadmin.external.dbmapping;
|
@ -18,17 +18,17 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.dbmapping.query;
|
||||
package tech.ailef.snapadmin.external.dbmapping.query;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.Objects;
|
||||
|
||||
import tech.ailef.dbadmin.external.DbAdmin;
|
||||
import tech.ailef.dbadmin.external.dbmapping.DbObjectSchema;
|
||||
import tech.ailef.dbadmin.external.dbmapping.fields.DbField;
|
||||
import tech.ailef.dbadmin.external.dbmapping.fields.DbFieldType;
|
||||
import tech.ailef.dbadmin.external.exceptions.DbAdminException;
|
||||
import tech.ailef.dbadmin.external.exceptions.UnsupportedFieldTypeException;
|
||||
import tech.ailef.snapadmin.external.SnapAdmin;
|
||||
import tech.ailef.snapadmin.external.dbmapping.DbObjectSchema;
|
||||
import tech.ailef.snapadmin.external.dbmapping.fields.DbField;
|
||||
import tech.ailef.snapadmin.external.dbmapping.fields.DbFieldType;
|
||||
import tech.ailef.snapadmin.external.exceptions.DbAdminException;
|
||||
import tech.ailef.snapadmin.external.exceptions.UnsupportedFieldTypeException;
|
||||
|
||||
public class DbQueryOutputField {
|
||||
private String name;
|
||||
@ -39,7 +39,7 @@ public class DbQueryOutputField {
|
||||
|
||||
private DbQueryResultRow result;
|
||||
|
||||
public DbQueryOutputField(String name, String table, DbAdmin dbAdmin) {
|
||||
public DbQueryOutputField(String name, String table, SnapAdmin dbAdmin) {
|
||||
this.name = name;
|
||||
this.table = table;
|
||||
|
@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.dbmapping.query;
|
||||
package tech.ailef.snapadmin.external.dbmapping.query;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
@ -18,13 +18,13 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.dbmapping.query;
|
||||
package tech.ailef.snapadmin.external.dbmapping.query;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import tech.ailef.dbadmin.external.exceptions.DbAdminException;
|
||||
import tech.ailef.snapadmin.external.exceptions.DbAdminException;
|
||||
|
||||
public class DbQueryResultRow {
|
||||
private Map<DbQueryOutputField, Object> values;
|
@ -17,10 +17,10 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.dto;
|
||||
package tech.ailef.snapadmin.external.dto;
|
||||
|
||||
import tech.ailef.dbadmin.external.controller.rest.AutocompleteController;
|
||||
import tech.ailef.dbadmin.external.dbmapping.DbObject;
|
||||
import tech.ailef.snapadmin.external.controller.rest.AutocompleteController;
|
||||
import tech.ailef.snapadmin.external.dbmapping.DbObject;
|
||||
|
||||
/**
|
||||
* An object to hold autocomplete results returned from the {@linkplain AutocompleteController}.
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.dto;
|
||||
package tech.ailef.snapadmin.external.dto;
|
||||
|
||||
/**
|
||||
* A list of operators that are used in faceted search.
|
@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.dto;
|
||||
package tech.ailef.snapadmin.external.dto;
|
||||
|
||||
public enum DataExportFormat {
|
||||
CSV,
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.dto;
|
||||
package tech.ailef.snapadmin.external.dto;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Set;
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.dto;
|
||||
package tech.ailef.snapadmin.external.dto;
|
||||
|
||||
import org.springframework.util.LinkedMultiValueMap;
|
||||
import org.springframework.util.MultiValueMap;
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.dto;
|
||||
package tech.ailef.snapadmin.external.dto;
|
||||
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.domain.Sort;
|
@ -16,7 +16,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package tech.ailef.dbadmin.external.dto;
|
||||
package tech.ailef.snapadmin.external.dto;
|
||||
|
||||
/**
|
||||
* A wrapper class for information about mapping errors, i.e. errors that happen
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.dto;
|
||||
package tech.ailef.snapadmin.external.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.dto;
|
||||
package tech.ailef.snapadmin.external.dto;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@ -26,7 +26,7 @@ import java.util.stream.IntStream;
|
||||
|
||||
import org.springframework.util.MultiValueMap;
|
||||
|
||||
import tech.ailef.dbadmin.external.misc.Utils;
|
||||
import tech.ailef.snapadmin.external.misc.Utils;
|
||||
|
||||
/**
|
||||
* Attached as output to requests that have a paginated response,
|
@ -17,12 +17,12 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.dto;
|
||||
package tech.ailef.snapadmin.external.dto;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import tech.ailef.dbadmin.external.dbmapping.fields.DbField;
|
||||
import tech.ailef.dbadmin.external.exceptions.DbAdminException;
|
||||
import tech.ailef.snapadmin.external.dbmapping.fields.DbField;
|
||||
import tech.ailef.snapadmin.external.exceptions.DbAdminException;
|
||||
|
||||
/**
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
package tech.ailef.dbadmin.external.dto;
|
||||
package tech.ailef.snapadmin.external.dto;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
@ -20,4 +20,4 @@
|
||||
/**
|
||||
* Data objects used in primarily in requests and responses
|
||||
*/
|
||||
package tech.ailef.dbadmin.external.dto;
|
||||
package tech.ailef.snapadmin.external.dto;
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.exceptions;
|
||||
package tech.ailef.snapadmin.external.exceptions;
|
||||
|
||||
/**
|
||||
* Generic top-level exception for everything thrown by us
|
@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.exceptions;
|
||||
package tech.ailef.snapadmin.external.exceptions;
|
||||
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.web.server.ResponseStatusException;
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.exceptions;
|
||||
package tech.ailef.snapadmin.external.exceptions;
|
||||
|
||||
/**
|
||||
* Thrown during the computation of pagination if the requested
|
@ -16,7 +16,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package tech.ailef.dbadmin.external.exceptions;
|
||||
package tech.ailef.snapadmin.external.exceptions;
|
||||
|
||||
/**
|
||||
* Thrown when a field of an `@Entity` class has a type that is not
|
@ -20,4 +20,4 @@
|
||||
/**
|
||||
* Exception classes
|
||||
*/
|
||||
package tech.ailef.dbadmin.external.exceptions;
|
||||
package tech.ailef.snapadmin.external.exceptions;
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.external.misc;
|
||||
package tech.ailef.snapadmin.external.misc;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
@ -26,11 +26,11 @@ import java.util.Set;
|
||||
|
||||
import org.springframework.util.MultiValueMap;
|
||||
|
||||
import tech.ailef.dbadmin.external.dbmapping.DbObjectSchema;
|
||||
import tech.ailef.dbadmin.external.dbmapping.fields.DbField;
|
||||
import tech.ailef.dbadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.dbadmin.external.dto.QueryFilter;
|
||||
import tech.ailef.dbadmin.external.exceptions.DbAdminException;
|
||||
import tech.ailef.snapadmin.external.dbmapping.DbObjectSchema;
|
||||
import tech.ailef.snapadmin.external.dbmapping.fields.DbField;
|
||||
import tech.ailef.snapadmin.external.dto.CompareOperator;
|
||||
import tech.ailef.snapadmin.external.dto.QueryFilter;
|
||||
import tech.ailef.snapadmin.external.exceptions.DbAdminException;
|
||||
|
||||
/**
|
||||
* Collection of utility functions used across the project
|
@ -21,4 +21,4 @@
|
||||
* Miscellaneous utility classes.
|
||||
*/
|
||||
|
||||
package tech.ailef.dbadmin.external.misc;
|
||||
package tech.ailef.snapadmin.external.misc;
|
@ -20,6 +20,6 @@
|
||||
* Root package of Spring Boot Database Admin.
|
||||
*
|
||||
* It contains the configuration class which handles the initialization
|
||||
* and the main {@link tech.ailef.dbadmin.external.DbAdmin} class.
|
||||
* and the main {@link tech.ailef.snapadmin.external.SnapAdmin} class.
|
||||
*/
|
||||
package tech.ailef.dbadmin.external;
|
||||
package tech.ailef.snapadmin.external;
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.internal;
|
||||
package tech.ailef.snapadmin.internal;
|
||||
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.internal;
|
||||
package tech.ailef.snapadmin.internal;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@ -26,8 +26,8 @@ import java.util.Optional;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import tech.ailef.dbadmin.internal.model.UserSetting;
|
||||
import tech.ailef.dbadmin.internal.repository.UserSettingsRepository;
|
||||
import tech.ailef.snapadmin.internal.model.UserSetting;
|
||||
import tech.ailef.snapadmin.internal.repository.UserSettingsRepository;
|
||||
|
||||
/**
|
||||
* Wrapper class for the UserSettingsRepository that provides a better
|
@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.internal.model;
|
||||
package tech.ailef.snapadmin.internal.model;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.internal.model;
|
||||
package tech.ailef.snapadmin.internal.model;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.internal.model;
|
||||
package tech.ailef.snapadmin.internal.model;
|
||||
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Id;
|
@ -20,4 +20,4 @@
|
||||
/**
|
||||
* Entity classes for the internal data source (action logs and user settings).
|
||||
*/
|
||||
package tech.ailef.dbadmin.internal.model;
|
||||
package tech.ailef.snapadmin.internal.model;
|
@ -23,7 +23,7 @@
|
||||
* 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
|
||||
* respective {@link tech.ailef.dbadmin.internal.InternalDbAdminConfiguration} in order to
|
||||
* respective {@link tech.ailef.snapadmin.internal.InternalDbAdminConfiguration} in order to
|
||||
* have the component scanning only pick the correct entities/repositories.
|
||||
*/
|
||||
package tech.ailef.dbadmin.internal;
|
||||
package tech.ailef.snapadmin.internal;
|
@ -17,12 +17,12 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.internal.repository;
|
||||
package tech.ailef.snapadmin.internal.repository;
|
||||
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import tech.ailef.dbadmin.internal.model.ConsoleQuery;
|
||||
import tech.ailef.snapadmin.internal.model.ConsoleQuery;
|
||||
|
||||
@Repository
|
||||
public interface ConsoleQueryRepository extends JpaRepository<ConsoleQuery, String>, CustomActionRepository {
|
@ -17,12 +17,12 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.internal.repository;
|
||||
package tech.ailef.snapadmin.internal.repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import tech.ailef.dbadmin.external.dto.LogsSearchRequest;
|
||||
import tech.ailef.dbadmin.internal.model.UserAction;
|
||||
import tech.ailef.snapadmin.external.dto.LogsSearchRequest;
|
||||
import tech.ailef.snapadmin.internal.model.UserAction;
|
||||
|
||||
public interface CustomActionRepository {
|
||||
public List<UserAction> findActions(LogsSearchRequest r);
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.internal.repository;
|
||||
package tech.ailef.snapadmin.internal.repository;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@ -31,8 +31,8 @@ import jakarta.persistence.criteria.CriteriaBuilder;
|
||||
import jakarta.persistence.criteria.CriteriaQuery;
|
||||
import jakarta.persistence.criteria.Predicate;
|
||||
import jakarta.persistence.criteria.Root;
|
||||
import tech.ailef.dbadmin.external.dto.LogsSearchRequest;
|
||||
import tech.ailef.dbadmin.internal.model.UserAction;
|
||||
import tech.ailef.snapadmin.external.dto.LogsSearchRequest;
|
||||
import tech.ailef.snapadmin.internal.model.UserAction;
|
||||
|
||||
/**
|
||||
* A repository that provides custom queries for UserActions
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.internal.repository;
|
||||
package tech.ailef.snapadmin.internal.repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -25,7 +25,7 @@ import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import tech.ailef.dbadmin.internal.model.UserAction;
|
||||
import tech.ailef.snapadmin.internal.model.UserAction;
|
||||
|
||||
@Repository
|
||||
public interface UserActionRepository extends JpaRepository<UserAction, Integer>, CustomActionRepository {
|
@ -17,12 +17,12 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.internal.repository;
|
||||
package tech.ailef.snapadmin.internal.repository;
|
||||
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import tech.ailef.dbadmin.internal.model.UserSetting;
|
||||
import tech.ailef.snapadmin.internal.model.UserSetting;
|
||||
|
||||
@Repository
|
||||
public interface UserSettingsRepository extends JpaRepository<UserSetting, String> {
|
@ -19,4 +19,4 @@
|
||||
/**
|
||||
* Repositories for the internal data source.
|
||||
*/
|
||||
package tech.ailef.dbadmin.internal.repository;
|
||||
package tech.ailef.snapadmin.internal.repository;
|
@ -16,14 +16,14 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package tech.ailef.dbadmin.internal.service;
|
||||
package tech.ailef.snapadmin.internal.service;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.support.TransactionTemplate;
|
||||
|
||||
import tech.ailef.dbadmin.internal.model.ConsoleQuery;
|
||||
import tech.ailef.dbadmin.internal.repository.ConsoleQueryRepository;
|
||||
import tech.ailef.snapadmin.internal.model.ConsoleQuery;
|
||||
import tech.ailef.snapadmin.internal.repository.ConsoleQueryRepository;
|
||||
|
||||
@Service
|
||||
public class ConsoleQueryService {
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
|
||||
package tech.ailef.dbadmin.internal.service;
|
||||
package tech.ailef.snapadmin.internal.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -26,12 +26,12 @@ import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.support.TransactionTemplate;
|
||||
|
||||
import tech.ailef.dbadmin.external.dto.LogsSearchRequest;
|
||||
import tech.ailef.dbadmin.external.dto.PaginatedResult;
|
||||
import tech.ailef.dbadmin.external.dto.PaginationInfo;
|
||||
import tech.ailef.dbadmin.internal.model.UserAction;
|
||||
import tech.ailef.dbadmin.internal.repository.CustomActionRepositoryImpl;
|
||||
import tech.ailef.dbadmin.internal.repository.UserActionRepository;
|
||||
import tech.ailef.snapadmin.external.dto.LogsSearchRequest;
|
||||
import tech.ailef.snapadmin.external.dto.PaginatedResult;
|
||||
import tech.ailef.snapadmin.external.dto.PaginationInfo;
|
||||
import tech.ailef.snapadmin.internal.model.UserAction;
|
||||
import tech.ailef.snapadmin.internal.repository.CustomActionRepositoryImpl;
|
||||
import tech.ailef.snapadmin.internal.repository.UserActionRepository;
|
||||
|
||||
/**
|
||||
* Service class to retrieve user actions through the {@link CustomActionRepositoryImpl}.
|
@ -16,14 +16,14 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package tech.ailef.dbadmin.internal.service;
|
||||
package tech.ailef.snapadmin.internal.service;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.support.TransactionTemplate;
|
||||
|
||||
import tech.ailef.dbadmin.internal.model.UserSetting;
|
||||
import tech.ailef.dbadmin.internal.repository.UserSettingsRepository;
|
||||
import tech.ailef.snapadmin.internal.model.UserSetting;
|
||||
import tech.ailef.snapadmin.internal.repository.UserSettingsRepository;
|
||||
|
||||
@Service
|
||||
public class UserSettingsService {
|
@ -19,4 +19,4 @@
|
||||
/**
|
||||
* Service classes for the internal data source.
|
||||
*/
|
||||
package tech.ailef.dbadmin.internal.service;
|
||||
package tech.ailef.snapadmin.internal.service;
|
@ -1 +1 @@
|
||||
restart.include.dbadmin:/spring-boot-db-admin-[\\w-\\.]+\.jar
|
||||
restart.include.snap-admin:/snap-admin-[\\w-\\.]+\.jar
|
||||
|
Loading…
x
Reference in New Issue
Block a user