com.xensource.xenapi
Class User

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

public class User
extends XenAPIObject

A user of the system


Nested Class Summary
static class User.Record
          Represents all the fields in a User
 
Field Summary
protected  java.lang.String ref
          The XenAPI reference to this object.
 
Method Summary
 void addToOtherConfig(Connection c, java.lang.String key, java.lang.String value)
          Add the given key-value pair to the other_config field of the given user.
static User create(Connection c, User.Record record)
          Deprecated.  
static Task createAsync(Connection c, User.Record record)
          Deprecated.  
 void destroy(Connection c)
          Deprecated.  
 Task destroyAsync(Connection c)
          Deprecated.  
 boolean equals(java.lang.Object obj)
          If obj is a User, compares XenAPI references for equality.
static User getByUuid(Connection c, java.lang.String uuid)
          Deprecated.  
 java.lang.String getFullname(Connection c)
          Get the fullname field of the given user.
 java.util.Map<java.lang.String,java.lang.String> getOtherConfig(Connection c)
          Get the other_config field of the given user.
 User.Record getRecord(Connection c)
          Deprecated.  
 java.lang.String getShortName(Connection c)
          Get the short_name field of the given user.
 java.lang.String getUuid(Connection c)
          Get the uuid field of the given user.
 int hashCode()
           
 void removeFromOtherConfig(Connection c, java.lang.String key)
          Remove the given key and its corresponding value from the other_config field of the given user.
 void setFullname(Connection c, java.lang.String fullname)
          Set the fullname field of the given user.
 void setOtherConfig(Connection c, java.util.Map<java.lang.String,java.lang.String> otherConfig)
          Set the other_config field of the given user.
 java.lang.String toWireString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ref

protected final java.lang.String ref
The XenAPI reference to this object.

Method Detail

toWireString

public java.lang.String toWireString()
Specified by:
toWireString in class XenAPIObject

equals

public boolean equals(java.lang.Object obj)
If obj is a User, compares XenAPI references for equality.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getRecord

@Deprecated
public User.Record getRecord(Connection c)
                      throws Types.BadServerResponse,
                             Types.XenAPIException,
                             org.apache.xmlrpc.XmlRpcException
Deprecated. 

Get a record containing the current state of the given user.

Returns:
all fields from the object
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getByUuid

@Deprecated
public static User getByUuid(Connection c,
                                        java.lang.String uuid)
                      throws Types.BadServerResponse,
                             Types.XenAPIException,
                             org.apache.xmlrpc.XmlRpcException
Deprecated. 

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
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

createAsync

@Deprecated
public static Task createAsync(Connection c,
                                          User.Record record)
                        throws Types.BadServerResponse,
                               Types.XenAPIException,
                               org.apache.xmlrpc.XmlRpcException
Deprecated. 

Create a new user instance, and return its handle.

Parameters:
record - All constructor arguments
Returns:
Task
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

create

@Deprecated
public static User create(Connection c,
                                     User.Record record)
                   throws Types.BadServerResponse,
                          Types.XenAPIException,
                          org.apache.xmlrpc.XmlRpcException
Deprecated. 

Create a new user instance, and return its handle.

Parameters:
record - All constructor arguments
Returns:
reference to the newly created object
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

destroyAsync

@Deprecated
public Task destroyAsync(Connection c)
                  throws Types.BadServerResponse,
                         Types.XenAPIException,
                         org.apache.xmlrpc.XmlRpcException
Deprecated. 

Destroy the specified user instance.

Returns:
Task
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

destroy

@Deprecated
public void destroy(Connection c)
             throws Types.BadServerResponse,
                    Types.XenAPIException,
                    org.apache.xmlrpc.XmlRpcException
Deprecated. 

Destroy the specified user instance.

Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getUuid

public java.lang.String getUuid(Connection c)
                         throws Types.BadServerResponse,
                                Types.XenAPIException,
                                org.apache.xmlrpc.XmlRpcException
Get the uuid field of the given user.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getShortName

public java.lang.String getShortName(Connection c)
                              throws Types.BadServerResponse,
                                     Types.XenAPIException,
                                     org.apache.xmlrpc.XmlRpcException
Get the short_name field of the given user.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getFullname

public java.lang.String getFullname(Connection c)
                             throws Types.BadServerResponse,
                                    Types.XenAPIException,
                                    org.apache.xmlrpc.XmlRpcException
Get the fullname field of the given user.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getOtherConfig

public java.util.Map<java.lang.String,java.lang.String> getOtherConfig(Connection c)
                                                                throws Types.BadServerResponse,
                                                                       Types.XenAPIException,
                                                                       org.apache.xmlrpc.XmlRpcException
Get the other_config field of the given user.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

setFullname

public void setFullname(Connection c,
                        java.lang.String fullname)
                 throws Types.BadServerResponse,
                        Types.XenAPIException,
                        org.apache.xmlrpc.XmlRpcException
Set the fullname field of the given user.

Parameters:
fullname - New value to set
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

setOtherConfig

public void setOtherConfig(Connection c,
                           java.util.Map<java.lang.String,java.lang.String> otherConfig)
                    throws Types.BadServerResponse,
                           Types.XenAPIException,
                           org.apache.xmlrpc.XmlRpcException
Set the other_config field of the given user.

Parameters:
otherConfig - New value to set
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

addToOtherConfig

public void addToOtherConfig(Connection c,
                             java.lang.String key,
                             java.lang.String value)
                      throws Types.BadServerResponse,
                             Types.XenAPIException,
                             org.apache.xmlrpc.XmlRpcException
Add the given key-value pair to the other_config field of the given user.

Parameters:
key - Key to add
value - Value to add
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

removeFromOtherConfig

public void removeFromOtherConfig(Connection c,
                                  java.lang.String key)
                           throws Types.BadServerResponse,
                                  Types.XenAPIException,
                                  org.apache.xmlrpc.XmlRpcException
Remove the given key and its corresponding value from the other_config field of the given user. If the key is not in that Map, then do nothing.

Parameters:
key - Key to remove
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException