Interface CmJaxbConfigDao<E>
-
- All Known Implementing Classes:
AbstractCmJaxbConfigDao
,DefaultProvisiondConfigurationDao
public interface CmJaxbConfigDao<E>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description E
getConfig(String configId)
It will the config in cache, if nothing found it will load from db.String
getConfigName()
ConfigName use for the Config and Schemadefault String
getDefaultConfigId()
The default configId when getConfig without passing configIddefault java.util.function.Consumer<ConfigUpdateInfo>
getUpdateCallback()
It will provide the callback for all update, you can simplydefault java.util.function.Consumer<E>
getValidationCallback()
It will return null validation callback for all ConfigDao.E
loadConfig()
It will load the default configE
loadConfig(String configId)
loadConfig from database by CM.void
updateConfig(String configId, String jsonConfigString, boolean isReplace)
-
-
-
Method Detail
-
getConfigName
String getConfigName()
ConfigName use for the Config and Schema- Returns:
- ConfigName
-
getUpdateCallback
default java.util.function.Consumer<ConfigUpdateInfo> getUpdateCallback()
It will provide the callback for all update, you can simply- Returns:
- Consumer
-
getValidationCallback
default java.util.function.Consumer<E> getValidationCallback()
It will return null validation callback for all ConfigDao. By default, it is no needed. Validation will rely on openAPI schema. (xsd) Override if you need to do extra validation logic. e.g. quartz expression is not possible to validate by pattern.- Returns:
- Consumer
-
getDefaultConfigId
default String getDefaultConfigId()
The default configId when getConfig without passing configId- Returns:
- configId
-
loadConfig
E loadConfig()
It will load the default config- Returns:
- ConfigObject
-
loadConfig
E loadConfig(String configId)
loadConfig from database by CM. If it is already in cache, it will update the cache.- Parameters:
configId
-- Returns:
- ConfigObject
-
getConfig
E getConfig(String configId)
It will the config in cache, if nothing found it will load from db. Please notice that, config can be different in db.- Parameters:
configId
-- Returns:
- config
-
updateConfig
void updateConfig(String configId, String jsonConfigString, boolean isReplace) throws ValidationException
- Throws:
ValidationException
-
-