use of org.bedework.caldav.server.CalDAVResource in project bw-calendar-engine by Bedework.
the class BwSysIntfImpl method newResourceObject.
/* ====================================================================
* Files
* ==================================================================== */
/* (non-Javadoc)
* @see org.bedework.caldav.server.SysIntf#newResourceObject(java.lang.String)
*/
@Override
public CalDAVResource newResourceObject(final String parentPath) throws WebdavException {
CalDAVResource r = new BwCalDAVResource(this, null);
r.setParentPath(parentPath);
r.setOwner(currentPrincipal);
return r;
}
use of org.bedework.caldav.server.CalDAVResource in project bw-calendar-engine by Bedework.
the class BwSysIntfImpl method getFiles.
/* (non-Javadoc)
* @see org.bedework.caldav.server.SysIntf#getFiles(org.bedework.caldav.server.CalDAVCollection)
*/
@Override
public Collection<CalDAVResource> getFiles(final CalDAVCollection coll) throws WebdavException {
try {
Collection<BwResource> bwrs = getSvci().getResourcesHandler().getAll(coll.getPath());
if (bwrs == null) {
return null;
}
Collection<CalDAVResource> rs = new ArrayList<CalDAVResource>();
for (BwResource r : bwrs) {
rs.add(new BwCalDAVResource(this, r));
}
return rs;
} catch (CalFacadeAccessException cfae) {
throw new WebdavForbidden();
} catch (CalFacadeException cfe) {
throw new WebdavException(cfe);
} catch (Throwable t) {
throw new WebdavException(t);
}
}
Aggregations