Examples of VfsResource


Examples of com.adito.vfs.VFSResource

    if (log.isDebugEnabled())
      log.debug("List files.");
    FileSystemForm fileSystemForm = (FileSystemForm) form;

    try {
      VFSResource res = checkLaunchSession(request, response, fileSystemForm);
      return new ActionForward(mapping.getPath() + ".do?actionTarget=list&path=" + res.getMount().getMountString() + "&" + LaunchSession.LAUNCH_ID + "=" + fileSystemForm.getLaunchId(), true);

    } catch (DAVAuthenticationRequiredException e) {
      AbstractHTTPAuthenticationModule.sendAuthorizationError(request, response, e.getHttpRealm());
      return null;
    }
View Full Code Here

Examples of com.adito.vfs.VFSResource

    ActionForward fwd = checkAccess(mapping, fileSystemForm, request);
    if (fwd != null) {
      return fwd;
    }

    VFSResource sourceResource = null;
    VFSResource destResource = null;
    try {
      sourceResource = getResourceForPath(fileSystemForm.getLaunchSession(),
        request,
        response,
        fileSystemForm.getPath() + "/" + fileSystemForm.getFileName());
      destResource = getResourceForPath(fileSystemForm.getLaunchSession(), request, response, fileSystemForm.getPath() + "/"
        + fileSystemForm.getNewName());

      if (sourceResource == null) {
        throw new Exception("Could not locate source resource '" + fileSystemForm.getPath()
          + "/"
          + fileSystemForm.getFileName()
          + "'");
      }
      if (destResource == null) {
        throw new Exception("Could not locate destination resource '" + fileSystemForm.getPath()
          + "/"
          + fileSystemForm.getNewName()
          + "'");
      }
           
            if(sourceResource.getFullPath().equals(destResource.getFullPath())) {
                return mapping.findForward("list");
            }
           
      fwd = checkMount(destResource, mapping, fileSystemForm, request);
      if (fwd != null) {
        return fwd;
      }
      sourceResource.move(destResource, true);

      if (sourceResource.getMount().getStore().getProvider().isFireEvents()) {
        CoreServlet.getServlet().fireCoreEvent(NetworkPlaceResourceType.getResourceAccessRenameEvent(this,
          fileSystemForm.getLaunchSession(),
          request,
          fileSystemForm.getPath(),
          fileSystemForm.getFullURI(),
          sourceResource.getDisplayName(),
          destResource.getDisplayName(),
          null));
      }

    } catch (DAVAuthenticationRequiredException e) {
      AbstractHTTPAuthenticationModule.sendAuthorizationError(request, response, e.getHttpRealm());
      return null;
    } catch (Exception e) {
      if (sourceResource != null && destResource != null) {
        if (sourceResource.getMount().getStore().getProvider().isFireEvents()) {
          CoreServlet.getServlet().fireCoreEvent(NetworkPlaceResourceType.getResourceAccessRenameEvent(this,
            fileSystemForm.getLaunchSession(),
            request,
            fileSystemForm.getPath(),
            fileSystemForm.getFullURI(),
            sourceResource.getDisplayName(),
            destResource.getDisplayName(),
            e));
        }
      }
      if (log.isErrorEnabled()) {
        log.error("Rename Error.", e);
View Full Code Here

Examples of com.adito.vfs.VFSResource

    if (log.isDebugEnabled())
      log.debug("List files.");
    FileSystemForm fileSystemForm = (FileSystemForm) form;

    try {
      VFSResource res = checkLaunchSession(request, response, fileSystemForm);
      ActionForward fwd = checkAccess(mapping, fileSystemForm, request);
      if (fwd != null) {
        return fwd;
      }
      fwd = checkMount(res, mapping, fileSystemForm, request);
      if (fwd != null) {
        return fwd;
      }

      /**
       * LDP - This extra getChildren exception was being ignored. This is not
       * acceptable behaviour, instead we now catch the exception and display as
       * an error on screen, and log to file.
       *
       * This extra getChildren also meant that each directory is listed TWICE!
       */
//           
//            try {
//                res.getChildren();
//                // if we can't get the children we are assuming access was denied
//            } catch (FileSystemException e) {
//
//            }
           
      buildModel(res, fileSystemForm, request);
      if (res.getMount().getStore().getProvider().isFireEvents()) {
        CoreServlet.getServlet().fireCoreEvent(NetworkPlaceResourceType.getResourceAccessListEvent(this,
          fileSystemForm.getLaunchSession(),
          request,
          fileSystemForm.getPath(),
          fileSystemForm.getFullURI(),
View Full Code Here

Examples of com.adito.vfs.VFSResource

      }
      fileSystemForm.setLaunchSession(launchSession);
    }
    DAVTransaction transaction = new DAVTransaction(request, response);
    VFSRepository repository = VFSRepository.getRepository(launchSession.getSession().getHttpSession());
    VFSResource res = repository.getResource(launchSession, fileSystemForm.getPath(), transaction.getCredentials());
    if (res == null) {
      throw new Exception("Could not find network place resource for path " + fileSystemForm.getPath() + ".");
    }
    fileSystemForm.setVFSResource(res);
    return res;
View Full Code Here

Examples of com.adito.vfs.VFSResource

                  String path) throws Exception {

    DAVTransaction transaction = new DAVTransaction(request, response);

    VFSRepository repository = VFSRepository.getRepository(request.getSession());
    VFSResource res = repository.getResource(launchSession, path, transaction.getCredentials());

    if (res == null) {
      throw new Exception("Could not find network place resource for path " + path + ".");
    }
    return res;
View Full Code Here

Examples of com.adito.vfs.VFSResource

      log.debug("Zip files.");

    FileSystemForm fileSystemForm = (FileSystemForm) form;

    try {
      VFSResource res = checkLaunchSession(request, response, fileSystemForm);
      ActionForward fwd = checkAccess(mapping, fileSystemForm, request);
      if (fwd != null) {
        return fwd;
      }
      buildModel(res, fileSystemForm, request);
View Full Code Here

Examples of com.adito.vfs.VFSResource

    if (log.isDebugEnabled())
      log.debug("Delete files.");
    FileSystemForm fileSystemForm = (FileSystemForm) form;

    try {
      VFSResource res = checkLaunchSession(request, response, fileSystemForm);
      ActionForward fwd = checkAccess(mapping, fileSystemForm, request);
      if (fwd != null) {
        return fwd;
      }
      fwd = checkMount(res, mapping, fileSystemForm, request);
View Full Code Here

Examples of com.adito.vfs.VFSResource

    if (log.isDebugEnabled())
      log.debug("Delete selected files.");
    FileSystemForm fileSystemForm = (FileSystemForm) form;

    try {
      VFSResource res = checkLaunchSession(request, response, fileSystemForm);
      ActionForward fwd = checkAccess(mapping, fileSystemForm, request);
      if (fwd != null) {
        return fwd;
      }
      fwd = checkMount(res, mapping, fileSystemForm, request);
View Full Code Here

Examples of com.adito.vfs.VFSResource

    if (log.isDebugEnabled())
      log.debug("Delete file.");
    FileSystemForm fileSystemForm = (FileSystemForm) form;

    try {
      VFSResource res = checkLaunchSession(request, response, fileSystemForm);
      ActionForward fwd = checkAccess(mapping, fileSystemForm, request);
      if (fwd != null) {
        return fwd;
      }
      fwd = checkMount(res, mapping, fileSystemForm, request);
View Full Code Here

Examples of com.adito.vfs.VFSResource

    if (log.isDebugEnabled())
      log.debug("Delete file.");
    FileSystemForm fileSystemForm = (FileSystemForm) form;

    try {
      VFSResource res = checkLaunchSession(request, response, fileSystemForm);
      ActionForward fwd = checkAccess(mapping, fileSystemForm, request);
      if (fwd != null) {
        return fwd;
      }
      fwd = checkMount(res, mapping, fileSystemForm, request);
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.