本文整理汇总了Java中com.gitblit.models.ServerSettings类的典型用法代码示例。如果您正苦于以下问题:Java ServerSettings类的具体用法?Java ServerSettings怎么用?Java ServerSettings使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ServerSettings类属于com.gitblit.models包,在下文中一共展示了ServerSettings类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: EditUserDialog
import com.gitblit.models.ServerSettings; //导入依赖的package包/类
public EditUserDialog(int protocolVersion, UserModel anUser, ServerSettings settings) {
super();
this.username = anUser.username;
this.user = new UserModel("");
this.settings = settings;
this.usernames = new HashSet<String>();
this.isCreate = false;
initialize(protocolVersion, anUser);
setModal(true);
setTitle(Translation.get("gb.edit") + ": " + anUser.username);
setIconImage(new ImageIcon(getClass().getResource("/gitblt-favicon.png")).getImage());
}
示例2: EditTeamDialog
import com.gitblit.models.ServerSettings; //导入依赖的package包/类
public EditTeamDialog(int protocolVersion, TeamModel aTeam, ServerSettings settings) {
super();
this.teamname = aTeam.name;
this.team = new TeamModel("");
this.settings = settings;
this.teamnames = new HashSet<String>();
this.isCreate = false;
initialize(protocolVersion, aTeam);
setModal(true);
setTitle(Translation.get("gb.edit") + ": " + aTeam.name);
setIconImage(new ImageIcon(getClass().getResource("/gitblt-favicon.png")).getImage());
}
示例3: setSettings
import com.gitblit.models.ServerSettings; //导入依赖的package包/类
public void setSettings(ServerSettings settings) {
this.settings = settings;
if (settings == null) {
keys = new ArrayList<String>();
} else {
keys = new ArrayList<String>(settings.getKeys());
Collections.sort(keys);
}
}
示例4: testUpdateSettings
import com.gitblit.models.ServerSettings; //导入依赖的package包/类
@Test
public void testUpdateSettings() throws Exception {
Map<String, String> updated = new HashMap<String, String>();
// grab current setting
ServerSettings settings = RpcUtils.getSettings(url, account, password.toCharArray());
boolean showSizes = settings.get(Keys.web.showRepositorySizes).getBoolean(true);
showSizes = !showSizes;
// update setting
updated.put(Keys.web.showRepositorySizes, String.valueOf(showSizes));
boolean success = RpcUtils.updateSettings(updated, url, account, password.toCharArray());
assertTrue("Failed to update server settings", success);
// confirm setting change
settings = RpcUtils.getSettings(url, account, password.toCharArray());
boolean newValue = settings.get(Keys.web.showRepositorySizes).getBoolean(false);
assertEquals(newValue, showSizes);
// restore setting
newValue = !newValue;
updated.put(Keys.web.showRepositorySizes, String.valueOf(newValue));
success = RpcUtils.updateSettings(updated, url, account, password.toCharArray());
assertTrue("Failed to update server settings", success);
settings = RpcUtils.getSettings(url, account, password.toCharArray());
showSizes = settings.get(Keys.web.showRepositorySizes).getBoolean(true);
assertEquals(newValue, showSizes);
}
示例5: getSettings
import com.gitblit.models.ServerSettings; //导入依赖的package包/类
public ServerSettings getSettings() {
return settings;
}
示例6: refreshSettings
import com.gitblit.models.ServerSettings; //导入依赖的package包/类
public ServerSettings refreshSettings() throws IOException {
settings = RpcUtils.getSettings(url, account, password);
return settings;
}
示例7: SettingsTableModel
import com.gitblit.models.ServerSettings; //导入依赖的package包/类
public SettingsTableModel(ServerSettings settings) {
setSettings(settings);
}
示例8: testSettings
import com.gitblit.models.ServerSettings; //导入依赖的package包/类
@Test
public void testSettings() throws Exception {
ServerSettings settings = RpcUtils.getSettings(url, account, password.toCharArray());
assertNotNull("No settings were retrieved!", settings);
}
示例9: getSettings
import com.gitblit.models.ServerSettings; //导入依赖的package包/类
/**
* Retrieves the settings of the Gitblit server.
*
* @param serverUrl
* @param account
* @param password
* @return an Settings object
* @throws IOException
*/
public static ServerSettings getSettings(String serverUrl, String account, char[] password)
throws IOException {
String url = asLink(serverUrl, RpcRequest.LIST_SETTINGS);
ServerSettings settings = JsonUtils.retrieveJson(url, ServerSettings.class, account,
password);
return settings;
}