本文整理匯總了Java中com.microsoft.azure.storage.core.BaseRequest.getListUriQueryBuilder方法的典型用法代碼示例。如果您正苦於以下問題:Java BaseRequest.getListUriQueryBuilder方法的具體用法?Java BaseRequest.getListUriQueryBuilder怎麽用?Java BaseRequest.getListUriQueryBuilder使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.microsoft.azure.storage.core.BaseRequest
的用法示例。
在下文中一共展示了BaseRequest.getListUriQueryBuilder方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: listShares
import com.microsoft.azure.storage.core.BaseRequest; //導入方法依賴的package包/類
/**
* Constructs a request to return a listing of all shares in this storage account. Sign with no length
* specified.
*
* @param uri
* A <code>java.net.URI</code> object that specifies the absolute URI.
* @param fileOptions
* A {@link FileRequestOptions} object that specifies execution options such as retry policy and timeout
* settings for the operation. Specify <code>null</code> to use the request options specified on the
* {@link CloudFileClient}.
* @param opContext
* An {@link OperationContext} object that represents the context for the current operation. This object
* is used to track requests to the storage service, and to provide additional runtime information about
* the operation.
* @param listingContext
* A set of parameters for the listing operation.
* @param detailsIncluded
* A <code>java.util.EnumSet</code> object that contains {@link ShareListingDetails} values that indicate
* whether share snapshots and/or metadata will be returned.
* @return a HttpURLConnection configured for the operation.
* @throws IOException
* @throws URISyntaxException
* @throws StorageException
* @throws IllegalArgumentException
*/
public static HttpURLConnection listShares(final URI uri, final FileRequestOptions fileOptions,
final OperationContext opContext, final ListingContext listingContext,
final EnumSet<ShareListingDetails> detailsIncluded) throws URISyntaxException, IOException, StorageException {
final UriQueryBuilder builder = BaseRequest.getListUriQueryBuilder(listingContext);
if (detailsIncluded != null && detailsIncluded.size() > 0) {
final StringBuilder sb = new StringBuilder();
boolean started = false;
if (detailsIncluded.contains(ShareListingDetails.SNAPSHOTS)) {
started = true;
sb.append(SNAPSHOTS_QUERY_ELEMENT_NAME);
}
if (detailsIncluded.contains(ShareListingDetails.METADATA)) {
if (started)
{
sb.append(",");
}
sb.append(Constants.QueryConstants.METADATA);
}
builder.add(Constants.QueryConstants.INCLUDE, sb.toString());
}
final HttpURLConnection request = BaseRequest.createURLConnection(uri, fileOptions, builder, opContext);
request.setRequestMethod(Constants.HTTP_GET);
return request;
}
示例2: listContainers
import com.microsoft.azure.storage.core.BaseRequest; //導入方法依賴的package包/類
/**
* Constructs a request to return a listing of all containers in this storage account. Sign with no length
* specified.
*
* @param uri
* A <code>java.net.URI</code> object that specifies the absolute URI.
* @param blobOptions
* A {@link BlobRequestOptions} object that specifies execution options such as retry policy and timeout
* settings for the operation. Specify <code>null</code> to use the request options specified on the
* {@link CloudBlobClient}.
* @param opContext
* An {@link OperationContext} object that represents the context for the current operation. This object
* is used to track requests to the storage service, and to provide additional runtime information about
* the operation.
* @param listingContext
* A set of parameters for the listing operation.
* @param detailsIncluded
* Additional details to return with the listing.
* @return a HttpURLConnection configured for the operation.
* @throws IOException
* @throws URISyntaxException
* @throws StorageException
* @throws IllegalArgumentException
*/
public static HttpURLConnection listContainers(final URI uri, final BlobRequestOptions blobOptions,
final OperationContext opContext, final ListingContext listingContext,
final ContainerListingDetails detailsIncluded) throws URISyntaxException, IOException, StorageException {
final UriQueryBuilder builder = BaseRequest.getListUriQueryBuilder(listingContext);
if (detailsIncluded == ContainerListingDetails.ALL || detailsIncluded == ContainerListingDetails.METADATA) {
builder.add(Constants.QueryConstants.INCLUDE, Constants.QueryConstants.METADATA);
}
final HttpURLConnection request = createURLConnection(uri, builder, blobOptions, opContext);
request.setRequestMethod(Constants.HTTP_GET);
return request;
}
示例3: list
import com.microsoft.azure.storage.core.BaseRequest; //導入方法依賴的package包/類
/**
* Constructs a web request to return a listing of all queues in this
* storage account. Sign the web request with a length of -1L.
*
* @param uri
* A <code>URI</code> object that specifies the absolute URI to
* the storage account.
* @param queueOptions
* A {@link QueueRequestOptions} object that specifies execution options such as retry policy and timeout
* settings for the operation. Specify <code>null</code> to use the request options specified on the
* {@link CloudQueueClient}.
* @param opContext
* An {@link OperationContext} object that represents the context
* for the current operation. This object is used to track
* requests to the storage service, and to provide additional
* runtime information about the operation.
* @param listingContext
* A {@link ListingContext} object that specifies parameters for
* the listing operation, if any. May be <code>null</code>.
* @param detailsIncluded
* A {@link QueueListingDetails} object that specifies additional
* details to return with the listing, if any. May be <code>null</code>.
* @return An <code>HttpURLConnection</code> configured for the specified
* operation.
*
* @throws IOException
* @throws URISyntaxException
* If the URI is not valid.
* @throws StorageException
* If a storage service error occurred during the operation.
*/
public static HttpURLConnection list(final URI uri, final QueueRequestOptions queueOptions,
final OperationContext opContext, final ListingContext listingContext,
final QueueListingDetails detailsIncluded) throws URISyntaxException, IOException, StorageException {
final UriQueryBuilder builder = BaseRequest.getListUriQueryBuilder(listingContext);
if (detailsIncluded == QueueListingDetails.ALL || detailsIncluded == QueueListingDetails.METADATA) {
builder.add(Constants.QueryConstants.INCLUDE, Constants.QueryConstants.METADATA);
}
final HttpURLConnection request = BaseRequest.createURLConnection(uri, queueOptions, builder, opContext);
request.setRequestMethod(Constants.HTTP_GET);
return request;
}