/** * Constructs a web request to set user-defined metadata for the share, Sign with 0 Length. * * @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 accessCondition * An {@link AccessCondition} object that represents the access conditions for the share. * @return a HttpURLConnection configured for the operation. * @throws StorageException * */ public static HttpURLConnection setShareMetadata(final URI uri, final FileRequestOptions fileOptions, final OperationContext opContext, final AccessCondition accessCondition) throws IOException, URISyntaxException, StorageException { final UriQueryBuilder shareBuilder = getShareUriQueryBuilder(); return setMetadata(uri, fileOptions, opContext, accessCondition, shareBuilder); }
/** * Constructs a web request to return the user-defined metadata for this share. 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 accessCondition * An {@link AccessCondition} object that represents the access conditions for the share. * @param snapshotVersion * the snapshot version to the query builder. * @return a HttpURLConnection configured for the operation. * @throws StorageException * */ public static HttpURLConnection getShareProperties(final URI uri, final FileRequestOptions fileOptions, final OperationContext opContext, AccessCondition accessCondition, final String snapshotVersion) throws IOException, URISyntaxException, StorageException { final UriQueryBuilder shareBuilder = getShareUriQueryBuilder(); return getProperties(uri, fileOptions, opContext, accessCondition, shareBuilder, snapshotVersion); }
/** * Constructs a web request to return the user-defined metadata for this share. 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 accessCondition * An {@link AccessCondition} object that represents the access conditions for the share. * @param snapshotVersion * the snapshot version to the query builder. * @return a HttpURLConnection configured for the operation. * @throws StorageException * */ public static HttpURLConnection getShareProperties(final URI uri, final FileRequestOptions fileOptions, final OperationContext opContext, AccessCondition accessCondition, final String snapshotVersion) throws IOException, URISyntaxException, StorageException { final UriQueryBuilder shareBuilder = getShareUriQueryBuilder(); return getProperties(uri, fileOptions, opContext, accessCondition, shareBuilder, snapshotVersion); }
/** * Constructs a web request to set user-defined metadata for the share, Sign with 0 Length. * * @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 accessCondition * An {@link AccessCondition} object that represents the access conditions for the share. * @return a HttpURLConnection configured for the operation. * @throws StorageException * */ public static HttpURLConnection setShareMetadata(final URI uri, final FileRequestOptions fileOptions, final OperationContext opContext, final AccessCondition accessCondition) throws IOException, URISyntaxException, StorageException { final UriQueryBuilder shareBuilder = getShareUriQueryBuilder(); return setMetadata(uri, fileOptions, opContext, accessCondition, shareBuilder); }
/** * Constructs a web request to return the stats, such as usage, for this share. Sign with no length specified. * * @param uri * A <code>java.net.URI</code> object that specifies the absolute URI. * @param options * 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. * * @return a HttpURLConnection configured for the operation. * @throws StorageException */ public static HttpURLConnection getShareStats(final URI uri, final FileRequestOptions options, final OperationContext opContext) throws IOException, URISyntaxException, StorageException { UriQueryBuilder shareBuilder = getShareUriQueryBuilder(); shareBuilder.add(Constants.QueryConstants.COMPONENT, Constants.QueryConstants.STATS); final HttpURLConnection retConnection = BaseRequest.createURLConnection(uri, options, shareBuilder, opContext); retConnection.setRequestMethod(Constants.HTTP_GET); return retConnection; }
/** * Constructs a web request to return the stats, such as usage, for this share. Sign with no length specified. * * @param uri * A <code>java.net.URI</code> object that specifies the absolute URI. * @param options * 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. * * @return a HttpURLConnection configured for the operation. * @throws StorageException */ public static HttpURLConnection getShareStats(final URI uri, final FileRequestOptions options, final OperationContext opContext) throws IOException, URISyntaxException, StorageException { UriQueryBuilder shareBuilder = getShareUriQueryBuilder(); shareBuilder.add(Constants.QueryConstants.COMPONENT, Constants.QueryConstants.STATS); final HttpURLConnection retConnection = BaseRequest.createURLConnection(uri, options, shareBuilder, opContext); retConnection.setRequestMethod(Constants.HTTP_GET); return retConnection; }
/** * Constructs a web request to create a new share. Sign with 0 length. * * @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 properties * The properties to set for the share. * @return a HttpURLConnection configured for the operation. * @throws StorageException * @throws IllegalArgumentException */ public static HttpURLConnection createShare(final URI uri, final FileRequestOptions fileOptions, final OperationContext opContext, final FileShareProperties properties) throws IOException, URISyntaxException, StorageException { final UriQueryBuilder shareBuilder = getShareUriQueryBuilder(); final HttpURLConnection request = BaseRequest.create(uri, fileOptions, shareBuilder, opContext); addProperties(request, properties); return request; }
/** * Constructs a web request to create a new share. Sign with 0 length. * * @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 properties * The properties to set for the share. * @return a HttpURLConnection configured for the operation. * @throws StorageException * @throws IllegalArgumentException */ public static HttpURLConnection createShare(final URI uri, final FileRequestOptions fileOptions, final OperationContext opContext, final FileShareProperties properties) throws IOException, URISyntaxException, StorageException { final UriQueryBuilder shareBuilder = getShareUriQueryBuilder(); final HttpURLConnection request = BaseRequest.create(uri, fileOptions, shareBuilder, opContext); addProperties(request, properties); return request; }
final OperationContext opContext, final AccessCondition accessCondition, final FileShareProperties properties) throws IOException, URISyntaxException, StorageException { final UriQueryBuilder builder = getShareUriQueryBuilder(); builder.add(Constants.QueryConstants.COMPONENT, Constants.QueryConstants.PROPERTIES);
final OperationContext opContext, final AccessCondition accessCondition, final FileShareProperties properties) throws IOException, URISyntaxException, StorageException { final UriQueryBuilder builder = getShareUriQueryBuilder(); builder.add(Constants.QueryConstants.COMPONENT, Constants.QueryConstants.PROPERTIES);
final OperationContext opContext, final AccessCondition accessCondition, String snapshotVersion, DeleteShareSnapshotsOption deleteSnapshotsOption) throws IOException, URISyntaxException, StorageException { final UriQueryBuilder shareBuilder = getShareUriQueryBuilder(); FileRequest.addShareSnapshot(shareBuilder, snapshotVersion); HttpURLConnection request = BaseRequest.delete(uri, fileOptions, shareBuilder, opContext);
final OperationContext opContext, final AccessCondition accessCondition, String snapshotVersion, DeleteShareSnapshotsOption deleteSnapshotsOption) throws IOException, URISyntaxException, StorageException { final UriQueryBuilder shareBuilder = getShareUriQueryBuilder(); FileRequest.addShareSnapshot(shareBuilder, snapshotVersion); HttpURLConnection request = BaseRequest.delete(uri, fileOptions, shareBuilder, opContext);
final OperationContext opContext, final AccessCondition accessCondition) throws IOException, URISyntaxException, StorageException { final UriQueryBuilder builder = getShareUriQueryBuilder(); builder.add(Constants.QueryConstants.COMPONENT, Constants.QueryConstants.ACL);
final OperationContext opContext, final AccessCondition accessCondition) throws IOException, URISyntaxException, StorageException { final UriQueryBuilder builder = getShareUriQueryBuilder(); builder.add(Constants.QueryConstants.COMPONENT, Constants.QueryConstants.ACL);
/** * 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; }