Class ATXConfig

    • Constructor Detail

      • ATXConfig

        public ATXConfig()
        Instantiates a new ATXConfig with the default configuration.
      • ATXConfig

        @DataBoundConstructor
        public ATXConfig​(List<ATXSetting<?>> settings,
                         List<ATXCustomSetting> customSettings)
        Instantiates a new ATXConfig.
        Parameters:
        settings - the ATX settings map
        customSettings - the custom settings
    • Method Detail

      • readResolve

        protected Object readResolve()
        Used for backward compatibility using deprecated configuration map.
        Returns:
        the settings to use after deserialization
        Since:
        2.7.0
      • setSettings

        public void setSettings​(List<ATXSetting<?>> settings)
      • getSettingByName

        public Optional<ATXSetting<?>> getSettingByName​(String name)
        Gets the ATX setting by given setting name.
        Parameters:
        name - the setting name
        Returns:
        the ATX setting or null if not found
      • getCustomSettingByName

        public Optional<ATXCustomSetting> getCustomSettingByName​(String name)
        Gets the ATX custom setting by given setting name.
        Parameters:
        name - the custom setting name
        Returns:
        the ATX setting or null if not found
      • getSettingsByGroup

        public List<ATXSetting<?>> getSettingsByGroup​(ATXSetting.SettingsGroup group)
        Gets all ATX settings which belongs to a settings group.
        Parameters:
        group - the settings group
        Returns:
        the list of ATX settings or empty list if not found
      • getSettingsByGroupName

        public List<ATXSetting<?>> getSettingsByGroupName​(String groupName)
        Gets all ATX settings which belongs to a named settings group.
        Parameters:
        groupName - the group name
        Returns:
        the settings by group name
      • getSettingValueBySettings

        @CheckForNull
        public Object getSettingValueBySettings​(String name,
                                                List<ATXSetting<?>> settings)
        Gets the ATX setting value by given setting name from a list of ATX settings.
        Parameters:
        name - the setting name
        settings - the setting list to search in
        Returns:
        the setting value or null if not found
      • getSettingValueByGroup

        @CheckForNull
        public Object getSettingValueByGroup​(String name,
                                             ATXSetting.SettingsGroup group)
        Gets the ATX setting by given setting name and a list of ATX settings.
        Parameters:
        name - the setting name
        group - the settings group
        Returns:
        the ATX setting or null if not found
      • setSettingValueByName

        public void setSettingValueByName​(String name,
                                          Object value)
        Sets the ATX setting value by name if present.
        Parameters:
        name - the setting name
        value - the setting value
      • getSettingsGroup

        public static ATXSetting.SettingsGroup getSettingsGroup​(String groupName)
        Gets the ATX settings group by name.
        Parameters:
        groupName - the group name
        Returns:
        the settings group