Examples of DavResource


Examples of org.apache.jackrabbit.webdav.DavResource

    /**
     * @see DavResource#getCollection()
     */
    public DavResource getCollection() {
        DavResource parent = null;
        if (getResourcePath() != null && !getResourcePath().equals("/")) {
            String parentPath = Text.getRelativeParent(getResourcePath(), 1);
            if (parentPath.equals("")) {
                parentPath = "/";
            }
View Full Code Here

Examples of org.apache.jackrabbit.webdav.DavResource

                NodeIterator it = node.getNodes();
                while (it.hasNext()) {
                    Node n = it.nextNode();
                    if (!isFilteredItem(n)) {
                        DavResourceLocator resourceLocator = locator.getFactory().createResourceLocator(locator.getPrefix(), locator.getWorkspacePath(), n.getPath(), false);
                        DavResource childRes = factory.createResource(resourceLocator, session);
                        list.add(childRes);
                    } else {
                        log.debug("Filtered resource '" + n.getName() + "'.");
                    }
                }
View Full Code Here

Examples of org.cast.cwm.dav.DavResource

    } else if (Strings.isEmpty(glossaryFileName)) {
      log.debug("No glossary file");
    } else { // when the glossary is on
      Resource glossaryResource;
      if (davServer != null) {
        glossaryResource = new DavResource(davServer, getContentDir() + "/" + glossaryFileName);
      } else {
        glossaryResource = new FileResource(new File(getContentDir(), glossaryFileName));
      }
      final XmlDocument glossaryDoc = xmlService.loadXmlDocument("glossary", glossaryResource, new DtbookParser(), null);
     
      // Set up Glossary
      Databinder.ensureSession(new SessionUnit() {
        public Object run(Session sess) {
          glossary = GlossaryService.get().parseXmlGlossaryDocument(glossaryDoc);
          return null;
        }
      });
    }
       
    // Load student content files
    String fileList = appProperties.getProperty("isi.studentContentFiles", DEFAULT_STUDENT_CONTENT_FILE_NAMES).trim();
    studentContentFiles = fileList.split("\\s*,\\s*");   
    documentObservers.add(new XmlDocumentObserver(getSectionElement(), getPageElement())); // Use set so sub-classed applications can add to it as well
    for (String file : studentContentFiles) {
      Resource resource;
      if (davServer != null) {
        log.debug("attempting to load DavResource file = {}", getContentDir() + "/" + file);
        log.debug("loading the DavResource on the Server = {}", davServer);
        resource = new DavResource(davServer, getContentDir() + "/" + file);
      } else {
        log.debug("attempting to load Resource file = {}", getContentDir() + "/" + file);
        resource = new FileResource(new File(getContentDir(), file));
      }
      XmlDocument doc = xmlService.loadXmlDocument(file, resource, new DtbookParser(), documentObservers);
      studentContent.add(doc);
    }
   
    // Load email content files
    if (emailOn) {
      String emailFileName = EMAIL_FILE_NAME;         
      Resource emailResource;
      if (davServer != null) {
        emailResource = new DavResource(davServer, getContentDir() + "/" + emailFileName);
      } else {
        emailResource = new FileResource(new File(getContentDir(), emailFileName));
      }
      emailContent = xmlService.loadXmlDocument("email", emailResource, new DtbookParser(), null);         
    }
View Full Code Here

Examples of org.tmatesoft.svn.core.internal.server.dav.DAVResource

    protected DAVRequest getDAVRequest() {
        return getPropfindRequest();
    }

    public void execute() throws SVNException {
        DAVResource resource = getRequestedDAVResource(true, false);

        DAVResourceState resourceState = getResourceState(resource);
        if (resourceState == DAVResourceState.NULL) {
            //TODO: what body should we send?
            sendError(HttpServletResponse.SC_NOT_FOUND, null);
            return;
        }
       
        DAVDepth depth = getRequestDepth(DAVDepth.DEPTH_INFINITY);
        //TODO: check the depth is not less than 0; if it is, send BAD_REQUEST
       
        if (depth == DAVDepth.DEPTH_INFINITY && resource.isCollection()) {
            DAVConfig config = getConfig();
            if (!config.isAllowDepthInfinity()) {
                String message = "PROPFIND requests with a Depth of \"infinity\" are not allowed for " +
                    SVNEncodingUtil.xmlEncodeCDATA(getURI()) + ".";
                response(message, DAVServlet.getStatusLine(HttpServletResponse.SC_FORBIDDEN), HttpServletResponse.SC_FORBIDDEN);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.