1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.exoplatform.calendar.ws.bean;
19
20 import static org.exoplatform.calendar.ws.CalendarRestApi.CATEGORY_URI;
21
22 import org.exoplatform.calendar.service.EventCategory;
23 import org.exoplatform.calendar.ws.common.Resource;
24
25 public class CategoryResource extends Resource {
26 private static final long serialVersionUID = 6940106249883390857L;
27 private String name;
28
29 public CategoryResource() {
30 super(null);
31 }
32
33 public CategoryResource(EventCategory data, String basePath) {
34 super(data.getId());
35 StringBuilder path = new StringBuilder(basePath);
36 path.append(CATEGORY_URI).append(getId());
37 setHref(path.toString());
38 name = data.getName();
39 }
40 public String getName() {
41 return name;
42 }
43
44 public void setName(String name) {
45 this.name = name;
46 }
47
48 }