use of org.bedework.calfacade.annotations.ical.NoProxy in project bw-calendar-engine by Bedework.
the class BwAlarm method getXicalProperties.
/**
* Find x-properties storing the value of the named ical property
*
* @param val - name to match
* @return list of matching properties - never null
* @throws CalFacadeException
*/
@NoProxy
@NoDump
public List<BwXproperty> getXicalProperties(final String val) throws CalFacadeException {
List<BwXproperty> res = new ArrayList<>();
List<BwXproperty> xs = getXproperties();
if (xs == null) {
return res;
}
for (BwXproperty x : xs) {
if (x.getName().equals(BwXproperty.bedeworkIcalProp)) {
List<Xpar> xpars = x.getParameters();
Xpar xp = xpars.get(0);
if (xp.getName().equals(val)) {
res.add(x);
}
}
}
return res;
}
use of org.bedework.calfacade.annotations.ical.NoProxy in project bw-calendar-engine by Bedework.
the class BwEvent method updateStag.
/**
* Set the stag for this event.
* @param val
*/
@NoProxy
public void updateStag(final Timestamp val) {
DateTime dt = new DateTime(val);
// dt.setUtc(true);
setStag(new LastModified(dt).getValue() + "-" + hex4FromNanos(val.getNanos()));
}
use of org.bedework.calfacade.annotations.ical.NoProxy in project bw-calendar-engine by Bedework.
the class BwEvent method getXicalProperties.
/**
* Find x-properties storing the value of the named ical property
*
* @param val - name to match
* @return list of matching properties - never null
* @throws CalFacadeException
*/
@NoProxy
@NoDump
public List<BwXproperty> getXicalProperties(final String val) throws CalFacadeException {
List<BwXproperty> res = new ArrayList<>();
List<BwXproperty> xs = getXproperties();
if (xs == null) {
return res;
}
for (BwXproperty x : xs) {
if (x.getName().equals(BwXproperty.bedeworkIcalProp)) {
List<Xpar> xpars = x.getParameters();
Xpar xp = xpars.get(0);
if (xp.getName().equals(val)) {
res.add(x);
}
}
}
return res;
}
use of org.bedework.calfacade.annotations.ical.NoProxy in project bw-calendar-engine by Bedework.
the class BwEvent method inDateTimeRange.
/**
* Returns true if the event start and end dates lie within the specified
* limits. Either or both of start and end may be null.
*
* @param start - UTC date/time or null
* @param end - UTC date/time or null
* @return true if event satisfies the limits
*/
@NoProxy
@NoWrap
public boolean inDateTimeRange(final String start, final String end) {
if ((getEntityType() == IcalDefs.entityTypeTodo) && getNoStart()) {
// XXX Wrong? - true if start - end covers today?
return true;
}
String evStart = getDtstart().getDate();
String evEnd = getDtend().getDate();
int evstSt;
if (end == null) {
// < infinity
evstSt = -1;
} else {
evstSt = evStart.compareTo(end);
}
if (evstSt >= 0) {
return false;
}
int evendSt;
if (start == null) {
// > infinity
evendSt = 1;
} else {
evendSt = evEnd.compareTo(start);
}
if ((evendSt > 0) || (evStart.equals(evEnd) && (evendSt >= 0))) {
// Passed the tests.
return true;
}
return false;
}
use of org.bedework.calfacade.annotations.ical.NoProxy in project bw-calendar-engine by Bedework.
the class BwEvent method toString.
@Override
@NoProxy
public String toString() {
final ToString ts = new ToString(this);
toStringSegment(ts);
return ts.toString();
}
Aggregations