當前位置: 首頁>>代碼示例>>Java>>正文


Java User類代碼示例

本文整理匯總了Java中com.woorea.openstack.keystone.model.User的典型用法代碼示例。如果您正苦於以下問題:Java User類的具體用法?Java User怎麽用?Java User使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


User類屬於com.woorea.openstack.keystone.model包,在下文中一共展示了User類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: execute

import com.woorea.openstack.keystone.model.User; //導入依賴的package包/類
@Override
public void execute(Keystone keystone, CommandLine cmd) {
	
	final Users users = keystone.users().list().execute();
	
	Table t = new Table(new TableModel<User>(users.getList()) {

		@Override
		public Column[] getHeaders() {
			return new Column[]{
				new Column("id", 32, Column.ALIGN_LEFT),
				new Column("name", 10, Column.ALIGN_LEFT),
				new Column("email", 22, Column.ALIGN_LEFT),
				new Column("tenant", 32, Column.ALIGN_LEFT),
				new Column("enabled", 7, Column.ALIGN_LEFT)
			};
		}

		@Override
		public String[] getRow(User user) {
			return new String[]{
				user.getId(),
				user.getName(),
				user.getEmail(),
				user.getTenantId(),
				user.getEnabled().toString()
			};
		}
	});
	System.out.println(t.render());
}
 
開發者ID:CIETstudents,項目名稱:openstack-maven-CIET-students,代碼行數:32,代碼來源:KeystoneUserList.java

示例2: showAllUsers

import com.woorea.openstack.keystone.model.User; //導入依賴的package包/類
private void showAllUsers() {
	System.out.println("\n\nUsers:\n");
	Users users = keystone.users().list().execute();
	for (User user: users) {
		printJson(user);
	}
}
 
開發者ID:jdutton,項目名稱:java-openstack-sdk-cli-example,代碼行數:8,代碼來源:Cli.java

示例3: create

import com.woorea.openstack.keystone.model.User; //導入依賴的package包/類
public Create create(User user) {
	return new Create(user);
}
 
開發者ID:CIETstudents,項目名稱:openstack-maven-CIET-students,代碼行數:4,代碼來源:UsersResource.java

示例4: update

import com.woorea.openstack.keystone.model.User; //導入依賴的package包/類
public Update update(String id, User user) {
	return new Update(id, user);
}
 
開發者ID:CIETstudents,項目名稱:openstack-maven-CIET-students,代碼行數:4,代碼來源:UsersResource.java

示例5: Create

import com.woorea.openstack.keystone.model.User; //導入依賴的package包/類
public Create(User user) {
	super(client, HttpMethod.POST, "/users", Entity.json(user), User.class);
	this.user = user;
}
 
開發者ID:CIETstudents,項目名稱:openstack-maven-CIET-students,代碼行數:5,代碼來源:UsersResource.java

示例6: Show

import com.woorea.openstack.keystone.model.User; //導入依賴的package包/類
public Show(String id) {
	super(client, HttpMethod.GET, new StringBuilder("/users/").append(id).toString(), null, User.class);
}
 
開發者ID:CIETstudents,項目名稱:openstack-maven-CIET-students,代碼行數:4,代碼來源:UsersResource.java

示例7: Update

import com.woorea.openstack.keystone.model.User; //導入依賴的package包/類
public Update(String id, User user) {
	super(client, HttpMethod.PUT, new StringBuilder("/users/").append(id).toString(), Entity.json(user), User.class);
	this.user = user;
}
 
開發者ID:CIETstudents,項目名稱:openstack-maven-CIET-students,代碼行數:5,代碼來源:UsersResource.java

示例8: getList

import com.woorea.openstack.keystone.model.User; //導入依賴的package包/類
/**
 * @return the list
 */
public List<User> getList() {
	return list;
}
 
開發者ID:CIETstudents,項目名稱:openstack-maven-CIET-students,代碼行數:7,代碼來源:Users.java

示例9: iterator

import com.woorea.openstack.keystone.model.User; //導入依賴的package包/類
@Override
public Iterator<User> iterator() {
	return list.iterator();
}
 
開發者ID:CIETstudents,項目名稱:openstack-maven-CIET-students,代碼行數:5,代碼來源:Users.java


注:本文中的com.woorea.openstack.keystone.model.User類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。