1 package org.columba.calendar.model; 19 20 import org.columba.calendar.model.api.IComponent; 21 import org.columba.calendar.model.api.IComponentInfo; 22 import org.columba.calendar.model.api.IComponent.TYPE; 23 24 public class ComponentInfo implements IComponentInfo { 25 26 private String id; 27 28 private TYPE type; 29 30 private String calendarId; 31 32 private IComponent component; 33 34 public ComponentInfo(String id, TYPE type, String calendarId, IComponent component) { 35 if (id == null) 36 throw new IllegalArgumentException ("id == null"); 37 if (type == null) 38 throw new IllegalArgumentException ("type == null"); 39 if (calendarId == null) 40 throw new IllegalArgumentException ("calendarId == null"); 41 if (component == null) 42 throw new IllegalArgumentException ("component == null"); 43 44 this.id = id; 45 this.type = type; 46 this.calendarId = calendarId; 47 } 48 49 public TYPE getType() { 50 return type; 51 } 52 53 public String getId() { 54 return id; 55 } 56 57 public String getCalendar() { 58 return calendarId; 59 } 60 61 public IComponent getComponent() { 62 return component; 63 } 64 65 public void setCalendar(String calendar) { 66 this.calendarId = calendar; 67 } 68 69 } 70 | Popular Tags |