public BwCalendar shallowClone() { final BwCalendar cal = new BwCalendar(); super.copyTo(cal); cal.setName(getName()); cal.setPath(getPath()); cal.setSummary(getSummary()); cal.setDescription(getDescription()); cal.setMailListId(getMailListId()); cal.setCalType(getCalType()); cal.setCreated(getCreated()); final BwCollectionLastmod lm = (BwCollectionLastmod)getLastmod().clone(); lm.setDbEntity(cal); cal.setLastmod(lm); cal.setAliasUri(getAliasUri()); cal.setDisplay(getDisplay()); cal.setAffectsFreeBusy(getAffectsFreeBusy()); cal.setIgnoreTransparency(getIgnoreTransparency()); cal.setUnremoveable(getUnremoveable()); cal.setRefreshRate(getRefreshRate()); cal.setLastRefresh(getLastRefresh()); cal.setLastEtag(getLastEtag()); cal.setFilterExpr(getFilterExpr()); if (!Util.isEmpty(getCategoryHrefs())) { final Set<String> uids = new TreeSet<>(getCategoryHrefs()); cal.setCategoryHrefs(uids); } return cal; }
public boolean addCategory(BwCategory val) { return entity.addCategory(val); }
public void addDeletedEntity(BwDbentity<?> val) { entity.addDeletedEntity(val); }
/** * @return a copy for tombstoning. */ public BwCalendar makeTombstoneCopy() { final BwCalendar col = new BwCalendar(); super.copyTo(col); col.setName(getName()); col.setPath(getPath()); col.setCalType(getCalType()); col.setCreated(getCreated()); col.setLastmod((BwCollectionLastmod)getLastmod().clone()); col.setAliasUri(getAliasUri()); return col; }
/** * @return CollectionInfo for this entity */ @NoDump public CollectionInfo getCollectionInfo() { return getCollectionInfo(getCalType()); }
final ToString ts = new ToString(this); toStringSegment(ts); ts.append("name", getName()); ts.append("path", getPath()); ts.append("tombstoned", getTombstoned()); ts.append("displayName", getSummary()); ts.newLine(); ts.append("description", getDescription()); ts.append("calendarCollection", getCalendarCollection()); ts.append("calType", getCalType()); ts.append("created", getCreated()); ts.append("lastmod", getLastmod()); if (getNumCategories() > 0) { ts.append("categories", getCategories());
if (applyFilter && (cal.getFilterExpr() != null)) { fltr = parseExpr(cal); if (cal.getCalType() == BwCalendar.calTypeEventList) { OrCalFilter ocf = new OrCalFilter(); for (EventListEntry ele: cal.getEventList()) { HrefFilter hf = new HrefFilter(); if (cal.getCollectionInfo().onlyCalEntities) { (cal.getCalType() != BwCalendar.calTypeCalendarCollection) && (cal.getCalType() != BwCalendar.calTypeExtSub)) { return null; if (cal.getInternalAlias()) { BwCalendar target = parser.resolveAlias(cal, false); if (target == null) { String path = target.getPath(); if (cal.getCalType() == BwCalendar.calTypeFolder) { return anded(fltr, makeFolderFilter(cal, pathElements));
@Override public String getHref() { return getPath(); }
debug(" vpath collection:" + col.getPath()); if (col.getFilterExpr() != null) { if (subParser == null) { subParser = callGetParser(); final ParseResult pr = subParser.parse(col.getFilterExpr(), false, col.getPath()); if (!pr.ok) { throw parseResult.fromPr(pr); if (col.getCollectionInfo().onlyCalEntities || (col.getCalType() == BwCalendar.calTypeFolder)) { if (vpathTarget.getAliasOrigin() != null) { name = vpathTarget.getAliasOrigin().getPath(); } else { name = vpathTarget.getPath(); resolveColPath(vpathTarget.getPath(), false, false));
@Override public int getCalType() { /* BwCalendar entColl = entity.getAliasedEntity(); if (entColl == null) { return entity.getCalType(); } return entColl.getCalType(); */ return entity.getCalType(); }
/** * @return BwLastMod lastmod */ @Override public BwCollectionLastmod getLastmod() { return entity.getLastmod(); }
/** * @return the supported vpoll components */ @NoDump public List<String> getVpollSupportedComponents() { if (vpollSupportedComponents == null) { vpollSupportedComponents = new ArrayList<String>(); if ((getCalType() != calTypePoll) && (getCalType() != calTypeInbox) && (getCalType() != calTypeOutbox)) { return vpollSupportedComponents; } String slist = getQproperty(CaldavTags.vpollSupportedComponentSet); if (slist == null) { vpollSupportedComponents.add("VEVENT"); //vpollSupportedComponents.add("VTODO"); //vpollSupportedComponents.add("VAVAILABILITY"); } else { String[] ss = slist.split(","); for (String s: ss) { vpollSupportedComponents.add(s); } } } return vpollSupportedComponents; }
colPath = null; } else { colPath = cal.getPath(); (cal.getCalType() != BwCalendar.calTypeInbox) && (cal.getCalType() != BwCalendar.calTypePendingInbox) && (cal.getCalType() != BwCalendar.calTypeOutbox)) { if (logger.debug()) { logger.debug("TRANS-TO_EVENT: try to fetch event with guid=" + guid);
private FilterBase parseExpr(final BwCalendar col) throws CalFacadeException { SimpleFilterParser sfp = parser.getParser(); ParseResult pr = sfp.parse(col.getFilterExpr(), false, col.getPath()); if (!pr.ok) { throw pr.cfe; } return pr.filter; }
/** Set the single valued named property * * @param name * @param val */ public void setProperty(final String name, final String val) { BwProperty prop = findProperty(name); if (prop == null) { if (val != null) { prop = new BwProperty(name, val); addProperty(prop); } } else if (val == null) { removeProperty(prop); } else { prop.setValue(val); } }
if (colCache.get(col.getPath()) == null) { colCache.put(col.getPath(), col); if (!col.getDisplay()) { continue; String path = col.getPath();
Set<BwProperty> bwprops = getProperties(eventListProperty); removeProperty(props.get(i)); } else if (i >= props.size()) { addProperty(new BwProperty(eventListProperty, s)); } else {
public void addProperty(BwProperty val) { entity.addProperty(val); }
public void beforeDeletion() { entity.beforeDeletion(); }
public void beforeSave() { entity.beforeSave(); }