@Override public String getHref() { return getPath(); }
@Override public String getPath() { // Can come from constructor if (entity != null) { return entity.getPath(); } return null; }
public String getPath() { return entity.getPath(); }
/** * @param val href of a collection that may be referenced by an alias * @return true if this object references that collection * */ public boolean referencesCollection(final String val) { return collection.getPath().equals(val) || (shareeInfoMap.get(val) != null); }
/** Match on a collection. * * @param name - null one will be created * @param col - for path */ public BwCollectionFilter(String name, BwCalendar col) { super(name, PropertyInfoIndex.COLLECTION); setEntity(col.getPath()); }
public void addSharee(final AliasesInfo ai) { shareeInfoMap.put(ai.getCollection().getPath(), ai); shared = true; }
/** Generate an encoded url referring to this calendar. * * XXX This should not be here * @return String encoded url (or path) * @throws CalFacadeException */ @NoDump public String getEncodedPath() throws CalFacadeException { if (getPath() == null) { return null; } try { return URLEncoder.encode(getPath(), "UTF-8"); } catch (Throwable t) { throw new CalFacadeException(t); } }
/** Constructor to set last mod * @param dbEntity * @param dt */ public BwCollectionLastmod(final BwCalendar dbEntity, final Date dt) { super(dbEntity, dt); if (dbEntity != null) { setPath(dbEntity.getPath()); } else { setPath(null); } }
/** No date constructor * * @param dbEntity */ public BwCollectionLastmod(final BwCalendar dbEntity) { super(dbEntity); if (dbEntity != null) { setPath(dbEntity.getPath()); } else { setPath(null); } }
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; }
/** * @param val */ @Override public void setDbEntity(final BwCalendar val) { super.setDbEntity(val); if (val != null) { setPath(val.getPath()); } else { setPath(null); } }
/** Constructor to set last mod * @param dbEntity * @param timestamp */ public BwCollectionLastmod(final BwCalendar dbEntity, final String timestamp) { super(dbEntity); if (dbEntity != null) { setPath(dbEntity.getPath()); } else { setPath(null); } setTimestamp(timestamp); }
private void dump(final FilterBase f, final String curLine) { if (f instanceof OrFilter) { debug(curLine + " OR "); Iterator<FilterBase> it = f.getChildren().iterator(); dumpChildren(it, curLine); return; } if (f instanceof AndFilter) { debug(curLine + " AND "); Iterator<FilterBase> it = f.getChildren().iterator(); dumpChildren(it, curLine); return; } if (f instanceof ObjectFilter) { ObjectFilter of = (ObjectFilter)f; if (of.getEntity() instanceof BwCalendar) { final StringBuilder sb = new StringBuilder(curLine); sb.append(curLine); sb.append(" cal="); sb.append(((BwCalendar)of.getEntity()).getPath()); debug(sb.toString()); } else { debug(curLine + f.toString()); } } else { debug(curLine + f.toString()); } }
/** * @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; }
ts.append("path", getPath()); ts.append("tombstoned", getTombstoned()); ts.append("displayName", getSummary());
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; }