Search in sources :

Example 6 with SettingModel

use of com.gitblit.models.SettingModel in project gitblit by gitblit.

the class MockRuntimeManager method getSettingsModel.

@Override
public ServerSettings getSettingsModel() {
    // ensure that the current values are updated in the setting models
    for (String key : settings.getAllKeys(null)) {
        SettingModel setting = serverSettings.get(key);
        if (setting == null) {
            // unreferenced setting, create a setting model
            setting = new SettingModel();
            setting.name = key;
            serverSettings.add(setting);
        }
        setting.currentValue = settings.getString(key, "");
    }
    return serverSettings;
}
Also used : SettingModel(com.gitblit.models.SettingModel)

Aggregations

SettingModel (com.gitblit.models.SettingModel)6 GitBlitException (com.gitblit.GitBlitException)1 JsonIOException (com.google.gson.JsonIOException)1 JsonSyntaxException (com.google.gson.JsonSyntaxException)1 BorderLayout (java.awt.BorderLayout)1 FlowLayout (java.awt.FlowLayout)1 ActionEvent (java.awt.event.ActionEvent)1 ActionListener (java.awt.event.ActionListener)1 KeyAdapter (java.awt.event.KeyAdapter)1 KeyEvent (java.awt.event.KeyEvent)1 MouseAdapter (java.awt.event.MouseAdapter)1 MouseEvent (java.awt.event.MouseEvent)1 BufferedReader (java.io.BufferedReader)1 FileInputStream (java.io.FileInputStream)1 IOException (java.io.IOException)1 InputStream (java.io.InputStream)1 InputStreamReader (java.io.InputStreamReader)1 JButton (javax.swing.JButton)1 JLabel (javax.swing.JLabel)1 JPanel (javax.swing.JPanel)1