com.xensource.xenapi
Class User

java.lang.Object
  extended by com.xensource.xenapi.User

public class User
extends Object

A user of the system


Nested Class Summary
static class User.Record
          Represents all the fields in a User
 
Field Summary
protected  String ref
          The XenAPI reference to this object.
 
Method Summary
static User create(User.Record record)
          Create a new user instance, and return its handle.
 void destroy()
          Destroy the specified user instance.
static Map<User,User.Record> getAllRecords()
          Get all the User Records at once, in a single XML RPC call
static User getByUuid(String uuid)
          Get a reference to the user instance with the specified UUID.
 String getFullname()
          Get the fullname field of the given user.
protected static User getInstFromRef(String ref)
           
 User.Record getRecord()
          Get a record containing the current state of the given user.
 String getShortName()
          Get the short_name field of the given user.
 String getUuid()
          Get the uuid field of the given user.
 void setFullname(String fullname)
          Set the fullname field of the given user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ref

protected final String ref
The XenAPI reference to this object.

Method Detail

getInstFromRef

protected static User getInstFromRef(String ref)

getRecord

public User.Record getRecord()
                      throws Types.BadServerResponse,
                             ConnectionHelper.NoConnectionOnThisThreadException,
                             XmlRpcException
Get a record containing the current state of the given user.

Returns:
all fields from the object
Throws:
Types.BadServerResponse
ConnectionHelper.NoConnectionOnThisThreadException
XmlRpcException

getByUuid

public static User getByUuid(String uuid)
                      throws Types.BadServerResponse,
                             ConnectionHelper.NoConnectionOnThisThreadException,
                             XmlRpcException
Get a reference to the user instance with the specified UUID.

Parameters:
uuid - UUID of object to return
Returns:
reference to the object
Throws:
Types.BadServerResponse
ConnectionHelper.NoConnectionOnThisThreadException
XmlRpcException

create

public static User create(User.Record record)
                   throws Types.BadServerResponse,
                          ConnectionHelper.NoConnectionOnThisThreadException,
                          XmlRpcException
Create a new user instance, and return its handle.

Parameters:
record - All constructor arguments
Returns:
reference to the newly created object
Throws:
Types.BadServerResponse
ConnectionHelper.NoConnectionOnThisThreadException
XmlRpcException

destroy

public void destroy()
             throws Types.BadServerResponse,
                    ConnectionHelper.NoConnectionOnThisThreadException,
                    XmlRpcException
Destroy the specified user instance.

Throws:
Types.BadServerResponse
ConnectionHelper.NoConnectionOnThisThreadException
XmlRpcException

getUuid

public String getUuid()
               throws Types.BadServerResponse,
                      ConnectionHelper.NoConnectionOnThisThreadException,
                      XmlRpcException
Get the uuid field of the given user.

Returns:
value of the field
Throws:
Types.BadServerResponse
ConnectionHelper.NoConnectionOnThisThreadException
XmlRpcException

getShortName

public String getShortName()
                    throws Types.BadServerResponse,
                           ConnectionHelper.NoConnectionOnThisThreadException,
                           XmlRpcException
Get the short_name field of the given user.

Returns:
value of the field
Throws:
Types.BadServerResponse
ConnectionHelper.NoConnectionOnThisThreadException
XmlRpcException

getFullname

public String getFullname()
                   throws Types.BadServerResponse,
                          ConnectionHelper.NoConnectionOnThisThreadException,
                          XmlRpcException
Get the fullname field of the given user.

Returns:
value of the field
Throws:
Types.BadServerResponse
ConnectionHelper.NoConnectionOnThisThreadException
XmlRpcException

setFullname

public void setFullname(String fullname)
                 throws Types.BadServerResponse,
                        ConnectionHelper.NoConnectionOnThisThreadException,
                        XmlRpcException
Set the fullname field of the given user.

Parameters:
fullname - New value to set
Throws:
Types.BadServerResponse
ConnectionHelper.NoConnectionOnThisThreadException
XmlRpcException

getAllRecords

public static Map<User,User.Record> getAllRecords()
                                           throws Types.BadServerResponse,
                                                  ConnectionHelper.NoConnectionOnThisThreadException,
                                                  XmlRpcException
Get all the User Records at once, in a single XML RPC call

Returns:
A map from User to User.Record
Throws:
Types.BadServerResponse
ConnectionHelper.NoConnectionOnThisThreadException
XmlRpcException