From e0df21450df1ba539fbc0b30ff66c72e360127c9 Mon Sep 17 00:00:00 2001 From: Piotr Czarnas Date: Mon, 30 Sep 2024 20:46:36 +0200 Subject: [PATCH] Move check delete classes to the services package. --- .../jobs/data/DeleteStoredDataQueueJob.java | 2 +- .../checks/services/ChecksDeleteService.java | 17 ---------- .../check/delete/ChecksDeleteService.java | 33 +++++++++++++++++++ .../delete}/ChecksDeleteServiceImpl.java | 18 +++++++++- 4 files changed, 51 insertions(+), 19 deletions(-) delete mode 100644 dqops/src/main/java/com/dqops/data/checks/services/ChecksDeleteService.java create mode 100644 dqops/src/main/java/com/dqops/services/check/delete/ChecksDeleteService.java rename dqops/src/main/java/com/dqops/{data/checks/services => services/check/delete}/ChecksDeleteServiceImpl.java (80%) diff --git a/dqops/src/main/java/com/dqops/core/jobqueue/jobs/data/DeleteStoredDataQueueJob.java b/dqops/src/main/java/com/dqops/core/jobqueue/jobs/data/DeleteStoredDataQueueJob.java index dc3f502c49..397c2fb290 100644 --- a/dqops/src/main/java/com/dqops/core/jobqueue/jobs/data/DeleteStoredDataQueueJob.java +++ b/dqops/src/main/java/com/dqops/core/jobqueue/jobs/data/DeleteStoredDataQueueJob.java @@ -28,7 +28,7 @@ import com.dqops.core.principal.UserDomainIdentity; import com.dqops.data.checkresults.models.CheckResultsFragmentFilter; import com.dqops.data.checkresults.services.CheckResultsDeleteService; -import com.dqops.data.checks.services.ChecksDeleteService; +import com.dqops.services.check.delete.ChecksDeleteService; import com.dqops.data.errors.models.ErrorsFragmentFilter; import com.dqops.data.errors.services.ErrorsDeleteService; import com.dqops.data.errorsamples.models.ErrorsSamplesFragmentFilter; diff --git a/dqops/src/main/java/com/dqops/data/checks/services/ChecksDeleteService.java b/dqops/src/main/java/com/dqops/data/checks/services/ChecksDeleteService.java deleted file mode 100644 index a2770be862..0000000000 --- a/dqops/src/main/java/com/dqops/data/checks/services/ChecksDeleteService.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.dqops.data.checks.services; - -import com.dqops.core.principal.UserDomainIdentity; -import com.dqops.metadata.search.CheckSearchFilters; - -/** - * Deleted selected configured checks from the matched hierarchy node. - */ -public interface ChecksDeleteService { - - /** - * Deletes selected checks that match the filters. - * @param filters CheckSearchFilters which matches will be deleted. - * @param userIdentity User identity - */ - void deleteSelectedChecks(CheckSearchFilters filters, UserDomainIdentity userIdentity); -} diff --git a/dqops/src/main/java/com/dqops/services/check/delete/ChecksDeleteService.java b/dqops/src/main/java/com/dqops/services/check/delete/ChecksDeleteService.java new file mode 100644 index 0000000000..bf9d024edd --- /dev/null +++ b/dqops/src/main/java/com/dqops/services/check/delete/ChecksDeleteService.java @@ -0,0 +1,33 @@ +/* + * Copyright © 2021 DQOps (support@dqops.com) + * + * 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 + * + * http://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. + */ + +package com.dqops.services.check.delete; + +import com.dqops.core.principal.UserDomainIdentity; +import com.dqops.metadata.search.CheckSearchFilters; + +/** + * Deleted selected configured checks from the matched hierarchy node. + */ +public interface ChecksDeleteService { + + /** + * Deletes selected checks that match the filters. + * @param filters CheckSearchFilters which matches will be deleted. + * @param userIdentity User identity + */ + void deleteSelectedChecks(CheckSearchFilters filters, UserDomainIdentity userIdentity); +} diff --git a/dqops/src/main/java/com/dqops/data/checks/services/ChecksDeleteServiceImpl.java b/dqops/src/main/java/com/dqops/services/check/delete/ChecksDeleteServiceImpl.java similarity index 80% rename from dqops/src/main/java/com/dqops/data/checks/services/ChecksDeleteServiceImpl.java rename to dqops/src/main/java/com/dqops/services/check/delete/ChecksDeleteServiceImpl.java index 5e1aedb7a9..da222b2960 100644 --- a/dqops/src/main/java/com/dqops/data/checks/services/ChecksDeleteServiceImpl.java +++ b/dqops/src/main/java/com/dqops/services/check/delete/ChecksDeleteServiceImpl.java @@ -1,4 +1,20 @@ -package com.dqops.data.checks.services; +/* + * Copyright © 2021 DQOps (support@dqops.com) + * + * 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 + * + * http://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. + */ + +package com.dqops.services.check.delete; import com.dqops.checks.AbstractCheckCategorySpec; import com.dqops.checks.AbstractCheckSpec;