com.xensource.xenapi
Class Secret

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

public class Secret
extends XenAPIObject

A secret


Nested Class Summary
static class Secret.Record
          Represents all the fields in a Secret
 
Field Summary
protected  String ref
          The XenAPI reference to this object.
 
Method Summary
static Secret create(Connection c, Secret.Record record)
          Create a new secret instance, and return its handle.
static Task createAsync(Connection c, Secret.Record record)
          Create a new secret instance, and return its handle.
 void destroy(Connection c)
          Destroy the specified secret instance.
 Task destroyAsync(Connection c)
          Destroy the specified secret instance.
 boolean equals(Object obj)
          If obj is a Secret, compares XenAPI references for equality.
static Set<Secret> getAll(Connection c)
          Return a list of all the secrets known to the system.
static Map<Secret,Secret.Record> getAllRecords(Connection c)
          Return a map of secret references to secret records for all secrets known to the system.
static Secret getByUuid(Connection c, String uuid)
          Get a reference to the secret instance with the specified UUID.
 Secret.Record getRecord(Connection c)
          Get a record containing the current state of the given secret.
 String getUuid(Connection c)
          Get the uuid field of the given secret.
 String getValue(Connection c)
          Get the value field of the given secret.
 int hashCode()
           
 void setValue(Connection c, String value)
          Set the value field of the given secret.
 String toWireString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ref

protected final String ref
The XenAPI reference to this object.

Method Detail

toWireString

public String toWireString()
Specified by:
toWireString in class XenAPIObject

equals

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

Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getRecord

public Secret.Record getRecord(Connection c)
                        throws Types.BadServerResponse,
                               Types.XenAPIException,
                               org.apache.xmlrpc.XmlRpcException
Get a record containing the current state of the given secret.

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

getByUuid

public static Secret getByUuid(Connection c,
                               String uuid)
                        throws Types.BadServerResponse,
                               Types.XenAPIException,
                               org.apache.xmlrpc.XmlRpcException
Get a reference to the secret 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

public static Task createAsync(Connection c,
                               Secret.Record record)
                        throws Types.BadServerResponse,
                               Types.XenAPIException,
                               org.apache.xmlrpc.XmlRpcException
Create a new secret instance, and return its handle.

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

create

public static Secret create(Connection c,
                            Secret.Record record)
                     throws Types.BadServerResponse,
                            Types.XenAPIException,
                            org.apache.xmlrpc.XmlRpcException
Create a new secret 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

public Task destroyAsync(Connection c)
                  throws Types.BadServerResponse,
                         Types.XenAPIException,
                         org.apache.xmlrpc.XmlRpcException
Destroy the specified secret instance.

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

destroy

public void destroy(Connection c)
             throws Types.BadServerResponse,
                    Types.XenAPIException,
                    org.apache.xmlrpc.XmlRpcException
Destroy the specified secret instance.

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

getUuid

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

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

getValue

public String getValue(Connection c)
                throws Types.BadServerResponse,
                       Types.XenAPIException,
                       org.apache.xmlrpc.XmlRpcException
Get the value field of the given secret.

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

setValue

public void setValue(Connection c,
                     String value)
              throws Types.BadServerResponse,
                     Types.XenAPIException,
                     org.apache.xmlrpc.XmlRpcException
Set the value field of the given secret.

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

getAll

public static Set<Secret> getAll(Connection c)
                          throws Types.BadServerResponse,
                                 Types.XenAPIException,
                                 org.apache.xmlrpc.XmlRpcException
Return a list of all the secrets known to the system.

Returns:
references to all objects
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getAllRecords

public static Map<Secret,Secret.Record> getAllRecords(Connection c)
                                               throws Types.BadServerResponse,
                                                      Types.XenAPIException,
                                                      org.apache.xmlrpc.XmlRpcException
Return a map of secret references to secret records for all secrets known to the system.

Returns:
records of all objects
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException