Skip to content

Commit 827291a

Browse files
authored
Update ReadMe and comments (GoogleCloudPlatform#1426)
1 parent 144784a commit 827291a

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

appengine-java11/guestbook-cloud-firestore/src/main/java/com/example/guestbook/Greeting.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import java.util.Map;
2323
import java.util.Objects;
2424

25-
/** Greeting model. */
25+
/** Represents a greeting: id, guestbook reference, author, content, date. */
2626
@SuppressWarnings("JavadocMethod")
2727
public class Greeting {
2828

appengine-java11/guestbook-cloud-firestore/src/main/java/com/example/guestbook/Guestbook.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
import java.util.Map;
3131
import java.util.Objects;
3232

33-
/** Guestbook model. */
33+
/** Represents a guestbook: book name, book document reference. */
3434
@SuppressWarnings("JavadocMethod")
3535
public class Guestbook {
3636

@@ -42,24 +42,24 @@ public class Guestbook {
4242

4343
public Guestbook(String book) {
4444
this.book = book == null ? "default" : book;
45-
4645
// Construct the Guestbook data.
4746
Map<String, Object> bookData = new HashMap<>();
4847
bookData.put("name", this.book);
4948
// [START gae_java11_firestore_book]
50-
// Get Guestbook reference in the collection.
49+
// The Guestbook document reference in the collection.
5150
bookRef = getFirestore().collection("Guestbooks").document(this.book);
52-
// Add Guestbook to collection.
51+
// Add the Guestbook to collection.
5352
bookRef.set(bookData);
5453
// [END gae_java11_firestore_book]
5554
}
5655

56+
/** Get the Firestore reference to the Guestbook document **/
5757
public DocumentReference getBookRef() {
5858
return bookRef;
5959
}
6060

6161
// [START gae_java11_firestore_get_greetings]
62-
/** Get greetings for the Guestbook */
62+
/** Query Firstore for Guestbook greetings */
6363
public List<Greeting> getGreetings() {
6464
// Initialize a List for Greetings.
6565
ImmutableList.Builder<Greeting> greetings = new ImmutableList.Builder<Greeting>();

appengine-java11/guestbook-cloud-firestore/src/main/webapp/index.jsp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ limitations under the License.
3535
}
3636
pageContext.setAttribute("guestbookName", guestbookName);
3737
38-
// Create the correct Ancestor key
38+
// Create a Guestbook object.
3939
Guestbook theBook = new Guestbook(guestbookName);
4040
41-
// Run an ancestor query to ensure we see the most up-to-date
41+
// Run an query to ensure we see the most up-to-date
4242
// view of the Greetings belonging to the selected Guestbook.
4343
List<Greeting> greetings = theBook.getGreetings();
4444
%>

appengine-java11/oauth2/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Google OAuth 2.0 on Google App Engine Standard with Java 11
22

33
This sample shows how to implement an OAuth 2.0 flow using the
4-
[Google OAuth Client Library for Java](client) to access protected data stored
4+
[Google OAuth Client Library for Java][client] to access protected data stored
55
on Google services. OAuth 2.0 is a standard specification for allowing end
66
users to securely authorize a client application to access protected
77
server-side resources.

0 commit comments

Comments
 (0)