From ef16c27876daeec66fca4e0c7edb1f6fc163941c Mon Sep 17 00:00:00 2001 From: aozarov Date: Fri, 9 Oct 2015 09:06:21 -0700 Subject: [PATCH 1/2] add example usage for Storage.signUrl --- .../src/main/java/com/google/gcloud/storage/Storage.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gcloud-java-storage/src/main/java/com/google/gcloud/storage/Storage.java b/gcloud-java-storage/src/main/java/com/google/gcloud/storage/Storage.java index 2ce25a8190f3..2b74ae5fc5b3 100644 --- a/gcloud-java-storage/src/main/java/com/google/gcloud/storage/Storage.java +++ b/gcloud-java-storage/src/main/java/com/google/gcloud/storage/Storage.java @@ -632,6 +632,11 @@ public static Builder builder() { * is only valid within a certain time period. * This is particularly useful if you don't want publicly * accessible blobs, but don't want to require users to explicitly log in. + *

+ * Example usage of creating a signed URL that is valid for 2 weeks: + *

   {@code
+   *     service.signUrl(BlobInfo.of("bucket", "name"), TimeUnit.DAYS.toSeconds(14));
+   * }
* * @param blobInfo the blob associated with the signed url * @param expirationTimeInSeconds the signed URL expiration (using epoch time) From c8b282395b773394a417d35ad41071e1021af82f Mon Sep 17 00:00:00 2001 From: aozarov Date: Fri, 9 Oct 2015 09:56:31 -0700 Subject: [PATCH 2/2] make javadoc for Java 8 happy --- .../src/main/java/com/google/gcloud/storage/Storage.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcloud-java-storage/src/main/java/com/google/gcloud/storage/Storage.java b/gcloud-java-storage/src/main/java/com/google/gcloud/storage/Storage.java index 2b74ae5fc5b3..9d5f926edf65 100644 --- a/gcloud-java-storage/src/main/java/com/google/gcloud/storage/Storage.java +++ b/gcloud-java-storage/src/main/java/com/google/gcloud/storage/Storage.java @@ -632,7 +632,7 @@ public static Builder builder() { * is only valid within a certain time period. * This is particularly useful if you don't want publicly * accessible blobs, but don't want to require users to explicitly log in. - *

+ *

* Example usage of creating a signed URL that is valid for 2 weeks: *

   {@code
    *     service.signUrl(BlobInfo.of("bucket", "name"), TimeUnit.DAYS.toSeconds(14));
@@ -640,6 +640,7 @@ public static Builder builder() {
    *
    * @param blobInfo the blob associated with the signed url
    * @param  expirationTimeInSeconds the signed URL expiration (using epoch time)
+   * @param options optional URL signing options
    * @see Signed-URLs
    */
   URL signUrl(BlobInfo blobInfo, long expirationTimeInSeconds, SignUrlOption... options);