| 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; |
| + } |
| +} |