Skip to content

Commit 40ff465

Browse files
committed
before commenting audit logging.
1 parent 47c2402 commit 40ff465

12 files changed

Lines changed: 1834 additions & 1816 deletions

File tree

sormas-api/src/main/java/de/symeda/sormas/api/ConfigFacade.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,20 @@
2121
import java.util.stream.Collectors;
2222

2323
import javax.annotation.Nullable;
24+
import javax.ejb.Remote;
2425
import javax.validation.constraints.NotNull;
2526

26-
import de.symeda.sormas.api.externaljournal.PatientDiaryConfig;
27-
import de.symeda.sormas.api.externaljournal.SymptomJournalConfig;
28-
import de.symeda.sormas.api.sormastosormas.SormasToSormasConfig;
2927
import org.apache.commons.lang3.CharUtils;
3028
import org.apache.commons.lang3.StringUtils;
3129

30+
import de.symeda.sormas.api.externaljournal.PatientDiaryConfig;
31+
import de.symeda.sormas.api.externaljournal.SymptomJournalConfig;
3232
import de.symeda.sormas.api.geo.GeoLatLon;
3333
import de.symeda.sormas.api.i18n.I18nProperties;
34+
import de.symeda.sormas.api.sormastosormas.SormasToSormasConfig;
3435
import de.symeda.sormas.api.systemconfiguration.Config;
3536

37+
@Remote
3638
public interface ConfigFacade {
3739

3840
String SORMAS = "SORMAS";
@@ -125,7 +127,7 @@ default Set<String> getAllowedFileExtensions() {
125127

126128
@NotNull
127129
default String getSormasInstanceName() {
128-
return getAsBoolean(Config.CUSTOM_BRANDING) ? getAsStringOrThrow(Config.CUSTOM_BRANDING_NAME) : SORMAS;
130+
return isCustomBranding() ? getAsStringOrThrow(Config.CUSTOM_BRANDING_NAME) : SORMAS;
129131
}
130132

131133
@NotNull
@@ -179,7 +181,7 @@ default String getGeneratedFilesPath() {
179181
return getAsStringOrNull(Config.GENERATED_FILES_PATH);
180182
}
181183

182-
@Nullable
184+
@NotNull
183185
default String getCustomFilesPath() {
184186
return getAsStringOrNull(Config.CUSTOM_FILES_PATH);
185187
}

sormas-api/src/main/java/de/symeda/sormas/api/systemconfiguration/SystemConfigurationValueFacade.java

Lines changed: 39 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
import java.io.Serializable;
1919
import java.util.List;
20-
import java.util.Optional;
2120

21+
import javax.annotation.Nullable;
2222
import javax.ejb.Remote;
2323

2424
import de.symeda.sormas.api.BaseFacade;
@@ -29,44 +29,48 @@
2929
*/
3030
@Remote
3131
public interface SystemConfigurationValueFacade
32-
extends
33-
BaseFacade<SystemConfigurationValueDto, SystemConfigurationValueIndexDto, SystemConfigurationValueReferenceDto, SystemConfigurationValueCriteria>,
34-
Serializable {
32+
extends
33+
BaseFacade<SystemConfigurationValueDto, SystemConfigurationValueIndexDto, SystemConfigurationValueReferenceDto, SystemConfigurationValueCriteria>,
34+
Serializable {
3535

36-
/**
37-
* Retrieves system configuration values by their UUIDs.
38-
*
39-
* @param uuids the list of UUIDs
40-
* @return the list of matching system configuration value DTOs
41-
*/
42-
List<SystemConfigurationValueDto> getByUuids(List<String> uuids);
36+
/**
37+
* Retrieves system configuration values by their UUIDs.
38+
*
39+
* @param uuids
40+
* the list of UUIDs
41+
* @return the list of matching system configuration value DTOs
42+
*/
43+
List<SystemConfigurationValueDto> getByUuids(List<String> uuids);
4344

44-
/**
45-
* Retrieves all UUIDs of system configuration values.
46-
*
47-
* @return the list of all UUIDs
48-
*/
49-
List<String> getAllUuids();
45+
/**
46+
* Retrieves all UUIDs of system configuration values.
47+
*
48+
* @return the list of all UUIDs
49+
*/
50+
List<String> getAllUuids();
5051

51-
/**
52-
* Retrieves a configuration value associated with the given key.
53-
* The implementors should assure that proper caching is used.
54-
*
55-
* @param key The key of the configuration value to retrieve.
56-
* @return the value of the configuration.
57-
*/
58-
Optional<String> getValue(Config key);
52+
/**
53+
* Retrieves a configuration value associated with the given key.
54+
* The implementors should assure that proper caching is used.
55+
*
56+
* @param key
57+
* The key of the configuration value to retrieve.
58+
* @return the value of the configuration.
59+
*/
60+
@Nullable
61+
String getValue(Config key);
5962

60-
/**
61-
* Checks if a configuration value exists for the given key.
62-
*
63-
* @param key The key to check.
64-
* @return true if the configuration value exists, false otherwise.
65-
*/
63+
/**
64+
* Checks if a configuration value exists for the given key.
65+
*
66+
* @param key
67+
* The key to check.
68+
* @return true if the configuration value exists, false otherwise.
69+
*/
6670
boolean exists(Config key);
6771

68-
/**
69-
* Clears the caches and reloads the system configuration values from the database.
70-
*/
71-
void loadData();
72+
/**
73+
* Clears the caches and reloads the system configuration values from the database.
74+
*/
75+
void loadData();
7276
}

0 commit comments

Comments
 (0)