Package org.apache.jackrabbit.webdav

Examples of org.apache.jackrabbit.webdav.DavResourceIterator


     * @return
     */
    private static boolean isInternalMember(DavResource resource, String memberPath) {
        if (resource.getResourcePath().equals(Text.getRelativeParent(memberPath, 1))) {
            // find the member with the given path
            DavResourceIterator it = resource.getMembers();
            while (it.hasNext()) {
                DavResource member = it.nextResource();
                if (member.getResourcePath().equals(memberPath)) {
                    // return true if that member is not a collection
                    return !member.isCollection();
                }
            }
View Full Code Here


            }
        } catch (DavException e) {
            log.error(e);
        }
        if (depth > 0) {
            DavResourceIterator it = res.getMembers();
            while (it.hasNext()) {
                buildResponse(it.nextResource(), propNameSet, depth-1, ms);
            }
        }
    }
View Full Code Here

     */
    private void addResponses(DavResource res, int depth, MultiStatus ms) {
        MultiStatusResponse response = getResponse(res, propertyElements);
        ms.addResponse(response);
        if (depth > 0) {
            DavResourceIterator it = res.getMembers();
            while (it.hasNext()) {
                addResponses(it.nextResource(), depth-1, ms);
            }
        }
    }
View Full Code Here

     * @param ms
     */
    private void buildResponse(DavResource res, DavPropertyNameSet propNameSet,
                               int depth, MultiStatus ms) {
        // loop over members first, since this report only list members
        DavResourceIterator it = res.getMembers();
        while (!vhHrefSet.isEmpty() && it.hasNext()) {
            DavResource childRes = it.nextResource();
            if (childRes instanceof VersionControlledResource) {
                try {
                    VersionHistoryResource vhr = ((VersionControlledResource)childRes).getVersionHistory();
                    if (vhHrefSet.remove(vhr.getHref())) {
                        if (propNameSet.isEmpty()) {
                            ms.addResourceStatus(childRes, DavServletResponse.SC_OK, 0);
                        } else {
                            ms.addResourceProperties(childRes, propNameSet, 0);
                        }
                    }
                } catch (DavException e) {
                    log.info(e.getMessage());
                }
            }
            // traverse subtree
            if (depth > 0) {
                buildResponse(it.nextResource(), propNameSet, depth-1, ms);
            }
        }
    }
View Full Code Here

     * @return
     */
    private static boolean isInternalMember(DavResource resource, String memberPath) {
  if (resource.getResourcePath().equals(Text.getRelativeParent(memberPath, 1))) {
      // find the member with the given path
      DavResourceIterator it = resource.getMembers();
      while (it.hasNext()) {
    DavResource member = it.nextResource();
    if (member.getResourcePath().equals(memberPath)) {
        // return true if that member is not a collection
        return !member.isCollection();
    }
      }
View Full Code Here

                writer.print("</title></head>");
                writer.print("<body><h2>");
                writer.print(resource.getResourcePath());
                writer.print("</h2><ul>");
                writer.print("<li><a href=\"..\">..</a></li>");
                DavResourceIterator iter = resource.getMembers();
                while (iter.hasNext()) {
                    DavResource child = iter.nextResource();
                    String label = Text.getName(child.getResourcePath());
                    writer.print("<li><a href=\"");
                    writer.print(child.getHref());
                    writer.print("\">");
                    writer.print(label);
View Full Code Here

            sb.append(repostr);
            sb.append("</title></head>");
            sb.append("<body><h2>").append(repostr).append("</h2>");
            sb.append("<h3>Available Workspace Resources:</h3><ul>");

            DavResourceIterator it = getMembers();
            while (it.hasNext()) {
                DavResource res = it.nextResource();
                sb.append("<li><a href=\"");
                sb.append(res.getHref());
                sb.append("\">");
                sb.append(res.getDisplayName());
                sb.append("</a></li>");
View Full Code Here

            sb.append("<html><head><title>");
            sb.append(repostr);
            sb.append("</title></head>");
            sb.append("<body><h2>").append(repostr).append("</h2><ul>");
            sb.append("<li><a href=\"..\">..</a></li>");
            DavResourceIterator it = getMembers();
            while (it.hasNext()) {
                DavResource res = it.nextResource();
                sb.append("<li><a href=\"");
                sb.append(res.getHref());
                sb.append("\">");
                sb.append(res.getDisplayName());
                sb.append("</a></li>");
View Full Code Here

            sb.append("<html><head><title>");
            sb.append(repostr);
            sb.append("</title></head>");
            sb.append("<body><h2>").append(repostr).append("</h2><ul>");
            sb.append("<li><a href=\"..\">..</a></li>");
            DavResourceIterator it = getMembers();
            while (it.hasNext()) {
                DavResource res = it.nextResource();
                sb.append("<li><a href=\"");
                sb.append(res.getHref());
                sb.append("\">");
                sb.append(res.getDisplayName());
                sb.append("</a></li>");
View Full Code Here

            sb.append(repostr);
            sb.append("</title></head>");
            sb.append("<body><h2>").append(repostr).append("</h2>");
            sb.append("<h3>Available Workspace Resources:</h3><ul>");

            DavResourceIterator it = getMembers();
            while (it.hasNext()) {
                DavResource res = it.nextResource();
                sb.append("<li><a href=\"");
                sb.append(res.getHref());
                sb.append("\">");
                sb.append(res.getDisplayName());
                sb.append("</a></li>");
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.webdav.DavResourceIterator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.