@Override public Object clone() { final BwEventAnnotation ev = new BwEventAnnotation(); copyTo(ev); ev.setTarget(getTarget()); ev.setMaster(getMaster()); ev.setOverride(getOverride()); return ev; } }
/** When cloning a proxy we generally need to point the cloned annotation at * a new target and master. * * @param master * @param target * @return cloned proxy. */ public BwEventProxy clone(BwEvent master, BwEvent target) { BwEventAnnotation ann = (BwEventAnnotation)ref.clone(); ann.setMaster(master); ann.setTarget(target); return new BwEventProxy(ann); }
public Set<BwAlarm> getOverrideCollection() { return ref.getAlarms(); }
/** Get the access * * @return String access */ public String getAccess() { if (!ref.getOverride()) { // Always comes from the annotation. return ref.getAccess(); } String val = ref.getAccess(); if (val != null) { return val; } return getTarget().getAccess(); }
public String getClassification() { String val = ref.getClassification(); if (val != null) { return val; } if (ref.getEmptyFlag(ProxiedFieldIndex.pfiClassification)) { return null; } return getTarget().getClassification(); }
public void setClassification(String val) { int res = doSet(ProxiedFieldIndex.pfiClassification, false, getTarget().getClassification(), ref.getClassification(), val); if (res == setRefNull) { ref.setClassification(null); } if (res == setRefVal) { ref.setClassification(val); } }
public void setCategories(Set<BwCategory> val) { if (val instanceof OverrideSet) { val = ((OverrideSet<BwCategory>)val).getOverrideCollection(); } int res = doSet(ProxiedFieldIndex.pfiCategories, false, getTarget().getCategories(), ref.getCategories(), val); if (res == setRefNull) { ref.setCategories(null); } if (res == setRefVal) { ref.setCategories(val); } }
public void setAlarms(Set<BwAlarm> val) { if (val instanceof OverrideSet) { val = ((OverrideSet<BwAlarm>)val).getOverrideCollection(); } int res = doSet(ProxiedFieldIndex.pfiAlarms, false, getTarget().getAlarms(), ref.getAlarms(), val); if (res == setRefNull) { ref.setAlarms(null); } if (res == setRefVal) { ref.setAlarms(val); } }
public void setAttachments(Set<BwAttachment> val) { if (val instanceof OverrideSet) { val = ((OverrideSet<BwAttachment>)val).getOverrideCollection(); } int res = doSet(ProxiedFieldIndex.pfiAttachments, false, getTarget().getAttachments(), ref.getAttachments(), val); if (res == setRefNull) { ref.setAttachments(null); } if (res == setRefVal) { ref.setAttachments(val); } }
public void setAttendees(Set<BwAttendee> val) { if (val instanceof OverrideSet) { val = ((OverrideSet<BwAttendee>)val).getOverrideCollection(); } int res = doSet(ProxiedFieldIndex.pfiAttendees, false, getTarget().getAttendees(), ref.getAttendees(), val); if (res == setRefNull) { ref.setAttendees(null); } if (res == setRefVal) { ref.setAttendees(val); } }
public Set<BwCategory> getOverrideCollection() { return ref.getCategories(); }
public Set<BwAttachment> getOverrideCollection() { return ref.getAttachments(); }
public Set<BwAttendee> getOverrideCollection() { return ref.getAttendees(); }
public Object clone() { return new BwEventProxy((BwEventAnnotation)ref.clone()); }
/** Get the object's collection path * * @return String path */ public String getColPath() { String val = ref.getColPath(); if (val != null) { return val; } return getTarget().getColPath(); }
/** Creates an annotation object for the given event then returns a proxy * object to handle it. * * @param ev BwEvent object to annotate * @param ownerHref * @param forInstance true if this is an overrride or a recurrence instance * @return BwEventProxy object * @throws CalFacadeException */ public static BwEventProxy makeAnnotation(BwEvent ev, String ownerHref, boolean forInstance) throws CalFacadeException { BwEventAnnotation ann = new BwEventAnnotation(); initAnnotation(ann, ev, ownerHref, forInstance); return new BwEventProxy(ann); }