本文整理汇总了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();
}