@@ -0,0 +1,2513 @@
+package com.growthbeat.analytics.model;%0A%0Aimport java.util.Date;%0Aimport java.util.HashMap;%0Aimport java.util.List;%0Aimport java.util.Map;%0A%0Aimport org.codehaus.jackson.type.TypeReference;%0A%0Aimport com.growthbeat.Context;%0Aimport com.growthbeat.http.JsonUtils;%0A%0Apublic class Tag %7B%0A%0A%09private String id;%0A%09private String applicationId;%0A%09private String description;%0A%09private Date created;%0A%0A%09public static Tag findById(String id, Context context) %7B%0A%09%09String json = context.getGrowthbeatHttpClient().get(%22/1/tags/%22 + id, new HashMap%3CString, Object%3E());%0A%09%09return JsonUtils.deserialize(json, Tag.class);%0A%09%7D%0A%0A%09public static List%3CTag%3E findByApplicationId(String applicationId, Context context) %7B%0A%09%09Map%3CString, Object%3E params = new HashMap%3CString, Object%3E();%0A%09%09params.put(%22applicationId%22, applicationId);%0A%09%09String json = context.getGrowthbeatHttpClient().get(%22/1/tags/%22, params);%0A%09%09return JsonUtils.deserialize(json, new TypeReference%3CList%3CTag%3E%3E() %7B%0A%09%09%7D);%0A%09%7D%0A%0A%09public static Tag create(String parentTagId, String applicationId, String name, String description, Context context) %7B%0A%09%09Map%3CString, Object%3E params = new HashMap%3CString, Object%3E();%0A%09%09params.put(%22applicationId%22, applicationId);%0A%09%09params.put(%22parentTagId%22, parentTagId);%0A%09%09params.put(%22name%22, name);%0A%09%09params.put(%22description%22, description);%0A%09%09String json = context.getGrowthbeatHttpClient().post(%22/1/tags%22, params);%0A%09%09return JsonUtils.deserialize(json, Tag.class);%0A%09%7D%0A%0A%09public static Tag update(String tagId, String description, Context context) %7B%0A%09%09Map%3CString, Object%3E params = new HashMap%3CString, Object%3E();%0A%09%09params.put(%22description%22, description);%0A%09%09String json = context.getGrowthbeatHttpClient().put(%22/1/tags/%22 + tagId, params);%0A%09%09return JsonUtils.deserialize(json, Tag.class);%0A%09%7D%0A%0A%09public static Tag delete(String tagId, Context context) %7B%0A%09%09Map%3CString, Object%3E params = new HashMap%3CString, Object%3E();%0A%09%09String json = context.getGrowthbeatHttpClient().delete(%22/1/tags/%22 + tagId, params);%0A%09%09return JsonUtils.deserialize(json, Tag.class);%0A%09%7D%0A%0A%09public String getId() %7B%0A%09%09return id;%0A%09%7D%0A%0A%09public void setId(String id) %7B%0A%09%09this.id = id;%0A%09%7D%0A%0A%09public String getApplicationId() %7B%0A%09%09return applicationId;%0A%09%7D%0A%0A%09public void setApplicationId(String applicationId) %7B%0A%09%09this.applicationId = applicationId;%0A%09%7D%0A%0A%09public String getDescription() %7B%0A%09%09return description;%0A%09%7D%0A%0A%09public void setDescription(String description) %7B%0A%09%09this.description = description;%0A%09%7D%0A%0A%09public Date getCreated() %7B%0A%09%09return created;%0A%09%7D%0A%0A%09public void setCreated(Date created) %7B%0A%09%09this.created = created;%0A%09%7D%0A%0A%7D%0A

Create Tag class.