當前位置: 首頁>>代碼示例>>Java>>正文


Java SharedAccessTablePolicy類代碼示例

本文整理匯總了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());
}
 
開發者ID:Azure,項目名稱:azure-storage-android,代碼行數:46,代碼來源:SharedAccessSignatureHelper.java

示例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 */);
}
 
開發者ID:Azure,項目名稱:azure-storage-android,代碼行數:40,代碼來源:SharedAccessSignatureHelper.java


注:本文中的com.microsoft.azure.storage.table.SharedAccessTablePolicy類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。