Projekt

Obecné

Profil

Stáhnout (1.25 KB) Statistiky
| Větev: | Revize:
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

    
34
    /**
35
     * Delete single configuration by id.
36
     * @param id - ID of configuration.
37
     * @return True if deleting was successful, false if not.
38
     */
39
    boolean deleteConfiguration(Long id);
40

    
41
    /**
42
     * Delete all configurations by assembly id.
43
     * @param assemblyId - ID of assembly.
44
     * @return True if all configurations were successfully deleted, false if not.
45
     */
46
    boolean deleteConfigurations(Long assemblyId);
47
}
(3-3/16)