/** * Constructs a web request to return the user-defined metadata for this container. 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 accessCondition * An {@link AccessCondition} object that represents the access conditions for the container. * @return a HttpURLConnection configured for the operation. * @throws StorageException * */ private static HttpURLConnection getProperties(final URI uri, final BlobRequestOptions blobOptions, final OperationContext opContext, AccessCondition accessCondition, final UriQueryBuilder builder) throws IOException, URISyntaxException, StorageException { HttpURLConnection request = BaseRequest.getProperties(uri, blobOptions, builder, opContext); if (accessCondition != null) { accessCondition.applyLeaseConditionToRequest(request); } return request; }
/** * Constructs a web request to return the user-defined metadata for this container. 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 accessCondition * An {@link AccessCondition} object that represents the access conditions for the container. * @return a HttpURLConnection configured for the operation. * @throws StorageException * */ private static HttpURLConnection getProperties(final URI uri, final BlobRequestOptions blobOptions, final OperationContext opContext, AccessCondition accessCondition, final UriQueryBuilder builder) throws IOException, URISyntaxException, StorageException { HttpURLConnection request = BaseRequest.getProperties(uri, blobOptions, builder, opContext); if (accessCondition != null) { accessCondition.applyLeaseConditionToRequest(request); } return request; }
/** * RESERVED FOR INTERNAL USE. Applies the access conditions to the request. * * @param request * A <code>java.net.HttpURLConnection</code> object that represents the request * to which the condition is being applied. */ public void applyConditionToRequest(final HttpURLConnection request) { applyLeaseConditionToRequest(request); if (this.ifModifiedSinceDate != null) { request.setRequestProperty(Constants.HeaderConstants.IF_MODIFIED_SINCE, Utility.getGMTTime(this.ifModifiedSinceDate)); } if (this.ifUnmodifiedSinceDate != null) { request.setRequestProperty(Constants.HeaderConstants.IF_UNMODIFIED_SINCE, Utility.getGMTTime(this.ifUnmodifiedSinceDate)); } if (!Utility.isNullOrEmpty(this.ifMatchETag)) { request.setRequestProperty(Constants.HeaderConstants.IF_MATCH, this.ifMatchETag); } if (!Utility.isNullOrEmpty(this.ifNoneMatchETag)) { request.setRequestProperty(Constants.HeaderConstants.IF_NONE_MATCH, this.ifNoneMatchETag); } }
accessCondition.applyLeaseConditionToRequest(request);
/** * RESERVED FOR INTERNAL USE. Applies the access conditions to the request. * * @param request * A <code>java.net.HttpURLConnection</code> object that represents the request * to which the condition is being applied. */ public void applyConditionToRequest(final HttpURLConnection request) { applyLeaseConditionToRequest(request); if (this.ifModifiedSinceDate != null) { request.setRequestProperty(Constants.HeaderConstants.IF_MODIFIED_SINCE, Utility.getGMTTime(this.ifModifiedSinceDate)); } if (this.ifUnmodifiedSinceDate != null) { request.setRequestProperty(Constants.HeaderConstants.IF_UNMODIFIED_SINCE, Utility.getGMTTime(this.ifUnmodifiedSinceDate)); } if (!Utility.isNullOrEmpty(this.ifMatchETag)) { request.setRequestProperty(Constants.HeaderConstants.IF_MATCH, this.ifMatchETag); } if (!Utility.isNullOrEmpty(this.ifNoneMatchETag)) { request.setRequestProperty(Constants.HeaderConstants.IF_NONE_MATCH, this.ifNoneMatchETag); } }
accessCondition.applyLeaseConditionToRequest(request);
accessCondition.applyLeaseConditionToRequest(request);
accessCondition.applyLeaseConditionToRequest(request);
/** * Constructs a web request to return the ACL for this container. Sign with no length specified. * * @param uri * The absolute URI to the container. * @param accessCondition * An {@link AccessCondition} object that represents the access conditions for the container. * @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. * @return a HttpURLConnection configured for the operation. * @throws StorageException */ public static HttpURLConnection getAcl(final URI uri, final BlobRequestOptions blobOptions, final AccessCondition accessCondition, final OperationContext opContext) throws IOException, URISyntaxException, StorageException { final UriQueryBuilder builder = getContainerUriQueryBuilder(); builder.add(Constants.QueryConstants.COMPONENT, Constants.QueryConstants.ACL); final HttpURLConnection request = createURLConnection(uri, builder, blobOptions, opContext); request.setRequestMethod(Constants.HTTP_GET); if (accessCondition != null) { accessCondition.applyLeaseConditionToRequest(request); } return request; }
accessCondition.applyLeaseConditionToRequest(request);
accessCondition.applyLeaseConditionToRequest(request);
/** * Constructs a web request to return the ACL for this container. Sign with no length specified. * * @param uri * The absolute URI to the container. * @param timeout * The server timeout interval. * @param accessCondition * An {@link AccessCondition} object that represents the access conditions for the container. * @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. * @return a HttpURLConnection configured for the operation. * @throws StorageException */ public static HttpURLConnection getAcl(final URI uri, final BlobRequestOptions blobOptions, final AccessCondition accessCondition, final OperationContext opContext) throws IOException, URISyntaxException, StorageException { final UriQueryBuilder builder = getContainerUriQueryBuilder(); builder.add(Constants.QueryConstants.COMPONENT, Constants.QueryConstants.ACL); final HttpURLConnection request = createURLConnection(uri, builder, blobOptions, opContext); request.setRequestMethod(Constants.HTTP_GET); if (accessCondition != null) { accessCondition.applyLeaseConditionToRequest(request); } return request; }
accessCondition.applyLeaseConditionToRequest(request);
accessCondition.applyLeaseConditionToRequest(request);
/** * Constructs a web request to return the ACL for this share. Sign with no length specified. * * @param uri * The absolute URI to the share. * @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 accessCondition * An {@link AccessCondition} object that represents the access conditions for the share. * @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. * @return a HttpURLConnection configured for the operation. * @throws StorageException */ public static HttpURLConnection getAcl(final URI uri, final FileRequestOptions fileOptions, final AccessCondition accessCondition, final OperationContext opContext) throws IOException, URISyntaxException, StorageException { final UriQueryBuilder builder = getShareUriQueryBuilder(); builder.add(Constants.QueryConstants.COMPONENT, Constants.QueryConstants.ACL); final HttpURLConnection request = BaseRequest.createURLConnection(uri, fileOptions, builder, opContext); request.setRequestMethod(Constants.HTTP_GET); if (accessCondition != null && !Utility.isNullOrEmpty(accessCondition.getLeaseID())) { accessCondition.applyLeaseConditionToRequest(request); } return request; }
/** * Constructs a web request to return the ACL for this share. Sign with no length specified. * * @param uri * The absolute URI to the share. * @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 accessCondition * An {@link AccessCondition} object that represents the access conditions for the share. * @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. * @return a HttpURLConnection configured for the operation. * @throws StorageException */ public static HttpURLConnection getAcl(final URI uri, final FileRequestOptions fileOptions, final AccessCondition accessCondition, final OperationContext opContext) throws IOException, URISyntaxException, StorageException { final UriQueryBuilder builder = getShareUriQueryBuilder(); builder.add(Constants.QueryConstants.COMPONENT, Constants.QueryConstants.ACL); final HttpURLConnection request = BaseRequest.createURLConnection(uri, fileOptions, builder, opContext); request.setRequestMethod(Constants.HTTP_GET); if (accessCondition != null && !Utility.isNullOrEmpty(accessCondition.getLeaseID())) { accessCondition.applyLeaseConditionToRequest(request); } return request; }