本文整理匯總了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());
}
示例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);
}
}
示例3: create
import com.woorea.openstack.keystone.model.User; //導入依賴的package包/類
public Create create(User user) {
return new Create(user);
}
示例4: update
import com.woorea.openstack.keystone.model.User; //導入依賴的package包/類
public Update update(String id, User user) {
return new Update(id, user);
}
示例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;
}
示例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);
}
示例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;
}
示例8: getList
import com.woorea.openstack.keystone.model.User; //導入依賴的package包/類
/**
* @return the list
*/
public List<User> getList() {
return list;
}
示例9: iterator
import com.woorea.openstack.keystone.model.User; //導入依賴的package包/類
@Override
public Iterator<User> iterator() {
return list.iterator();
}