Package org.olat.core.util.vfs

Examples of org.olat.core.util.vfs.VFSStatus


        item = resolveFile(containerName);
      }
    }
    if (item == null) return false;
   
    VFSStatus status;
    if (item instanceof VFSContainer) {
      status = item.canWrite();
    } else {
      // read/write is not defined on item level, only on directory level
      status = item.getParentContainer().canWrite();
View Full Code Here


  public void unbind(String name) throws NamingException {

    VFSItem file = resolveFile(name);
    if (file == null) throw new NamingException(smgr.getString("resources.notFound", name));

    VFSStatus status = file.delete();
    if (status == VFSConstants.NO)
      throw new NamingException(smgr.getString("resources.unbindFailed", name));
  }
View Full Code Here

    VFSItem newFile = resolveFile(newName);
    if (newFile != null)
      throw new NameAlreadyBoundException();
   
    VFSStatus status = oldFile.rename(newName);
    if (status == VFSConstants.NO)
      throw new NameAlreadyBoundException();
  }
View Full Code Here

        String selectedPath = ftm.getSelectedPath(selTree.getSelectedNode());
        if (selectedPath == null) {
          abortFailed(ureq, "failed");
          return;
        }
        VFSStatus vfsStatus = VFSConstants.SUCCESS;
        VFSContainer rootContainer = folderComponent.getRootContainer();
        VFSItem vfsItem = rootContainer.resolve(selectedPath);
        if (vfsItem == null || (vfsItem.canWrite() != VFSConstants.YES)) {
          abortFailed(ureq, "failed");
          return;
View Full Code Here

        cmc.deactivate();
        String repositorySoftKey = (String) moduleConfiguration.get(IQEditController.CONFIG_KEY_REPOSITORY_SOFTKEY);
        Long repKey = RepositoryManager.getInstance().lookupRepositoryEntryBySoftkey(repositorySoftKey, true).getKey();
        QTIResultManager.getInstance().deleteAllResults(course.getResourceableId(), courseNode.getIdent(), repKey);
        removeIQReference(moduleConfiguration);
        VFSStatus isDeleted = IQManager.getInstance().removeQtiSerFiles(course.getResourceableId(), courseNode.getIdent());
        if (!isDeleted.equals(VFSConstants.YES)) {
          // couldn't removed qtiser files
          log.warn("Couldn't removed course node folder! Course resourceable id: " + course.getResourceableId() + ", Course node ident: " + courseNode.getIdent());
        }
        doIQReference(urequest, replaceWizard.getSelectedRepositoryEntry());
      }
View Full Code Here

TOP

Related Classes of org.olat.core.util.vfs.VFSStatus

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.