diff --git a/gcloud-java-core/README.md b/gcloud-java-core/README.md index 80b4bf597549..0c0fe936411b 100644 --- a/gcloud-java-core/README.md +++ b/gcloud-java-core/README.md @@ -1,17 +1,15 @@ -Google Cloud Java Client -========================== +Google Cloud Java Client -- Core Services +========================================= -Java idiomatic client for [Google Cloud Platform][cloud-platform] services. +This module provides common functionality required by service-specific modules of this library. [![Build Status](https://travis-ci.org/GoogleCloudPlatform/gcloud-java.svg?branch=master)](https://travis-ci.org/GoogleCloudPlatform/gcloud-java) [![Coverage Status](https://coveralls.io/repos/GoogleCloudPlatform/gcloud-java/badge.svg?branch=master)](https://coveralls.io/r/GoogleCloudPlatform/gcloud-java?branch=master) - [Homepage] (https://googlecloudplatform.github.io/gcloud-java/) -- [API Documentation] (http://googlecloudplatform.github.io/gcloud-java/apidocs) +- [API Documentation] (http://googlecloudplatform.github.io/gcloud-java/apidocs/index.html?com/google/gcloud/package-summary.html) - [Examples] (http://googlecloudplatform.github.io/gcloud-java/apidocs/index.html?com/google/gcloud/examples/package-summary.html) -This module provides common functionality and is required by the other service specific modules. - Quickstart ---------- Add this to your pom.xml file diff --git a/gcloud-java-datastore/README.md b/gcloud-java-datastore/README.md index 0f0724e45e78..2e82a11d05cc 100644 --- a/gcloud-java-datastore/README.md +++ b/gcloud-java-datastore/README.md @@ -1,18 +1,15 @@ -Google Cloud Java Client -========================== +Google Cloud Java Client for Datastore +====================================== -Java idiomatic client for [Google Cloud Platform][cloud-platform] services. +Java idiomatic client for [Google Cloud Datastore] (https://cloud.google.com/datastore/). [![Build Status](https://travis-ci.org/GoogleCloudPlatform/gcloud-java.svg?branch=master)](https://travis-ci.org/GoogleCloudPlatform/gcloud-java) [![Coverage Status](https://coveralls.io/repos/GoogleCloudPlatform/gcloud-java/badge.svg?branch=master)](https://coveralls.io/r/GoogleCloudPlatform/gcloud-java?branch=master) - [Homepage] (https://googlecloudplatform.github.io/gcloud-java/) -- [API Documentation] (http://googlecloudplatform.github.io/gcloud-java/apidocs) +- [API Documentation] (http://googlecloudplatform.github.io/gcloud-java/apidocs/index.html?com/google/gcloud/datastore/package-summary.html) - [Examples] (http://googlecloudplatform.github.io/gcloud-java/apidocs/index.html?com/google/gcloud/examples/package-summary.html) -This client supports [Google Cloud Datastore] (https://cloud.google.com/datastore/) - - > Note: This client is a work-in-progress, and may occasionally > make backwards-incompatible changes. diff --git a/gcloud-java-examples/README.md b/gcloud-java-examples/README.md index 7cad3aad86ef..e70384a1bf92 100644 --- a/gcloud-java-examples/README.md +++ b/gcloud-java-examples/README.md @@ -7,10 +7,8 @@ Examples for gcloud-java (Java idiomatic client for [Google Cloud Platform][clou [![Coverage Status](https://coveralls.io/repos/GoogleCloudPlatform/gcloud-java/badge.svg?branch=master)](https://coveralls.io/r/GoogleCloudPlatform/gcloud-java?branch=master) - [Homepage] (https://googlecloudplatform.github.io/gcloud-java/) -- [API Documentation] (http://googlecloudplatform.github.io/gcloud-java/apidocs) - [Examples] (http://googlecloudplatform.github.io/gcloud-java/apidocs/index.html?com/google/gcloud/examples/package-summary.html) - Quickstart ---------- Add this to your pom.xml file @@ -22,7 +20,6 @@ Add this to your pom.xml file ``` - Contributing ------------ diff --git a/gcloud-java-storage/README.md b/gcloud-java-storage/README.md index c5717125123a..7e14a039e796 100644 --- a/gcloud-java-storage/README.md +++ b/gcloud-java-storage/README.md @@ -1,17 +1,15 @@ -Google Cloud Java Client -========================== +Google Cloud Java Client for Storage +==================================== -Java idiomatic client for [Google Cloud Platform][cloud-platform] services. +Java idiomatic client for [Google Cloud Storage] (https://cloud.google.com/storage/). [![Build Status](https://travis-ci.org/GoogleCloudPlatform/gcloud-java.svg?branch=master)](https://travis-ci.org/GoogleCloudPlatform/gcloud-java) [![Coverage Status](https://coveralls.io/repos/GoogleCloudPlatform/gcloud-java/badge.svg?branch=master)](https://coveralls.io/r/GoogleCloudPlatform/gcloud-java?branch=master) - [Homepage] (https://googlecloudplatform.github.io/gcloud-java/) -- [API Documentation] (http://googlecloudplatform.github.io/gcloud-java/apidocs) +- [API Documentation] (http://googlecloudplatform.github.io/gcloud-java/apidocs/index.html?com/google/gcloud/storage/package-summary.html) - [Examples] (http://googlecloudplatform.github.io/gcloud-java/apidocs/index.html?com/google/gcloud/examples/package-summary.html) -This client supports the [Google Cloud Storage] (https://cloud.google.com/storage/) - > Note: This client is a work-in-progress, and may occasionally > make backwards-incompatible changes. @@ -26,6 +24,46 @@ Add this to your pom.xml file ``` +Google Cloud Storage +---------------------- + +[Google Cloud Storage][cloud-storage] is a durable and highly available +object storage service. Google Cloud Storage is almost infinitely scalable +and guarantees consistency: when a write succeeds, the latest copy of the +object will be returned to any GET, globally. + +See the [Google Cloud Storage docs][cloud-storage-activation] for more details on how to activate +Cloud Storage for your project. + +See the ``gcloud-java`` API [storage documentation][storage-api] to learn how to interact +with the Cloud Storage using this Client Library. + +```java +import static java.nio.charset.StandardCharsets.UTF_8; + +import com.google.gcloud.storage.Blob; +import com.google.gcloud.storage.Storage; +import com.google.gcloud.storage.StorageFactory; +import com.google.gcloud.storage.StorageOptions; + +import java.nio.ByteBuffer; +import java.nio.channels.WritableByteChannel; + +StorageOptions options = StorageOptions.builder().projectId(PROJECT_ID).build(); +Storage storage = StorageFactory.instance().get(options); +Blob blob = new Blob(storage, "bucket", "blob_name"); +if (!blob.exists()) { + storage2.create(blob.info(), "Hello, Cloud Storage!".getBytes(UTF_8)); +} else { + System.out.println("Updating content for " + blob.info().name()); + byte[] prevContent = blob.content(); + System.out.println(new String(prevContent, UTF_8)); + WritableByteChannel channel = blob.writer(); + channel.write(ByteBuffer.wrap("Updated content".getBytes(UTF_8))); + channel.close(); +} +``` + Testing ------- @@ -68,3 +106,4 @@ Apache 2.0 - See [LICENSE] for more information. [cloud-storage]: https://cloud.google.com/storage/ [cloud-storage-docs]: https://cloud.google.com/storage/docs/overview [cloud-storage-create-bucket]: https://cloud.google.com/storage/docs/cloud-console#_creatingbuckets +[storage-api]: http://googlecloudplatform.github.io/gcloud-java/apidocs/index.html?com/google/gcloud/storage/package-summary.html diff --git a/src/site/apt/gcloud-java-core/index.apt b/src/site/apt/gcloud-java-core/index.apt new file mode 100644 index 000000000000..1dbbe002bd1b --- /dev/null +++ b/src/site/apt/gcloud-java-core/index.apt @@ -0,0 +1,12 @@ +GCloud Java Core: Common functionality for GCloud Java services. + + This module provides common functionality required by service-specific modules of this library. + This library is in a early stage of its development and may occasionally make backwards-incompatible changes, + but it is already usable. + +* Links + + * {{{https://github.com/GoogleCloudPlatform/gcloud-java/tree/master/gcloud-java-core}GitHub repository}} + + * {{{./apidocs/index.html?com/google/gcloud/package-summary.html}Javadocs}} + diff --git a/src/site/apt/gcloud-java-datastore/index.apt b/src/site/apt/gcloud-java-datastore/index.apt new file mode 100644 index 000000000000..193fd958fda1 --- /dev/null +++ b/src/site/apt/gcloud-java-datastore/index.apt @@ -0,0 +1,16 @@ +GCloud Java Datastore: Idiomatic Java Client for Google Cloud Datastore. + + This is a Java Client for accessing Google Cloud Datastore. + This library is in a early stage of its development and may occasionally make backwards-incompatible changes, + but it is already usable. + +* Features + + * {{{https://cloud.google.com/datastore/}Google Cloud Datastore}} + +* Links + + * {{{https://github.com/GoogleCloudPlatform/gcloud-java/tree/master/gcloud-java-datastore}GitHub repository}} + + * {{{./apidocs/index.html?com/google/gcloud/datastore/package-summary.html}Javadocs}} + diff --git a/src/site/apt/gcloud-java-examples/index.apt b/src/site/apt/gcloud-java-examples/index.apt new file mode 100644 index 000000000000..349b06016d39 --- /dev/null +++ b/src/site/apt/gcloud-java-examples/index.apt @@ -0,0 +1,11 @@ +GCloud Java Examples: Examples using GCloud Java services + + This library is in a early stage of its development and may occasionally make backwards-incompatible changes, + but it is already usable. + +* Links + + * {{{https://github.com/GoogleCloudPlatform/gcloud-java/tree/master/gcloud-java-examples}GitHub repository}} + + * {{{./apidocs/index.html?com/google/gcloud/examples/package-summary.html}Javadocs}} + diff --git a/src/site/apt/gcloud-java-storage/index.apt b/src/site/apt/gcloud-java-storage/index.apt new file mode 100644 index 000000000000..5af2eb07133e --- /dev/null +++ b/src/site/apt/gcloud-java-storage/index.apt @@ -0,0 +1,16 @@ +GCloud Java Storage: Idiomatic Java Client for Google Cloud Storage. + + This is a Java Client for accessing Google Cloud Storage. + This library is in a early stage of its development and may occasionally make backwards-incompatible changes, + but it is already usable. + +* Features + + * {{{https://cloud.google.com/storage/}Google Cloud Storage}} + +* Links + + * {{{https://github.com/GoogleCloudPlatform/gcloud-java/tree/master/gcloud-java-storage}GitHub repository}} + + * {{{./apidocs/index.html?com/google/gcloud/storage/package-summary.html}Javadocs}} +