View Javadoc
1   /*
2    * Copyright (C) 2003-2014 eXo Platform SAS.
3    *
4    * This program is free software: you can redistribute it and/or modify
5    * it under the terms of the GNU Affero General Public License as published by
6    * the Free Software Foundation, either version 3 of the License, or
7    * (at your option) any later version.
8    *
9    * This program is distributed in the hope that it will be useful,
10   * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12   * GNU Affero General Public License for more details.
13   *
14   * You should have received a copy of the GNU Affero General Public License
15   * along with this program. If not, see <http://www.gnu.org/licenses/>.
16   */
17  
18  package org.exoplatform.calendar.ws.bean;
19  
20  import static org.exoplatform.calendar.ws.CalendarRestApi.EVENT_URI;
21  import static org.exoplatform.calendar.ws.CalendarRestApi.INVITATION_URI;
22  
23  import java.io.Serializable;
24  
25  import org.exoplatform.calendar.service.Invitation;
26  import org.exoplatform.calendar.ws.common.Resource;
27  
28  public class InvitationResource extends Resource {
29    private static final long serialVersionUID = -5546515171185717545L;
30  
31    private Serializable            event;
32  
33    private String            participant;
34  
35    private String            status;
36  
37    public InvitationResource() {
38      super(null);
39    }
40    
41    public InvitationResource(Invitation data, String basePath) {
42      super(data.getId());
43      setHref(new StringBuffer(basePath).append(INVITATION_URI).append(data.getId()).toString());
44      event = new StringBuffer(basePath).append(EVENT_URI).append(data.getEventId()).toString();
45      this.participant = data.getParticipant();
46      this.status = data.getStatus();
47    }
48  
49    public Serializable getEvent() {
50      return event;
51    }
52    
53    public void setEvt(Serializable event) {
54      this.event = event;
55    }
56  
57    public String getParticipant() {
58      return participant;
59    }
60  
61    public String getStatus() {
62      return status;
63    }
64  
65    public void setParticipant(String participant) {
66      this.participant = participant;
67    }
68  
69    public void setStatus(String status) {
70      this.status = status;
71    }
72  }