TSK-1888: Restructure method order of ConfigurationService, UserService
New ordering follows CRUD principles for better readability.
This commit is contained in:
parent
e69273bc5c
commit
f6ce6439cc
|
|
@ -6,6 +6,14 @@ import java.util.Optional;
|
||||||
/** The Configuration Service manages all custom configuration options. */
|
/** The Configuration Service manages all custom configuration options. */
|
||||||
public interface ConfigurationService {
|
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.
|
* Retrieve all custom attributes from the database.
|
||||||
*
|
*
|
||||||
|
|
@ -19,12 +27,4 @@ public interface ConfigurationService {
|
||||||
* @param customAttributes the new custom attributes which should be persisted
|
* @param customAttributes the new custom attributes which should be persisted
|
||||||
*/
|
*/
|
||||||
void setAllCustomAttributes(Map<String, ?> customAttributes);
|
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);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,19 +19,6 @@ public interface UserService {
|
||||||
*/
|
*/
|
||||||
User newUser();
|
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}.
|
* Creates a new {@linkplain User}.
|
||||||
*
|
*
|
||||||
|
|
@ -60,6 +47,19 @@ public interface UserService {
|
||||||
User createUser(User userToCreate)
|
User createUser(User userToCreate)
|
||||||
throws InvalidArgumentException, NotAuthorizedException, UserAlreadyExistException;
|
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}.
|
* Updates an existing {@linkplain User}.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue