mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-03-27 14:23:56 +00:00
refactored channel exception to have a unified interface to form the exception message
replaced getOne with findById in order to get optionals and handle those some places still have the general abstracto run time exception
This commit is contained in:
@@ -2,6 +2,8 @@ package dev.sheldan.abstracto.templating.service.management;
|
||||
|
||||
import dev.sheldan.abstracto.templating.model.database.Template;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* Provides methods to access the stored templates.
|
||||
*/
|
||||
@@ -9,9 +11,9 @@ public interface TemplateManagementService {
|
||||
/**
|
||||
* Retrieves the template identified by the key.
|
||||
* @param key They template key to search for
|
||||
* @return The {@link Template} identified by the key, if it exists.
|
||||
* @return An {@link Optional} containing the {@link Template} if it exists, and null otherwise
|
||||
*/
|
||||
Template getTemplateByKey(String key);
|
||||
Optional<Template> getTemplateByKey(String key);
|
||||
|
||||
/**
|
||||
* Checks whether or not the template exists in the database.
|
||||
|
||||
Reference in New Issue
Block a user