Revize 16f39a50
Přidáno uživatelem Václav Hrabík před více než 1 rok
src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/dials/ConfigurationControllerStatusCodes.java | ||
---|---|---|
7 | 7 |
public enum ConfigurationControllerStatusCodes { |
8 | 8 |
|
9 | 9 |
EMPTY_CONFIGURATION_DEFINITION("No configuration definition provided",400), |
10 |
EMPTY_CONFIGURATION_NAME("No configuration name provided",400), |
|
10 | 11 |
|
11 | 12 |
INSERT_FAILED("Failed to save configuration",500), |
12 | 13 |
|
src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/configuration/ConfigurationServiceImplementation.java | ||
---|---|---|
60 | 60 |
if (configuration == null) { |
61 | 61 |
return ConfigurationControllerStatusCodes.EMPTY_CONFIGURATION_DEFINITION; |
62 | 62 |
} |
63 |
|
|
64 |
if (cfg.getConfigurationName() == null || cfg.getConfigurationName().equals("")) { |
|
65 |
return ConfigurationControllerStatusCodes.EMPTY_CONFIGURATION_NAME; |
|
66 |
} |
|
67 |
|
|
63 | 68 |
User user = cfg.getUser(); |
64 | 69 |
String userName = user.getName(); |
65 | 70 |
//fetch the user from db because user in UserConfiguration does not contain id |
Také k dispozici: Unified diff
https://kivprogrammers.atlassian.net/browse/TSP2-30 kontrolo validace dat