Interface ISystemPropertyDao

All Superinterfaces:
de.xima.cmn.dao.interfaces.IAbstractDao<SystemProperty, Long, IEntityContext>, IGenericDao<SystemProperty>
All Known Implementing Classes:
SystemPropertyDao

public interface ISystemPropertyDao extends IGenericDao<SystemProperty>
Author:
XIMA MEDIA GmbH
  • Method Details

    • createProperty

      SystemProperty createProperty(IEntityContext ec, String key, String value)
    • deleteProperty

      void deleteProperty(IEntityContext ec, String key)
    • getBooleanValue

      boolean getBooleanValue(IEntityContext ec, String key, boolean defaultValue)
    • getByKey

      SystemProperty getByKey(IEntityContext ec, String key)
    • getByKeyPrefix

      List<SystemProperty> getByKeyPrefix(IEntityContext ec, String keyPrefix)
      Gets a list with all system properties that have a name starting with the given prefix.
      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

      Map<String,String> getByKeyPrefixAsMap(IEntityContext ec, String keyPrefix)
      Gets a map with all system properties that have a name starting with the given prefix. The map key is the property key, the map value is the property value.
      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

      List<SystemProperty> getByKeys(IEntityContext ec, List<String> keys)
    • getDefaultSystemFormTheme

      FormThemeReference getDefaultSystemFormTheme(IEntityContext ec)
      Gets the form theme that was configured as the default theme for the entire system. When no theme was configured, returns an appropriate default theme.
      Parameters:
      ec - The entity context to use for accessing the database.
      Returns:
      The default form theme for the system.
    • getIntegerValue

      int getIntegerValue(IEntityContext ec, String key, int defaultValue)
    • getLongValue

      long getLongValue(IEntityContext ec, String key, long defaultValue)
    • getMfaSettings

      @NotNull @NotNull IMfaSettings getMfaSettings(IEntityContext ec)
      Gets the Multi-Factor Authentication (MFA) settings for the system.
      Parameters:
      ec - The entity context to use for accessing the database.
      Returns:
      The MFA settings for the system.
      Since:
      8.4.0
    • getStringValue

      String getStringValue(IEntityContext ec, String key, String defaultValue)
      Returns 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.
      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

      void updateProperties(IEntityContext ec, Map<String,String> properties)
      Writes all given properties to the database. The map key is the property key, the map value is the property value. If a property exists already, its value is overwritten. If a property does not exist, it is created.
      Parameters:
      ec - The entity context to use for accessing the database.
      properties - The properties to write to the database.
    • updateProperty

      SystemProperty updateProperty(IEntityContext ec, String key, String value)