| Index: src/com/google/api/data/provisioning/v2/model/Group.java |
| =================================================================== |
| --- src/com/google/api/data/provisioning/v2/model/Group.java (revision 0) |
| +++ src/com/google/api/data/provisioning/v2/model/Group.java (revision 0) |
| @@ -0,0 +1,42 @@ |
| +// Copyright 2011 Google Inc. All Rights Reserved. |
| + |
| +package com.google.api.data.provisioning.v2.model; |
| + |
| +import com.google.api.client.util.Key; |
| +import com.google.api.data.calendar.v2.model.SettingsEntry; |
| +import com.google.api.data.gdata.v2.model.Entry; |
| + |
| +import java.util.List; |
| + |
| +/** |
| + * @author shraddhag@google.com (Shraddha Gupta) |
| + * |
| + */ |
| +public class Group extends Entry { |
| + /** Group Entry */ |
| + |
| + @Key("apps:property") |
| + public List<Property> property; |
| + /** Property names: groupId, groupname, description, emailPermission */ |
| + |
| + /** |
| + * 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; |
| + } |
| +} |