本文整理汇总了Java中com.microsoft.azure.storage.table.SharedAccessTablePolicy类的典型用法代码示例。如果您正苦于以下问题:Java SharedAccessTablePolicy类的具体用法?Java SharedAccessTablePolicy怎么用?Java SharedAccessTablePolicy使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SharedAccessTablePolicy类属于com.microsoft.azure.storage.table包,在下文中一共展示了SharedAccessTablePolicy类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: generateSharedAccessSignatureForTable
import com.microsoft.azure.storage.table.SharedAccessTablePolicy; //导入依赖的package包/类
/**
* Get the complete query builder for creating the Shared Access Signature query.
*/
public static UriQueryBuilder generateSharedAccessSignatureForTable(final SharedAccessTablePolicy policy,
final String startPartitionKey, final String startRowKey, final String endPartitionKey,
final String endRowKey, final String accessPolicyIdentifier, final String tableName,
final String signature, final String accountKeyName) throws StorageException {
Utility.assertNotNull("tableName", tableName);
return generateSharedAccessSignatureHelper(policy, startPartitionKey, startRowKey, endPartitionKey, endRowKey,
accessPolicyIdentifier, null /* resourceType */, tableName, signature, accountKeyName, null /* headers */);
}
开发者ID:horizon-institute,项目名称:runspotrun-android-client,代码行数:12,代码来源:SharedAccessSignatureHelper.java
示例2: generateSharedAccessSignatureHashForTable
import com.microsoft.azure.storage.table.SharedAccessTablePolicy; //导入依赖的package包/类
/**
* Get the signature hash embedded inside the Shared Access Signature for the table service.
*
* @param policy
* The shared access policy to hash.
* @param accessPolicyIdentifier
* An optional identifier for the policy.
* @param resourceName
* The resource name.
* @param ipRange
* The range of IP addresses to hash.
* @param protocols
* The Internet protocols to hash.
* @param startPartitionKey
* An optional restriction of the beginning of the range of partition keys to hash.
* @param startRowKey
* An optional restriction of the beginning of the range of row keys to hash.
* @param endPartitionKey
* An optional restriction of the end of the range of partition keys to hash.
* @param endRowKey
* An optional restriction of the end of the range of row keys to hash.
* @param client
* The ServiceClient associated with the object.
*
* @return The signature hash embedded inside the Shared Access Signature.
* @throws InvalidKeyException
* @throws StorageException
*/
public static String generateSharedAccessSignatureHashForTable(
final SharedAccessTablePolicy policy, final String accessPolicyIdentifier, final String resourceName,
final IPRange ipRange, final SharedAccessProtocols protocols, final String startPartitionKey,
final String startRowKey, final String endPartitionKey, final String endRowKey, final ServiceClient client)
throws InvalidKeyException, StorageException {
String stringToSign = generateSharedAccessSignatureStringToSign(
policy, resourceName, ipRange, protocols, accessPolicyIdentifier);
stringToSign = String.format("%s\n%s\n%s\n%s\n%s", stringToSign,
startPartitionKey == null ? Constants.EMPTY_STRING : startPartitionKey,
startRowKey == null ? Constants.EMPTY_STRING : startRowKey,
endPartitionKey == null ? Constants.EMPTY_STRING : endPartitionKey,
endRowKey == null ? Constants.EMPTY_STRING : endRowKey);
return generateSharedAccessSignatureHashHelper(stringToSign, client.getCredentials());
}
示例3: generateSharedAccessSignatureHashForTable
import com.microsoft.azure.storage.table.SharedAccessTablePolicy; //导入依赖的package包/类
/**
* Get the signature hash embedded inside the Shared Access Signature for blob service.
*
* @param policy
* The shared access policy to hash.
* @param accessPolicyIdentifier
* An optional identifier for the policy.
* @param resourceName
* The resource name.
* @param client
* The ServiceClient associated with the object.
* @param opContext
* An object used to track the execution of the operation
* @return The signature hash embedded inside the Shared Access Signature.
* @throws InvalidKeyException
* @throws StorageException
*/
public static String generateSharedAccessSignatureHashForTable(final SharedAccessTablePolicy policy,
final String accessPolicyIdentifier, final String resourceName, final String startPartitionKey,
final String startRowKey, final String endPartitionKey, final String endRowKey, final ServiceClient client,
final OperationContext opContext) throws InvalidKeyException, StorageException {
return generateSharedAccessSignatureHashForQueueAndTable(policy, resourceName, accessPolicyIdentifier, true,
startPartitionKey, startRowKey, endPartitionKey, endRowKey, client, opContext);
}
开发者ID:horizon-institute,项目名称:runspotrun-android-client,代码行数:26,代码来源:SharedAccessSignatureHelper.java
示例4: generateSharedAccessSignatureForTable
import com.microsoft.azure.storage.table.SharedAccessTablePolicy; //导入依赖的package包/类
/**
* Get the complete query builder for creating the Shared Access Signature query.
*
* @param policy
* The shared access policy for the shared access signature.
* @param startPartitionKey
* An optional restriction of the beginning of the range of partition keys to include.
* @param startRowKey
* An optional restriction of the beginning of the range of row keys to include.
* @param endPartitionKey
* An optional restriction of the end of the range of partition keys to include.
* @param endRowKey
* An optional restriction of the end of the range of row keys to include.
* @param accessPolicyIdentifier
* An optional identifier for the policy.
* @param ipRange
* The range of IP addresses for the shared access signature.
* @param protocols
* The Internet protocols for the shared access signature.
* @param tableName
* The table name.
* @param signature
* The signature to use.
*
* @return The finished query builder
* @throws IllegalArgumentException
* @throws StorageException
*/
public static UriQueryBuilder generateSharedAccessSignatureForTable(
final SharedAccessTablePolicy policy, final String startPartitionKey, final String startRowKey,
final String endPartitionKey, final String endRowKey, final String accessPolicyIdentifier,
final IPRange ipRange, final SharedAccessProtocols protocols, final String tableName, final String signature)
throws StorageException {
Utility.assertNotNull("tableName", tableName);
return generateSharedAccessSignatureHelper(
policy, startPartitionKey, startRowKey, endPartitionKey, endRowKey, accessPolicyIdentifier,
null /* resourceType */, ipRange, protocols, tableName, signature, null /* headers */);
}