Fix and polish category CRUD.

This commit is contained in:
Florian THIERRY
2024-03-12 17:55:20 +01:00
parent 94180e8efc
commit a3295636b4
9 changed files with 118 additions and 11 deletions

View File

@@ -0,0 +1,11 @@
package org.codiki.domain.category.exception;
import java.util.UUID;
import org.codiki.domain.exception.FunctionnalException;
public class CategoryDeletionException extends FunctionnalException {
public CategoryDeletionException(UUID categoryId, String cause) {
super(String.format("Impossible to delete category with id %s. Cause: %s.", categoryId, cause));
}
}

View File

@@ -12,4 +12,10 @@ public interface CategoryPort {
void save(Category category);
List<Category> findAllByIds(List<UUID> subCategoryIds);
boolean existsAnyAssociatedPublication(UUID categoryId);
void deleteById(UUID categoryId);
boolean existsById(UUID categoryId);
}