Fix and polish category CRUD.
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user