Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(64)

Unified Diff: src/com/google/api/data/provisioning/v2/model/GroupMember.java

Issue 5141050: Provisioning patch Base URL: http://gdata-java-client-ext.googlecode.com/svn/trunk/
Patch Set: Created 14 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/com/google/api/data/provisioning/v2/model/GroupMember.java
===================================================================
--- src/com/google/api/data/provisioning/v2/model/GroupMember.java (revision 0)
+++ src/com/google/api/data/provisioning/v2/model/GroupMember.java (revision 0)
@@ -0,0 +1,40 @@
+// Copyright 2011 Google Inc. All Rights Reserved.
+
+package com.google.api.data.provisioning.v2.model;
+
+import com.google.api.client.util.Key;
+
+import java.util.List;
+
+/**
+ * @author shraddhag@google.com (Shraddha Gupta)
+ *
+ */
+public class GroupMember {
alainv 2011/09/28 08:39:57 Shouldn't this extend "Entry" or "BatchEntry" (onl
+ /** Group Member Entry */
+
+ @Key("@apps:property")
+ public Property[] property;
alainv 2011/09/28 08:39:57 Make it a List<Property>.
+ /** Property names: memberId, memberType, directMember */
+
+ /**
+ * Finds a property given its {@code name}.
+ *
+ * @param properties The list of Property to search in.
+ * @param name The {@code name} to match.
+ * @return The value of the Property that has the given {@code name}
+ * or {@code null} if not found.
+ */
+ public static String find(List<Property> properties, String name) {
+ int i = 0;
+ if (properties != null) {
+ for (Property p : properties) {
+ if (name.equals(properties.get(i).name)) {
+ return properties.get(i).value;
+ }
+ i++;
+ }
+ }
+ return null;
+ }
+}

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b