Interface YamlInitialValueService
- All Known Implementing Classes:
YamlInitialValueServiceImpl
public interface YamlInitialValueService
-
Method Summary
Modifier and TypeMethodDescriptionvoid
handleInitialValue
(YamlInitialValues.YamlInitialValue initialValue, boolean resetVersion) simplified "handleInitialValue" that may be used outside dbrefactoring module - empty InstallParameters are used - shouldNewContentBeInactive is false - exceptions are wrapped in a RuntimeExceptionvoid
handleInitialValue
(YamlInitialValues.YamlInitialValue value, InstallParameters parameters, boolean shouldNewContentBeInactive, boolean resetVersion) write an initialvalue to the database.loadData
(@Nullable Set<String> modules, Predicate<ModelResource> fileNamePredicate) load all .yaml files from the db/initialvalues folders of the passed modules and parse them intoYamlInitialValues.YamlInitialValue
for use as initial values after db refactoring was run
-
Method Details
-
loadData
Stream<YamlInitialValues.YamlInitialValue> loadData(@Nullable @Nullable Set<String> modules, Predicate<ModelResource> fileNamePredicate) load all .yaml files from the db/initialvalues folders of the passed modules and parse them intoYamlInitialValues.YamlInitialValue
for use as initial values after db refactoring was run- Parameters:
modules
- the modules to load the initial values for- Returns:
- a stream of all initial values
-
handleInitialValue
void handleInitialValue(YamlInitialValues.YamlInitialValue value, InstallParameters parameters, boolean shouldNewContentBeInactive, boolean resetVersion) throws SQLException, ExecutionException write an initialvalue to the database. creates or updates the corresponding entity- Parameters:
value
- the initialvalue (probably loaded by loadData)parameters
- fragment install parametersshouldNewContentBeInactive
- parameter to determine whether new values should be inserted as inactiveresetVersion
- if reset version is selected, the version is reset to 1 when updating an initialvalue- Throws:
SQLException
ExecutionException
-
handleInitialValue
simplified "handleInitialValue" that may be used outside dbrefactoring module - empty InstallParameters are used - shouldNewContentBeInactive is false - exceptions are wrapped in a RuntimeException
-