当前位置: 首页>>代码示例>>Java>>正文


Java ServerSettings类代码示例

本文整理汇总了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());
}
 
开发者ID:warpfork,项目名称:gitblit,代码行数:13,代码来源:EditUserDialog.java

示例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());
}
 
开发者ID:warpfork,项目名称:gitblit,代码行数:13,代码来源:EditTeamDialog.java

示例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);
	}
}
 
开发者ID:warpfork,项目名称:gitblit,代码行数:10,代码来源:SettingsTableModel.java

示例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);
}
 
开发者ID:warpfork,项目名称:gitblit,代码行数:29,代码来源:RpcTests.java

示例5: getSettings

import com.gitblit.models.ServerSettings; //导入依赖的package包/类
public ServerSettings getSettings() {
	return settings;
}
 
开发者ID:warpfork,项目名称:gitblit,代码行数:4,代码来源:GitblitClient.java

示例6: refreshSettings

import com.gitblit.models.ServerSettings; //导入依赖的package包/类
public ServerSettings refreshSettings() throws IOException {
	settings = RpcUtils.getSettings(url, account, password);
	return settings;
}
 
开发者ID:warpfork,项目名称:gitblit,代码行数:5,代码来源:GitblitClient.java

示例7: SettingsTableModel

import com.gitblit.models.ServerSettings; //导入依赖的package包/类
public SettingsTableModel(ServerSettings settings) {
	setSettings(settings);
}
 
开发者ID:warpfork,项目名称:gitblit,代码行数:4,代码来源:SettingsTableModel.java

示例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);
}
 
开发者ID:warpfork,项目名称:gitblit,代码行数:6,代码来源:RpcTests.java

示例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;
}
 
开发者ID:warpfork,项目名称:gitblit,代码行数:17,代码来源:RpcUtils.java


注:本文中的com.gitblit.models.ServerSettings类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。