com.vmware.vcloud.sdk.admin
Class User

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

public class User
extends VcloudEntity<com.vmware.vcloud.api.rest.schema.UserType>

Helper class for the User Resource in vCloud Admin API.

See Also:
UserType

Method Summary
 void delete()
          Delete User
static void delete(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType userRef)
          Delete User
 List<com.vmware.vcloud.api.rest.schema.extension.EntityRightsType> getEntityRights(List<com.vmware.vcloud.api.rest.schema.ReferenceType> entityRefs)
          Queries user privileges on a set of entities
 List<com.vmware.vcloud.api.rest.schema.ReferenceType> getGrantedRights()
          Queries user granted privileges
 com.vmware.vcloud.api.rest.schema.ReferenceType getGroupRefByName(String groupName)
          Returns the Group ReferenceType By name
 Collection<com.vmware.vcloud.api.rest.schema.ReferenceType> getGroupRefs()
          Returns the group references
 HashMap<String,com.vmware.vcloud.api.rest.schema.ReferenceType> getGroupRefsByName()
          Returns the group references by name
 com.vmware.vcloud.api.rest.schema.ReferenceType getRoleReference()
          Returns the User's Role reference type
static User getUserById(VcloudClient client, String vCloudId)
          Get User helper using the vCloud ID
static User getUserByReference(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType userRef)
          Returns the User By ReferenceType
 void takeOwnership()
          Takes ownership of specified user's vApps, media, and catalogs.
static void takeOwnership(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType userRef)
          Takes ownership of specified user's vApps, media, and catalogs.
 void unlock()
          Unlocks the user.
static void unlock(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType userRef)
          Unlocks the user.
 User updateUser(com.vmware.vcloud.api.rest.schema.UserType userType)
          Updating the User
 
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

getUserByReference

public static User getUserByReference(VcloudClient client,
                                      com.vmware.vcloud.api.rest.schema.ReferenceType userRef)
                               throws VCloudException
Returns the User By ReferenceType

Parameters:
client - VcloudClient
userRef - ReferenceType
Returns:
User
Throws:
VCloudException
See Also:
AdminOrganization.getUserRefs(), AdminOrganization.getUserRefsByName(), AdminOrganization.getUserRefByName(String)

getUserById

public static User getUserById(VcloudClient client,
                               String vCloudId)
                        throws VCloudException
Get User 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:
User
Throws:
VCloudException
Since:
API 1.5, SDK 1.5

updateUser

public User updateUser(com.vmware.vcloud.api.rest.schema.UserType userType)
                throws VCloudException
Updating the User

Parameters:
userType - UserType
Returns:
User
Throws:
VCloudException

delete

public void delete()
            throws VCloudException
Delete User

Throws:
VCloudException

delete

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

Parameters:
client - vCloud Client VcloudClient
userRef - User Ref
Throws:
VCloudException

unlock

public void unlock()
            throws VCloudException
Unlocks the user.

Throws:
VCloudException
Since:
API 1.5, SDK 1.5

unlock

public static void unlock(VcloudClient client,
                          com.vmware.vcloud.api.rest.schema.ReferenceType userRef)
                   throws VCloudException
Unlocks the user.

Parameters:
client - VcloudClient
userRef - ReferenceType
Throws:
VCloudException
Since:
API 1.5, SDK 1.5

getRoleReference

public com.vmware.vcloud.api.rest.schema.ReferenceType getRoleReference()
                                                                 throws VCloudException
Returns the User's Role reference type

Returns:
ReferenceType
Throws:
VCloudException

getGroupRefsByName

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

Returns:
HashMap

getGroupRefByName

public com.vmware.vcloud.api.rest.schema.ReferenceType getGroupRefByName(String groupName)
Returns the Group ReferenceType By name

Parameters:
groupName -
Returns:
ReferenceType

getGroupRefs

public Collection<com.vmware.vcloud.api.rest.schema.ReferenceType> getGroupRefs()
Returns the group references

Returns:
Collection

getEntityRights

public List<com.vmware.vcloud.api.rest.schema.extension.EntityRightsType> getEntityRights(List<com.vmware.vcloud.api.rest.schema.ReferenceType> entityRefs)
                                                                                   throws VCloudException
Queries user privileges on a set of entities

Parameters:
entityRefs -
Returns:
List<EntityRightsType>
Throws:
VCloudException
Since:
API 5.1, SDK 5.1

getGrantedRights

public List<com.vmware.vcloud.api.rest.schema.ReferenceType> getGrantedRights()
                                                                       throws VCloudException
Queries user granted privileges

Returns:
List<ReferenceType>
Throws:
VCloudException
Since:
API 5.1, SDK 5.1

takeOwnership

public void takeOwnership()
                   throws VCloudException
Takes ownership of specified user's vApps, media, and catalogs.

Throws:
VCloudException
Since:
API 5.6, SDK 5.6

takeOwnership

public static void takeOwnership(VcloudClient client,
                                 com.vmware.vcloud.api.rest.schema.ReferenceType userRef)
                          throws VCloudException
Takes ownership of specified user's vApps, media, and catalogs.

Parameters:
client - VcloudClient
userRef - ReferenceType
Throws:
VCloudException
Since:
API 5.6, SDK 5.6


Copyright © 2016. All Rights Reserved.