TSK-1888: Restructure method order of ConfigurationService, UserService

New ordering follows CRUD principles for better readability.
This commit is contained in:
Yakup Ensar Evli 2022-05-11 12:45:01 +02:00 committed by Mustapha Zorgati
parent e69273bc5c
commit f6ce6439cc
2 changed files with 21 additions and 21 deletions

View File

@ -6,6 +6,14 @@ import java.util.Optional;
/** The Configuration Service manages all custom configuration options. */
public interface ConfigurationService {
/**
* Retrieve a specific value from all custom attributes.
*
* @param attribute the attribute key
* @return the attribute value or nothing if the attribute does not exist
*/
Optional<Object> getValue(String attribute);
/**
* Retrieve all custom attributes from the database.
*
@ -19,12 +27,4 @@ public interface ConfigurationService {
* @param customAttributes the new custom attributes which should be persisted
*/
void setAllCustomAttributes(Map<String, ?> customAttributes);
/**
* Retrieve a specific value from all custom attributes.
*
* @param attribute the attribute key
* @return the attribute value or nothing if the attribute does not exist
*/
Optional<Object> getValue(String attribute);
}

View File

@ -19,19 +19,6 @@ public interface UserService {
*/
User newUser();
/**
* Gets a {@linkplain User}.
*
* <p>If a {@linkplain User} with the specified {@linkplain User#getId() id} is existing in the
* database, it is returned.
*
* @param id the {@linkplain User#getId() id} of the {@linkplain User} to be retrieved
* @return the retrieved {@linkplain User}
* @throws UserNotFoundException if there does not exist a {@linkplain User} with the specified
* {@linkplain User#getId() id} inside the database
*/
User getUser(String id) throws UserNotFoundException;
/**
* Creates a new {@linkplain User}.
*
@ -60,6 +47,19 @@ public interface UserService {
User createUser(User userToCreate)
throws InvalidArgumentException, NotAuthorizedException, UserAlreadyExistException;
/**
* Gets a {@linkplain User}.
*
* <p>If a {@linkplain User} with the specified {@linkplain User#getId() id} is existing in the
* database, it is returned.
*
* @param id the {@linkplain User#getId() id} of the {@linkplain User} to be retrieved
* @return the retrieved {@linkplain User}
* @throws UserNotFoundException if there does not exist a {@linkplain User} with the specified
* {@linkplain User#getId() id} inside the database
*/
User getUser(String id) throws UserNotFoundException;
/**
* Updates an existing {@linkplain User}.
*