Permission Class
- java.
lang. Object - com.
microsoft. azure. documentdb. JsonSerializable - com.
microsoft. azure. documentdb. Resource - com.
microsoft. azure. documentdb. Permission
- com.
- com.
- com.
public class Permission
extends Resource
Represents a per-User Permission to access a specific resource e.g. Document or Collection in the Azure Cosmos DB database service.
Constructor Summary
Constructor | Description |
---|---|
Permission() |
Initialize a permission object. |
Permission(String jsonString) |
Initialize a permission object from json string. |
Permission(JSONObject jsonObject) |
Initialize a permission object from json object. |
Method Summary
Modifier and Type | Method and Description |
---|---|
Permission |
getPermissionMode()
Gets the permission mode. |
java.lang.String |
getResourceLink()
Gets the self-link of resource to which the permission applies. |
Partition |
getResourcePartitionKey()
Gets the resource partition key associated with this permission object. |
java.lang.String |
getToken()
Gets the access token granting the defined permission. |
void |
setPermissionMode(PermissionMode permissionMode)
Sets the permission mode. |
void |
setResourceLink(String resourceLink)
Sets the self-link of resource to which the permission applies. |
void |
setResourcePartitionKey(PartitionKey partitionkey)
Sets the resource partition key associated with this permission object. |
Methods inherited from JsonSerializable
Methods inherited from Resource
Methods inherited from java.lang.Object
Constructor Details
Permission
public Permission()
Initialize a permission object.
Permission
public Permission(String jsonString)
Initialize a permission object from json string.
Parameters:
Permission
public Permission(JSONObject jsonObject)
Initialize a permission object from json object.
Parameters:
Method Details
getPermissionMode
public PermissionMode getPermissionMode()
Gets the permission mode.
Returns:
getResourceLink
public String getResourceLink()
Gets the self-link of resource to which the permission applies.
Returns:
getResourcePartitionKey
public PartitionKey getResourcePartitionKey()
Gets the resource partition key associated with this permission object.
Returns:
getToken
public String getToken()
Gets the access token granting the defined permission.
Returns:
setPermissionMode
public void setPermissionMode(PermissionMode permissionMode)
Sets the permission mode.
Parameters:
setResourceLink
public void setResourceLink(String resourceLink)
Sets the self-link of resource to which the permission applies.
Parameters:
setResourcePartitionKey
public void setResourcePartitionKey(PartitionKey partitionkey)
Sets the resource partition key associated with this permission object.
Parameters:
Applies to
Azure SDK for Java