public class Subject extends XenAPIObject
| Modifier and Type | Class and Description |
|---|---|
static class |
Subject.Record
Represents all the fields in a Subject
|
| Modifier and Type | Field and Description |
|---|---|
protected String |
ref
The XenAPI reference to this object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addToRoles(Connection c,
Role role)
This call adds a new role to a subject
|
static Subject |
create(Connection c,
Subject.Record record)
Create a new subject instance, and return its handle.
|
static Task |
createAsync(Connection c,
Subject.Record record)
Create a new subject instance, and return its handle.
|
void |
destroy(Connection c)
Destroy the specified subject instance.
|
Task |
destroyAsync(Connection c)
Destroy the specified subject instance.
|
boolean |
equals(Object obj)
If obj is a Subject, compares XenAPI references for equality.
|
static Set<Subject> |
getAll(Connection c)
Return a list of all the subjects known to the system.
|
static Map<Subject,Subject.Record> |
getAllRecords(Connection c)
Return a map of subject references to subject records for all subjects known to the system.
|
static Subject |
getByUuid(Connection c,
String uuid)
Get a reference to the subject instance with the specified UUID.
|
Map<String,String> |
getOtherConfig(Connection c)
Get the other_config field of the given subject.
|
Set<String> |
getPermissionsNameLabel(Connection c)
This call returns a list of permission names given a subject
|
Subject.Record |
getRecord(Connection c)
Get a record containing the current state of the given subject.
|
Set<Role> |
getRoles(Connection c)
Get the roles field of the given subject.
|
String |
getSubjectIdentifier(Connection c)
Get the subject_identifier field of the given subject.
|
String |
getUuid(Connection c)
Get the uuid field of the given subject.
|
int |
hashCode() |
void |
removeFromRoles(Connection c,
Role role)
This call removes a role from a subject
|
String |
toWireString() |
protected final String ref
public String toWireString()
toWireString in class XenAPIObjectpublic boolean equals(Object obj)
public Subject.Record getRecord(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic static Subject getByUuid(Connection c, String uuid) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
uuid - UUID of object to returnTypes.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic static Task createAsync(Connection c, Subject.Record record) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
record - All constructor argumentsTypes.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic static Subject create(Connection c, Subject.Record record) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
record - All constructor argumentsTypes.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic Task destroyAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic void destroy(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic String getUuid(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic String getSubjectIdentifier(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic Map<String,String> getOtherConfig(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic Set<Role> getRoles(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic void addToRoles(Connection c, Role role) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
role - The unique role referenceTypes.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic void removeFromRoles(Connection c, Role role) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
role - The unique role reference in the subject's roles fieldTypes.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic Set<String> getPermissionsNameLabel(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic static Set<Subject> getAll(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic static Map<Subject,Subject.Record> getAllRecords(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcException