com.vmware.vcloud.sdk.admin
Class Right

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

public class Right
extends VcloudEntity<com.vmware.vcloud.api.rest.schema.RightType>

Helper class for the Right Resource in vCloud Admin API.

Author:
Administrator

Constructor Summary
Right(VcloudClient client, com.vmware.vcloud.api.rest.schema.RightType rightType)
          Constructor to create the Right
 
Method Summary
 Role addToRole(com.vmware.vcloud.api.rest.schema.ReferenceType roleRef)
          Add this right to a role.
 Role addToRole(String vCloudRoleId)
          Add this right to a role.
 void delete()
          Delete the right.
static void delete(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType rightRef)
          Delete the right.
 Role deleteFromRole(com.vmware.vcloud.api.rest.schema.ReferenceType roleRef)
          Delete this right from the specified role.
 Role deleteFromRole(String vCloudRoleId)
          Delete this right from the specified role.
static Right getRightById(VcloudClient client, String vCloudId)
          Get Right helper using the vCloud ID
static Right getRightByReference(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType rightRef)
          Returns the Right by ReferenceType
 
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
 

Constructor Detail

Right

public Right(VcloudClient client,
             com.vmware.vcloud.api.rest.schema.RightType rightType)
Constructor to create the Right

Parameters:
client -
rightType - RightType
Method Detail

getRightByReference

public static Right getRightByReference(VcloudClient client,
                                        com.vmware.vcloud.api.rest.schema.ReferenceType rightRef)
                                 throws VCloudException
Returns the Right by ReferenceType

Parameters:
client - VcloudClient
rightRef - ReferenceType
Returns:
Right
Throws:
VCloudException

getRightById

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

delete

public static void delete(VcloudClient client,
                          com.vmware.vcloud.api.rest.schema.ReferenceType rightRef)
                   throws VCloudException
Delete the right. Read Only rights cannot be deleted.

Parameters:
client -
rightRef -
Throws:
VCloudException
Since:
API 5.1, SDK 5.1

delete

public void delete()
            throws VCloudException
Delete the right. Read Only rights cannot be deleted.

Throws:
VCloudException
Since:
API 5.1, SDK 5.1

addToRole

public Role addToRole(com.vmware.vcloud.api.rest.schema.ReferenceType roleRef)
               throws VCloudException
Add this right to a role.

Parameters:
roleRef -
Returns:
Role
Throws:
VCloudException
Since:
API 1.5, SDK 5.5

addToRole

public Role addToRole(String vCloudRoleId)
               throws VCloudException
Add this right to a role.

Parameters:
vCloudRoleId - urn:vcloud:role:uuid
Returns:
Role
Throws:
VCloudException
Since:
API 1.5, SDK 5.5

deleteFromRole

public Role deleteFromRole(String vCloudRoleId)
                    throws VCloudException
Delete this right from the specified role.

Parameters:
vCloudRoleId - urn:vcloud:role:uuid
Returns:
Role
Throws:
VCloudException
Since:
API 1.5, SDK 5.5

deleteFromRole

public Role deleteFromRole(com.vmware.vcloud.api.rest.schema.ReferenceType roleRef)
                    throws VCloudException
Delete this right from the specified role.

Parameters:
roleRef -
Returns:
Role
Throws:
VCloudException
Since:
API 1.5, SDK 5.5


Copyright © 2016. All Rights Reserved.