Example #1
0
 public void addResources(
     DavContext ctxt, Collection<DavResource> rss, DavContext.RequestProp props)
     throws DavException {
   ctxt.setStatus(DavProtocol.STATUS_MULTI_STATUS);
   boolean first = true;
   for (DavResource rs : rss) {
     if (first) ctxt.setDavCompliance(DavProtocol.getComplianceString(rs.getComplianceList()));
     addResourceTo(ctxt, rs, props, false);
     first = false;
   }
 }
Example #2
0
  /* Convenience method to gather requested properties from the resource and
   * append them to the response.
   */
  public void addResource(
      DavContext ctxt, DavResource rs, DavContext.RequestProp props, boolean includeChildren)
      throws DavException {
    ctxt.setStatus(DavProtocol.STATUS_MULTI_STATUS);
    ctxt.setDavCompliance(DavProtocol.getComplianceString(rs.getComplianceList()));
    addResourceTo(ctxt, rs, props, includeChildren);

    if (rs.isCollection() && includeChildren)
      for (DavResource child : rs.getChildren(ctxt))
        addResource(ctxt, child, props, includeChildren);
  }