com.vmware.vcloud.sdk.admin
Class Group

java.lang.Object
  extended by com.vmware.vcloud.sdk.VcloudResource<T>
      extended by com.vmware.vcloud.sdk.VcloudEntity<com.vmware.vcloud.api.rest.schema.GroupType>
          extended by com.vmware.vcloud.sdk.admin.Group

public class Group
extends VcloudEntity<com.vmware.vcloud.api.rest.schema.GroupType>

Helper class for the Group Resource in vCloud Admin API.

Author:
Administrator

Method Summary
 void delete()
          Delete Group
static void delete(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType groupRef)
          Delete Group
static Group getGroupById(VcloudClient client, String vCloudId)
          Get Group helper using the vCloud ID
static Group getGroupByReference(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType groupRef)
          Returns the group by reference
 com.vmware.vcloud.api.rest.schema.ReferenceType getRoleReference()
          Returns the role reference type
 com.vmware.vcloud.api.rest.schema.ReferenceType getUserRefByName(String userName)
          Returns the user reference by name
 Collection<com.vmware.vcloud.api.rest.schema.ReferenceType> getUserRefs()
          Returns a collection of all the user references
 HashMap<String,com.vmware.vcloud.api.rest.schema.ReferenceType> getUserRefsByName()
          Returns the user references by name
 Group updateGroup(com.vmware.vcloud.api.rest.schema.GroupType groupType)
          Updating the Group
 
Methods inherited from class com.vmware.vcloud.sdk.VcloudEntity
getMetadata, getReference, getTasks
 
Methods inherited from class com.vmware.vcloud.sdk.VcloudResource
getResource
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getGroupByReference

public static Group getGroupByReference(VcloudClient client,
                                        com.vmware.vcloud.api.rest.schema.ReferenceType groupRef)
                                 throws VCloudException
Returns the group by reference

Parameters:
client - VcloudClient
groupRef - ReferenceType
Returns:
Group
Throws:
VCloudException

getGroupById

public static Group getGroupById(VcloudClient client,
                                 String vCloudId)
                          throws VCloudException
Get Group helper using the vCloud ID

Parameters:
client - VcloudClient
vCloudId - format - The vCloud ID is of the form: "urn:vcloud:type:uuid". For example: "urn:vcloud:media:d9d976ba-e0ec-4682-a67d-380af49b54e1". String
Returns:
Group
Throws:
VCloudException
Since:
API 1.5, SDK 1.5

updateGroup

public Group updateGroup(com.vmware.vcloud.api.rest.schema.GroupType groupType)
                  throws VCloudException
Updating the Group

Parameters:
groupType - GroupType
Returns:
Group
Throws:
VCloudException

delete

public void delete()
            throws VCloudException
Delete Group

Throws:
VCloudException

delete

public static void delete(VcloudClient client,
                          com.vmware.vcloud.api.rest.schema.ReferenceType groupRef)
                   throws VCloudException
Delete Group

Parameters:
client - vCloud Client VcloudClient
groupRef - Group Ref
Throws:
VCloudException

getRoleReference

public com.vmware.vcloud.api.rest.schema.ReferenceType getRoleReference()
                                                                 throws VCloudException
Returns the role reference type

Returns:
ReferenceType
Throws:
VCloudException

getUserRefsByName

public HashMap<String,com.vmware.vcloud.api.rest.schema.ReferenceType> getUserRefsByName()
Returns the user references by name

Returns:
the userRefsByName HashMap

getUserRefs

public Collection<com.vmware.vcloud.api.rest.schema.ReferenceType> getUserRefs()
Returns a collection of all the user references

Returns:
Collection

getUserRefByName

public com.vmware.vcloud.api.rest.schema.ReferenceType getUserRefByName(String userName)
Returns the user reference by name

Parameters:
userName -
Returns:
ReferenceType


Copyright © 2016. All Rights Reserved.