Package io.jmix.appsettings.impl
Class AppSettingsToolsImpl
java.lang.Object
io.jmix.appsettings.impl.AppSettingsToolsImpl
- All Implemented Interfaces:
AppSettingsTools
@Component("appset_AppSettingsTools")
public class AppSettingsToolsImpl
extends Object
implements AppSettingsTools
-
Field Summary
Modifier and TypeFieldDescriptionprotected DataManager
protected DatatypeRegistry
protected Metadata
protected MetadataTools
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetDefaultPropertyValue
(Class<? extends AppSettingsEntity> clazz, String propertyName) Returns default value for providedpropertyName
andclazz
based on value of one of the AppSettingsDefault annotation.<T extends AppSettingsEntity>
List<String>getPropertyNames
(Class<T> clazz) Returns all non-system properties' names for givenclazz
.getPropertyValue
(Class<? extends AppSettingsEntity> clazz, String propertyName) Returns actual value for providedpropertyName
andclazz
.<T extends AppSettingsEntity>
TloadAppSettingsEntityFromDataStore
(Class<T> clazz) Loads application settings entity by itclazz
from data store.
-
Field Details
-
metadata
-
metadataTools
-
dataManager
-
datatypeRegistry
-
-
Constructor Details
-
AppSettingsToolsImpl
public AppSettingsToolsImpl()
-
-
Method Details
-
loadAppSettingsEntityFromDataStore
Description copied from interface:AppSettingsTools
Loads application settings entity by itclazz
from data store.- Specified by:
loadAppSettingsEntityFromDataStore
in interfaceAppSettingsTools
- Parameters:
clazz
- class that extendsAppSettingsEntity
- Returns:
- application settings entity
-
getPropertyValue
Description copied from interface:AppSettingsTools
Returns actual value for providedpropertyName
andclazz
.- Specified by:
getPropertyValue
in interfaceAppSettingsTools
- Parameters:
clazz
- class that extendsAppSettingsEntity
propertyName
- property name for which value should be calculated- Returns:
- actual value of provided
propertyName
-
getDefaultPropertyValue
@Nullable public Object getDefaultPropertyValue(Class<? extends AppSettingsEntity> clazz, String propertyName) Description copied from interface:AppSettingsTools
Returns default value for providedpropertyName
andclazz
based on value of one of the AppSettingsDefault annotation.- Specified by:
getDefaultPropertyValue
in interfaceAppSettingsTools
- Parameters:
clazz
- class that extendsAppSettingsEntity
propertyName
- property name for which default value should be calculated- Returns:
- value by default of provided
propertyName
-
getPropertyNames
Description copied from interface:AppSettingsTools
Returns all non-system properties' names for givenclazz
.- Specified by:
getPropertyNames
in interfaceAppSettingsTools
- Parameters:
clazz
- class that extendsAppSettingsEntity
- Returns:
- non-system properties' names for given
clazz
-