/** * @return BwLastMod lastmod */ @Override public BwCollectionLastmod getLastmod() { return entity.getLastmod(); }
public BwCollectionLastmod getLastmod() { return entity.getLastmod(); }
/** Set the path * * @param val String path */ public void setPath(final String val) { path = val; if (getLastmod() != null) { getLastmod().setPath(val); } }
/** Update last mod fields * @param val */ public void updateLastmod(final Timestamp val) { getLastmod().updateLastmod(val); }
/** * @param vpath the virtual path * @param col the collection * @param canSync false if this cannot do sync report */ public SynchReportItem(final String vpath, final BwCalendar col, final boolean canSync) { this.vpath = vpath; this.col = col; this.canSync = canSync; token = col.getLastmod().getTagValue(); }
/** For an alias where the target lastmod is the token * * @param vpath the virtual path * @param col the collection * @param canSync false if this cannot do sync report * @param token to use */ public SynchReportItem(final String vpath, final BwCalendar col, final boolean canSync, final String token) { this.vpath = vpath; this.col = col; this.canSync = canSync; // token is the greater of the collection token or the supplied token. final String colToken = col.getLastmod().getTagValue(); if (colToken.compareTo(token) > 0) { this.token = colToken; } else { this.token = token; } }
/** * @return valid quoted etag */ @NoDump @IcalProperty(pindex = PropertyInfoIndex.CTAG, jname = "ctag") public String getEtag() { return "\"" + getLastmod().getTagValue() + "\""; }
/** * @return a version value in microseconds. */ @NoDump @JsonIgnore public long getMicrosecsVersion() throws CalFacadeException { try { return new LastModified(getLastmod().getTimestamp()).getDate().getTime() * 1000000 + getLastmod().getSequence(); } catch (final Throwable t) { throw new CalFacadeException(t); } }
/** * @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("lastmod", getLastmod());
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; }