Commit 530c1dd1 authored by oleg.pahhomov's avatar oleg.pahhomov

SA0140-380 refactor admin services

parent c1733b90
......@@ -4,7 +4,7 @@ package ee.stat.dashboard.controller.admin;
import ee.stat.dashboard.controller.Response;
import ee.stat.dashboard.config.security.RoleString;
import ee.stat.dashboard.service.admin.DashboardAdminService;
import ee.stat.dashboard.service.admin.dto.DashboardAdminResponse;
import ee.stat.dashboard.service.admin.dashboard.dto.DashboardAdminResponse;
import ee.stat.dashboard.service.admin.dto.StatPage;
import lombok.AllArgsConstructor;
import org.apache.commons.lang3.StringUtils;
......
package ee.stat.dashboard.controller.admin;
import ee.stat.dashboard.service.admin.ExcelFileStorageService;
import ee.stat.dashboard.service.admin.dto.UploadFileResponse;
import ee.stat.dashboard.service.admin.widget.ExcelFileStorageService;
import ee.stat.dashboard.service.admin.widget.dto.UploadFileResponse;
import lombok.AllArgsConstructor;
import org.springframework.core.io.Resource;
import org.springframework.http.HttpHeaders;
......
......@@ -6,7 +6,7 @@ import ee.stat.dashboard.controller.publics.dto.Language;
import ee.stat.dashboard.model.widget.back.enums.GraphTypeEnum;
import ee.stat.dashboard.service.admin.WidgetAdminService;
import ee.stat.dashboard.service.admin.dto.StatPage;
import ee.stat.dashboard.service.admin.dto.WidgetAdminResponse;
import ee.stat.dashboard.service.admin.widget.dto.WidgetAdminResponse;
import ee.stat.dashboard.service.widget.widget.WidgetService;
import ee.stat.dashboard.service.widget.widget.dto.WidgetResponse;
import lombok.AllArgsConstructor;
......
......@@ -12,6 +12,7 @@ import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.util.Objects;
@Getter
@Setter
......@@ -29,4 +30,17 @@ public class GraphType {
private MapRule mapRule;
@Enumerated(EnumType.STRING)
private VerticalRule verticalRule;
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
GraphType graphType = (GraphType) o;
return Objects.equals(id, graphType.id);
}
@Override
public int hashCode() {
return Objects.hash(id);
}
}
......@@ -8,6 +8,7 @@ import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.util.Objects;
@Getter
@Setter
......@@ -27,4 +28,17 @@ public class WidgetDomain {
this.domain = domain;
this.dashboard = dashboard;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
WidgetDomain that = (WidgetDomain) o;
return Objects.equals(id, that.id);
}
@Override
public int hashCode() {
return Objects.hash(id);
}
}
package ee.stat.dashboard.service.admin;
import ee.stat.dashboard.model.dashboard.Dashboard;
import ee.stat.dashboard.model.dashboard.DashboardConnection;
import ee.stat.dashboard.model.dashboard.DashboardRegion;
import ee.stat.dashboard.model.dashboard.DashboardType;
import ee.stat.dashboard.model.widget.back.WidgetDomain;
import ee.stat.dashboard.repository.DashboardConnectionRepository;
import ee.stat.dashboard.repository.DashboardRegionRepository;
import ee.stat.dashboard.repository.DashboardRepository;
import ee.stat.dashboard.service.admin.dto.DashboardAdminResponse;
import ee.stat.dashboard.service.admin.dto.ElementAdminResponse;
import ee.stat.dashboard.service.admin.dashboard.DashboardAdminConverter;
import ee.stat.dashboard.service.admin.dashboard.DashboardDeleteService;
import ee.stat.dashboard.service.admin.dashboard.DashboardDomainService;
import ee.stat.dashboard.service.admin.dashboard.DashboardParentService;
import ee.stat.dashboard.service.admin.dashboard.DashboardRegionService;
import ee.stat.dashboard.service.admin.dashboard.DashboardValidator;
import ee.stat.dashboard.service.admin.dashboard.dto.DashboardAdminResponse;
import ee.stat.dashboard.service.admin.dto.StatPage;
import ee.stat.dashboard.service.widget.importer.WidgetImportUtil;
import lombok.AllArgsConstructor;
......@@ -23,13 +23,10 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
import static ee.stat.dashboard.service.admin.dto.DashboardValidationStrategy.SAVING;
import static ee.stat.dashboard.service.admin.dto.DashboardValidationStrategy.UPDATING;
import static ee.stat.dashboard.service.admin.dto.ValidationStrategy.SAVING;
import static ee.stat.dashboard.service.admin.dto.ValidationStrategy.UPDATING;
import static ee.stat.dashboard.util.ResponseUtil.badRequest;
import static org.apache.commons.collections4.CollectionUtils.isNotEmpty;
......@@ -40,12 +37,12 @@ public class DashboardAdminService {
private DomainAdminService domainAdminService;
private DashboardValidator dashboardValidator;
private DashboardAdminConverter dashboardAdminConverter;
private DashboardDeleteService dashboardDeleteService;
private DashboardDomainService dashboardDomainService;
private DashboardParentService dashboardParentService;
private DashboardRegionService dashboardRegionService;
private DashboardAdminConverter dashboardAdminConverter;
private DashboardRepository dashboardRepository;
private DashboardRegionRepository dashboardRegionRepository;
private DashboardConnectionRepository dashboardConnectionRepository;
public StatPage<DashboardAdminResponse> findAll(Integer page, Integer size, String name) {
PageRequest of = PageRequest.of(page, size, Sort.by(Sort.Direction.ASC, "nameEt"));
......@@ -81,9 +78,9 @@ public class DashboardAdminService {
Dashboard saved = dashboardRepository.save(dbDashboard);
dashboard.setId(saved.getId());
updateRegions(dashboard);
dashboardRegionService.updateRegions(dashboard);
dashboardDomainService.updateDomains(dashboard, SAVING);
updateParent(dashboard);
dashboardParentService.updateParent(dashboard);
return saved.getId();
}
......@@ -106,9 +103,9 @@ public class DashboardAdminService {
Dashboard saved = dashboardRepository.save(dbDashboard);
dashboard.setId(saved.getId());
updateRegions(dashboard);
dashboardRegionService.updateRegions(dashboard);
dashboardDomainService.updateDomains(dashboard, UPDATING);
updateParent(dashboard);
dashboardParentService.updateParent(dashboard);
return saved.getId();
}
......@@ -136,52 +133,6 @@ public class DashboardAdminService {
entity.setUpdatedAt(LocalDateTime.now());
}
private void updateParent(DashboardAdminResponse dashboard) {
List<DashboardConnection> existingConnections = dashboardConnectionRepository.findByToId(dashboard.getId());
Optional<DashboardConnection> connectionOp = existingConnection(existingConnections, dashboard);
if (connectionOp.isPresent()) {
return; //nothing to change
}
if (isNotEmpty(existingConnections)) {
dashboardConnectionRepository.deleteByToId(dashboard.getId());
}
if (dashboard.getParentId() != null) {
dashboardConnectionRepository.save(new DashboardConnection(dashboard.getParentId(), dashboard.getId()));
}
}
private Optional<DashboardConnection> existingConnection(List<DashboardConnection> existingConnections, DashboardAdminResponse dashboard) {
return existingConnections.stream()
.filter(c -> c.getFromId().equals(dashboard.getParentId()))
.filter(c -> c.getToId().equals(dashboard.getId()))
.findAny();
}
private void updateRegions(DashboardAdminResponse dashboard) {
if (dashboard.getType().isGlobal()) {
dashboardRegionRepository.deleteByDashboard(dashboard.getId());
} else {
List<DashboardRegion> existingDbRegions = dashboardRegionRepository.findAllByDashboard(dashboard.getId());
List<DashboardRegion> regions = new ArrayList<>();
for (ElementAdminResponse region : dashboard.getRegions()) {
regions.add(existingDbRegions.stream()
.filter(e -> e.getElement().equals(region.getId()))
.findAny()
.orElseGet(() -> new DashboardRegion(dashboard.getId(), region.getId())));
}
regions.removeAll(existingDbRegions);
dashboardRegionRepository.deleteAll(existingDbRegions);
List<DashboardRegion> newRegions = regions.stream().filter(r -> r.getId() == null).collect(Collectors.toList());
if (isNotEmpty(newRegions)) {
dashboardRegionRepository.saveAll(newRegions);
}
}
}
private Page<Dashboard> findAll(String name, PageRequest of) {
if (StringUtils.isNotBlank(name) && name.trim().length() >= 3) {
return dashboardRepository.findAllByNameEtIsLikeAndLevel("%" + name + "%", 0, of);
......
......@@ -6,8 +6,9 @@ import ee.stat.dashboard.model.dashboard.Dashboard;
import ee.stat.dashboard.model.widget.back.Widget;
import ee.stat.dashboard.repository.DomainRepository;
import ee.stat.dashboard.repository.WidgetRepository;
import ee.stat.dashboard.service.admin.dto.DomainAdminResponse;
import ee.stat.dashboard.service.admin.dto.WidgetAdminResponse;
import ee.stat.dashboard.service.admin.domain.DomainAdminConverter;
import ee.stat.dashboard.service.admin.domain.dto.DomainAdminResponse;
import ee.stat.dashboard.service.admin.widget.WidgetAdminConverter;
import lombok.AllArgsConstructor;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service;
......
......@@ -10,9 +10,17 @@ import ee.stat.dashboard.repository.ExcelRepository;
import ee.stat.dashboard.repository.GraphTypeRepository;
import ee.stat.dashboard.repository.StatDbRepository;
import ee.stat.dashboard.repository.WidgetRepository;
import ee.stat.dashboard.service.admin.dto.DashboardValidationStrategy;
import ee.stat.dashboard.service.admin.domain.DomainAdminConverter;
import ee.stat.dashboard.service.admin.dto.ValidationStrategy;
import ee.stat.dashboard.service.admin.dto.StatPage;
import ee.stat.dashboard.service.admin.dto.WidgetAdminResponse;
import ee.stat.dashboard.service.admin.widget.dto.WidgetAdminResponse;
import ee.stat.dashboard.service.admin.widget.ExcelAdminService;
import ee.stat.dashboard.service.admin.widget.GraphTypeAdminConverter;
import ee.stat.dashboard.service.admin.widget.GraphTypeAdminService;
import ee.stat.dashboard.service.admin.widget.StatDbAdminService;
import ee.stat.dashboard.service.admin.widget.WidgetAdminConverter;
import ee.stat.dashboard.service.admin.widget.WidgetDashboardService;
import ee.stat.dashboard.service.admin.widget.WidgetValidator;
import ee.stat.dashboard.service.widget.importer.WidgetImportUtil;
import lombok.AllArgsConstructor;
import org.springframework.data.domain.Page;
......@@ -46,6 +54,7 @@ public class WidgetAdminService {
private StatDbAdminService statDbAdminService;
private ExcelAdminService excelAdminService;
private GraphTypeAdminConverter graphTypeAdminConverter;
private GraphTypeAdminService graphTypeAdminService;
public StatPage<WidgetAdminResponse> findAll(Integer page, Integer size, String name) {
PageRequest of = PageRequest.of(page, size, Sort.by(Sort.Direction.ASC, "shortnameEt"));
......@@ -83,7 +92,7 @@ public class WidgetAdminService {
}
public Long save(WidgetAdminResponse widget) {
widgetValidator.validate(widget, DashboardValidationStrategy.SAVING);
widgetValidator.validate(widget, ValidationStrategy.SAVING);
widget.setCode(WidgetImportUtil.toCode(widget.getNameEn()));
Widget dbWidget = new Widget();
updateEntity(dbWidget, widget);
......@@ -95,11 +104,12 @@ public class WidgetAdminService {
widgetDashboardService.updateDashboards(widget);
statDbAdminService.updateStatDbs(widget);
excelAdminService.updateExcels(widget);
graphTypeAdminService.updateGraphTypes(widget);
return save.getId();
}
public Long update(Long widgetId, WidgetAdminResponse widget) {
widgetValidator.validate(widget, DashboardValidationStrategy.UPDATING);
widgetValidator.validate(widget, ValidationStrategy.UPDATING);
widget.setCode(WidgetImportUtil.toCode(widget.getNameEn()));
Widget dbWidget = widgetRepository.findById(widgetId).orElseThrow(badRequest(widgetId, "widget"));
updateEntity(dbWidget, widget);
......@@ -118,14 +128,6 @@ public class WidgetAdminService {
widgetRepository.delete(widget);
}
private Page<Widget> findAll(String name, PageRequest of) {
if (isNotBlank(name) && name.trim().length() >= 2) {
return widgetRepository.findAllByNameEtIsLike(name, of);
} else {
return widgetRepository.findAll(of);
}
}
private void updateEntity(Widget dbWidget, WidgetAdminResponse widget) {
dbWidget.setCode(widget.getCode());
dbWidget.setStatus(widget.getStatus());
......@@ -149,4 +151,12 @@ public class WidgetAdminService {
dbWidget.setStatisticianJobLinkEt(widget.getStatisticianJobLinkEt());
dbWidget.setStatisticianJobLinkEn(widget.getStatisticianJobLinkEn());
}
private Page<Widget> findAll(String name, PageRequest of) {
if (isNotBlank(name) && name.trim().length() >= 2) {
return widgetRepository.findAllByNameEtIsLike(name, of);
} else {
return widgetRepository.findAll(of);
}
}
}
\ No newline at end of file
package ee.stat.dashboard.service.admin;
package ee.stat.dashboard.service.admin.dashboard;
import ee.stat.dashboard.model.dashboard.Dashboard;
import ee.stat.dashboard.repository.DashboardRepository;
import ee.stat.dashboard.service.admin.dto.DashboardAdminResponse;
import ee.stat.dashboard.service.admin.dashboard.dto.DashboardAdminResponse;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
......@@ -14,6 +14,7 @@ import static org.apache.commons.collections4.CollectionUtils.isNotEmpty;
@Service
@AllArgsConstructor
public class DashboardAdminConverter {
private DashboardRepository dashboardRepository;
private ElementAdminService elementAdminService;
......
package ee.stat.dashboard.service.admin;
package ee.stat.dashboard.service.admin.dashboard;
import ee.stat.dashboard.model.classifier.Domain;
......
package ee.stat.dashboard.service.admin;
package ee.stat.dashboard.service.admin.dashboard;
import ee.stat.dashboard.model.classifier.Domain;
......@@ -7,10 +7,11 @@ import ee.stat.dashboard.model.widget.back.WidgetDomain;
import ee.stat.dashboard.repository.DomainConnectionRepository;
import ee.stat.dashboard.repository.DomainRepository;
import ee.stat.dashboard.repository.WidgetDomainRepository;
import ee.stat.dashboard.service.admin.dto.DashboardAdminResponse;
import ee.stat.dashboard.service.admin.dto.DashboardValidationStrategy;
import ee.stat.dashboard.service.admin.dto.DomainAdminResponse;
import ee.stat.dashboard.service.admin.dto.WidgetAdminResponse;
import ee.stat.dashboard.service.admin.domain.DomainValidator;
import ee.stat.dashboard.service.admin.dashboard.dto.DashboardAdminResponse;
import ee.stat.dashboard.service.admin.dto.ValidationStrategy;
import ee.stat.dashboard.service.admin.domain.dto.DomainAdminResponse;
import ee.stat.dashboard.service.admin.widget.dto.WidgetAdminResponse;
import ee.stat.dashboard.service.widget.importer.WidgetImportUtil;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
......@@ -42,7 +43,7 @@ public class DashboardDomainService {
private DashboardDeleteService dashboardDeleteService;
private DomainValidator domainValidator;
public void updateDomains(DashboardAdminResponse dashboard, DashboardValidationStrategy strategy) {
public void updateDomains(DashboardAdminResponse dashboard, ValidationStrategy strategy) {
if (strategy.isUpdating()) {
//todo optimize domain connections
domainConnectionRepository.deleteByDashboardId(dashboard.getId());
......
package ee.stat.dashboard.service.admin.dashboard;
import ee.stat.dashboard.model.dashboard.DashboardConnection;
import ee.stat.dashboard.repository.DashboardConnectionRepository;
import ee.stat.dashboard.service.admin.dashboard.dto.DashboardAdminResponse;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Optional;
import static org.apache.commons.collections4.CollectionUtils.isNotEmpty;
@Service
@AllArgsConstructor
@Transactional
public class DashboardParentService {
private DashboardConnectionRepository dashboardConnectionRepository;
public void updateParent(DashboardAdminResponse dashboard) {
List<DashboardConnection> existingConnections = dashboardConnectionRepository.findByToId(dashboard.getId());
Optional<DashboardConnection> connectionOp = existingConnection(existingConnections, dashboard);
if (connectionOp.isPresent()) {
return; //nothing to change
}
if (isNotEmpty(existingConnections)) {
dashboardConnectionRepository.deleteByToId(dashboard.getId());
}
if (dashboard.getParentId() != null) {
dashboardConnectionRepository.save(new DashboardConnection(dashboard.getParentId(), dashboard.getId()));
}
}
private Optional<DashboardConnection> existingConnection(List<DashboardConnection> existingConnections, DashboardAdminResponse dashboard) {
return existingConnections.stream()
.filter(c -> c.getFromId().equals(dashboard.getParentId()))
.filter(c -> c.getToId().equals(dashboard.getId()))
.findAny();
}
}
package ee.stat.dashboard.service.admin.dashboard;
import ee.stat.dashboard.model.dashboard.DashboardRegion;
import ee.stat.dashboard.repository.DashboardRegionRepository;
import ee.stat.dashboard.service.admin.dashboard.dto.DashboardAdminResponse;
import ee.stat.dashboard.service.admin.dashboard.dto.ElementAdminResponse;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import static org.apache.commons.collections4.CollectionUtils.isNotEmpty;
@Service
@AllArgsConstructor
@Transactional
public class DashboardRegionService {
private DashboardRegionRepository dashboardRegionRepository;
public void updateRegions(DashboardAdminResponse dashboard) {
if (dashboard.getType().isGlobal()) {
dashboardRegionRepository.deleteByDashboard(dashboard.getId());
} else {
List<DashboardRegion> existingDbRegions = dashboardRegionRepository.findAllByDashboard(dashboard.getId());
List<DashboardRegion> regions = new ArrayList<>();
for (ElementAdminResponse region : dashboard.getRegions()) {
regions.add(existingDbRegions.stream()
.filter(e -> e.getElement().equals(region.getId()))
.findAny()
.orElseGet(() -> new DashboardRegion(dashboard.getId(), region.getId())));
}
regions.removeAll(existingDbRegions);
dashboardRegionRepository.deleteAll(existingDbRegions);
List<DashboardRegion> newRegions = regions.stream().filter(r -> r.getId() == null).collect(Collectors.toList());
if (isNotEmpty(newRegions)) {
dashboardRegionRepository.saveAll(newRegions);
}
}
}
}
package ee.stat.dashboard.service.admin;
package ee.stat.dashboard.service.admin.dashboard;
import ee.stat.dashboard.model.classifier.ClassifierCode;
import ee.stat.dashboard.model.classifier.Element;
import ee.stat.dashboard.model.dashboard.Dashboard;
import ee.stat.dashboard.repository.DashboardRepository;
import ee.stat.dashboard.service.admin.dto.DashboardAdminResponse;
import ee.stat.dashboard.service.admin.dto.DashboardValidationStrategy;
import ee.stat.dashboard.service.admin.dto.ElementAdminResponse;
import ee.stat.dashboard.service.admin.dashboard.dto.DashboardAdminResponse;
import ee.stat.dashboard.service.admin.dto.ValidationStrategy;
import ee.stat.dashboard.service.admin.dashboard.dto.ElementAdminResponse;
import ee.stat.dashboard.service.element.ElementServiceCache;
import lombok.AllArgsConstructor;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service;
import java.util.List;
......@@ -28,7 +27,7 @@ public class DashboardValidator {
private DashboardRepository dashboardRepository;
private ElementServiceCache elementServiceCache;
public void validate(DashboardAdminResponse dashboard, DashboardValidationStrategy strategy) {
public void validate(DashboardAdminResponse dashboard, ValidationStrategy strategy) {
validateName(dashboard, strategy, dashboard.getNameEt(), "nameEt", dashboardRepository::findByNameEt);
validateName(dashboard, strategy, dashboard.getNameEn(), "nameEn", dashboardRepository::findByNameEn);
if (dashboard.getStatus() == null) {
......@@ -70,7 +69,7 @@ public class DashboardValidator {
}
}
private void validateName(DashboardAdminResponse dashboard, DashboardValidationStrategy strategy, String name, String fieldName, Function<String, List<Dashboard>> findByName) {
private void validateName(DashboardAdminResponse dashboard, ValidationStrategy strategy, String name, String fieldName, Function<String, List<Dashboard>> findByName) {
if (name == null) {
throw badRequest("dashboard", fieldName + " missingE").get();
} else {
......
package ee.stat.dashboard.service.admin;
package ee.stat.dashboard.service.admin.dashboard;
import ee.stat.dashboard.model.classifier.Element;
import ee.stat.dashboard.repository.ElementRepository;
import ee.stat.dashboard.service.admin.dto.ElementAdminResponse;
import ee.stat.dashboard.service.admin.dashboard.dto.ElementAdminResponse;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......
package ee.stat.dashboard.service.admin.dto;
package ee.stat.dashboard.service.admin.dashboard.dto;
import ee.stat.dashboard.model.dashboard.DashboardStatus;
import ee.stat.dashboard.model.dashboard.DashboardType;
import ee.stat.dashboard.service.admin.domain.dto.DomainAdminResponse;
import lombok.Getter;
import lombok.Setter;
......
package ee.stat.dashboard.service.admin.dto;
package ee.stat.dashboard.service.admin.dashboard.dto;
import lombok.Getter;
import lombok.Setter;
......
package ee.stat.dashboard.service.admin;
package ee.stat.dashboard.service.admin.domain;
import ee.stat.dashboard.model.classifier.Domain;
import ee.stat.dashboard.model.dashboard.Dashboard;
import ee.stat.dashboard.repository.DashboardRepository;
import ee.stat.dashboard.service.admin.dto.DomainAdminResponse;
import ee.stat.dashboard.service.admin.dashboard.DashboardAdminConverter;
import ee.stat.dashboard.service.admin.domain.dto.DomainAdminResponse;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
......
package ee.stat.dashboard.service.admin;
package ee.stat.dashboard.service.admin.domain;
import ee.stat.dashboard.service.admin.dto.DomainAdminResponse;
import ee.stat.dashboard.service.admin.domain.dto.DomainAdminResponse;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......
package ee.stat.dashboard.service.admin.dto;
package ee.stat.dashboard.service.admin.domain.dto;
import ee.stat.dashboard.service.admin.dashboard.dto.DashboardAdminResponse;
import ee.stat.dashboard.service.admin.widget.dto.WidgetAdminResponse;
import lombok.Getter;
import lombok.Setter;
......
package ee.stat.dashboard.service.admin.dto;
public enum DashboardValidationStrategy {
public enum ValidationStrategy {
SAVING, UPDATING;
public boolean isSaving() {
......
package ee.stat.dashboard.service.admin;
package ee.stat.dashboard.service.admin.widget;
import ee.stat.dashboard.model.widget.back.Excel;
import ee.stat.dashboard.model.widget.back.enums.ExcelType;
import ee.stat.dashboard.repository.ExcelRepository;
import ee.stat.dashboard.service.admin.dto.ExcelAdminDto;
import ee.stat.dashboard.service.admin.dto.WidgetAdminResponse;
import ee.stat.dashboard.service.admin.widget.dto.ExcelAdminDto;
import ee.stat.dashboard.service.admin.widget.dto.WidgetAdminResponse;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......
package ee.stat.dashboard.service.admin;
package ee.stat.dashboard.service.admin.widget;
import ee.stat.dashboard.config.props.ExcelConfiguration;
import lombok.AllArgsConstructor;
......
package ee.stat.dashboard.service.admin;
package ee.stat.dashboard.service.admin.widget;
import ee.stat.dashboard.model.widget.back.Filter;
import ee.stat.dashboard.model.widget.back.FilterValue;
import ee.stat.dashboard.model.widget.back.GraphType;
import ee.stat.dashboard.repository.FilterRepository;