Class SystemPropertyDao
java.lang.Object
- All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IAbstractDao<SystemProperty, Long, IEntityContext>, IGenericDao<SystemProperty>, ISystemPropertyDao
- Author:
- XIMA MEDIA GmbH
-
Field Summary
Fields inherited from class de.xima.cmn.dao.AbstractDao
entityClass, LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateProperty(IEntityContext ec, String key, String value) voiddeleteProperty(IEntityContext ec, String key) booleangetBooleanValue(IEntityContext ec, String key, boolean defaultValue) getByKey(IEntityContext ec, String key) getByKeyPrefix(IEntityContext ec, String keyPrefix) Gets a list with all system properties that have a name starting with the given prefix.getByKeyPrefixAsMap(IEntityContext ec, String keyPrefix) Gets a map with all system properties that have a name starting with the given prefix.getByKeys(IEntityContext ec, List<String> keys) Gets the form theme that was configured as the default theme for the entire system.intgetIntegerValue(IEntityContext ec, String key, int defaultValue) longgetLongValue(IEntityContext ec, String key, long defaultValue) Gets the Multi-Factor Authentication (MFA) settings for the system.getStringValue(IEntityContext ec, String key, String defaultValue) Returns the String value of the system property with the given key if it exists.voidupdateProperties(IEntityContext ec, Map<String, String> properties) Writes all given properties to the database.updateProperty(IEntityContext ec, String key, String value) Methods inherited from class GenericDao
getEntityRefs, getPostActionHook, getPreActionHook, readMethods inherited from class de.xima.cmn.dao.AbstractDao
all, bulkDelete, bulkUpdate, cb, checkLockingVersion, cq, create, create, delete, delete, deleteAll, executePagedDaoAction, getAttributes, getAttributes, getSingleAttributes, getSingleAttributes, getTransactionHandler, notifyListener, notifyListener, read, registerListener, registerListener, registerListener, resultTotalCount, setTransactionHandler, singleElement, unregisterListener, unregisterListener, unregisterListener, update, updateMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.xima.cmn.dao.interfaces.IAbstractDao
all, bulkDelete, bulkUpdate, checkLockingVersion, create, create, delete, delete, deleteAll, executePagedDaoAction, getAttributes, getAttributes, getSingleAttributes, getSingleAttributes, getTransactionHandler, read, registerListener, registerListener, registerListener, resultTotalCount, setTransactionHandler, singleElement, unregisterListener, unregisterListener, unregisterListener, update, updateMethods inherited from interface IGenericDao
count, createOrUpdate, findAll, findSingle, getEntityRefs, read
-
Constructor Details
-
SystemPropertyDao
public SystemPropertyDao()
-
-
Method Details
-
createProperty
- Specified by:
createPropertyin interfaceISystemPropertyDao
-
deleteProperty
- Specified by:
deletePropertyin interfaceISystemPropertyDao
-
getBooleanValue
- Specified by:
getBooleanValuein interfaceISystemPropertyDao
-
getByKey
- Specified by:
getByKeyin interfaceISystemPropertyDao
-
getByKeyPrefix
Description copied from interface:ISystemPropertyDaoGets a list with all system properties that have a name starting with the given prefix.- Specified by:
getByKeyPrefixin interfaceISystemPropertyDao- Parameters:
ec- The entity context to use for accessing the database.keyPrefix- The prefix for the keys to search for.- Returns:
- A list with all matching properties.
-
getByKeyPrefixAsMap
Description copied from interface:ISystemPropertyDaoGets a map with all system properties that have a name starting with the given prefix. The map key is theproperty key, the map value is theproperty value.- Specified by:
getByKeyPrefixAsMapin interfaceISystemPropertyDao- Parameters:
ec- The entity context to use for accessing the database.keyPrefix- The prefix for the keys to search for.- Returns:
- A map with all matching properties.
-
getByKeys
- Specified by:
getByKeysin interfaceISystemPropertyDao
-
getDefaultSystemFormTheme
Description copied from interface:ISystemPropertyDaoGets the form theme that was configured as the default theme for the entire system. When no theme was configured, returns an appropriate default theme.- Specified by:
getDefaultSystemFormThemein interfaceISystemPropertyDao- Parameters:
ec- The entity context to use for accessing the database.- Returns:
- The default form theme for the system.
-
getIntegerValue
- Specified by:
getIntegerValuein interfaceISystemPropertyDao
-
getLongValue
- Specified by:
getLongValuein interfaceISystemPropertyDao
-
getMfaSettings
Description copied from interface:ISystemPropertyDaoGets the Multi-Factor Authentication (MFA) settings for the system.- Specified by:
getMfaSettingsin interfaceISystemPropertyDao- Parameters:
ec- The entity context to use for accessing the database.- Returns:
- The MFA settings for the system.
-
getStringValue
Description copied from interface:ISystemPropertyDaoReturns the String value of the system property with the given key if it exists. If the system property does not exist, the provided default value will be returned.- Specified by:
getStringValuein interfaceISystemPropertyDao- Parameters:
ec- entity context for database transactions.key- of the system property.defaultValue- to return if no system property was found for the given key.- Returns:
- the String value of the system property with the given key if it exists and the provided default value otherwise.
-
updateProperties
Description copied from interface:ISystemPropertyDaoWrites all given properties to the database. The map key is theproperty key, the map value is theproperty value. If a property exists already, its value is overwritten. If a property does not exist, it is created.- Specified by:
updatePropertiesin interfaceISystemPropertyDao- Parameters:
ec- The entity context to use for accessing the database.properties- The properties to write to the database.
-
updateProperty
- Specified by:
updatePropertyin interfaceISystemPropertyDao
-