use of org.bedework.calfacade.annotations.NoDump in project bw-calendar-engine by Bedework.
the class BwPreferences method getCalsuiteApproversList.
/**
* @return List from approvers.
*/
@NoDump
public List<String> getCalsuiteApproversList() {
final List<String> approvers = new ArrayList<>();
final String s = getProp(propertyCalsuiteApprovers);
if (s == null) {
return approvers;
}
final String[] split = s.split(",");
for (final String el : split) {
if (el == null) {
continue;
}
approvers.add(el);
}
return approvers;
}
use of org.bedework.calfacade.annotations.NoDump in project bw-calendar-engine by Bedework.
the class BwEvent method getTimeZoneIds.
/**
* Return all timezone ids this event uses. This is used when an event is
* added by another user to ensure that the target user has a copy of user
* specific timezones.
*
* @return Set of timezone ids.
* @throws CalFacadeException
*/
@NoProxy
@NoDump
public Set<String> getTimeZoneIds() throws CalFacadeException {
Set<String> ids = new TreeSet<String>();
BwDateTime dt = getDtstart();
if ((dt != null) && (dt.getTzid() != null)) {
ids.add(dt.getTzid());
}
dt = getDtend();
if ((dt != null) && (dt.getTzid() != null)) {
ids.add(dt.getTzid());
}
Set<BwDateTime> dts = getRdates();
if (dts != null) {
for (BwDateTime rdt : dts) {
if (rdt.getTzid() != null) {
ids.add(rdt.getTzid());
}
}
}
dts = getExdates();
if (dts != null) {
for (BwDateTime rdt : dts) {
if (rdt.getTzid() != null) {
ids.add(rdt.getTzid());
}
}
}
List<BwFreeBusyComponent> fbcs = getFreeBusyPeriods();
if (fbcs != null) {
for (BwFreeBusyComponent fbc : fbcs) {
for (Period p : fbc.getPeriods()) {
DateTime fdt = p.getStart();
if (fdt.getTimeZone() != null) {
ids.add(fdt.getTimeZone().getID());
}
fdt = p.getEnd();
if (fdt.getTimeZone() != null) {
ids.add(fdt.getTimeZone().getID());
}
}
}
}
return ids;
}
use of org.bedework.calfacade.annotations.NoDump in project bw-calendar-engine by Bedework.
the class BwResourceContent method getStringContent.
/**
* @return String value
* @throws CalFacadeException
*/
@NoDump
public String getStringContent() throws CalFacadeException {
try {
final Blob b = getValue();
if (b == null) {
return null;
}
int len = -1;
final int chunkSize = 1024;
final byte[] buffer = new byte[chunkSize];
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
final InputStream str = b.getBinaryStream();
while ((len = str.read(buffer)) != -1) {
baos.write(buffer, 0, len);
}
return new String(baos.toByteArray());
} catch (final Throwable t) {
throw new CalFacadeException(t);
}
}
use of org.bedework.calfacade.annotations.NoDump in project bw-calendar-engine by Bedework.
the class BwString method getRestoreCallback.
@NoDump
public static FromXmlCallback getRestoreCallback() {
if (fromXmlCb == null) {
fromXmlCb = new FromXmlCallback();
fromXmlCb.addSkips("byteSize", "id", "seq", "size");
}
return fromXmlCb;
}
use of org.bedework.calfacade.annotations.NoDump in project bw-calendar-engine by Bedework.
the class BwCalendar method getSupportedComponents.
/**
* @return the supported components
*/
@NoDump
public List<String> getSupportedComponents() {
if (supportedComponents == null) {
supportedComponents = new ArrayList<>();
final int ctype = getCalType();
if (ctype == calTypePoll) {
supportedComponents.add("VPOLL");
return supportedComponents;
}
if (ctype == calTypeTasks) {
supportedComponents.add("VTODO");
return supportedComponents;
}
if (ctype == calTypeInbox) {
supportedComponents.add("VPOLL");
supportedComponents.add("VEVENT");
supportedComponents.add("VTODO");
supportedComponents.add("VAVAILABILITY");
return supportedComponents;
}
if ((ctype != calTypeCalendarCollection) && (ctype != calTypeOutbox) && (ctype != calTypeExtSub)) {
return supportedComponents;
}
final String slist = getQproperty(CaldavTags.supportedCalendarComponentSet);
if (slist == null) {
supportedComponents.add("VEVENT");
// supportedComponents.add("VTODO");
// supportedComponents.add("VAVAILABILITY");
} else {
final String[] ss = slist.split(",");
supportedComponents.addAll(Arrays.asList(ss));
}
}
return supportedComponents;
}
Aggregations