1
|
package vldc.aswi.service;
|
2
|
|
3
|
|
4
|
import vldc.aswi.domain.Configuration;
|
5
|
|
6
|
import java.util.List;
|
7
|
|
8
|
/**
|
9
|
* Interface for Configuration manager.
|
10
|
*/
|
11
|
public interface ConfigurationManager {
|
12
|
|
13
|
/**
|
14
|
* Get all configurations from database.
|
15
|
* @return List of configurations.
|
16
|
*/
|
17
|
List<Configuration> getConfigurations();
|
18
|
|
19
|
/**
|
20
|
* Gets configuration according to its ID
|
21
|
* @param id ID of configuration
|
22
|
* @return configuration by ID
|
23
|
*/
|
24
|
Configuration getConfigurationById(Long id);
|
25
|
|
26
|
/**
|
27
|
* Saves configuration and its contents into database
|
28
|
* @param newConfiguration configuration to save
|
29
|
* @param id id of configuration, if not empty configuration is updated
|
30
|
* @return saved configuration
|
31
|
*/
|
32
|
Configuration saveConfiguration(Configuration newConfiguration, String id);
|
33
|
}
|