Examples of MergeSource


Examples of org.exist.versioning.svn.internal.wc.SVNMergeDriver.MergeSource

            SVNWCAccess wcAccess = getWCAccess();
            if (wcAccess.getAdminArea(file) == null) {
                wcAccess.probeTry(file, true, SVNWCAccess.INFINITE_DEPTH);
            }
           
            MergeSource mergeSource = myMergeDriver.getCurrentMergeSource();
            if (mergeSource.getRevision1() < mergeSource.getRevision2()) {
                SVNProperties filteredProps = myMergeDriver.filterSelfReferentialMergeInfo(regularProps, file);
                if (filteredProps != null) {
                    regularProps = filteredProps;
                }
            }
View Full Code Here

Examples of org.exist.versioning.svn.internal.wc.SVNMergeDriver.MergeSource

            SVNWCAccess wcAccess = getWCAccess();
            if (wcAccess.getAdminArea(file) == null) {
                wcAccess.probeTry(file, true, SVNWCAccess.INFINITE_DEPTH);
            }
           
            MergeSource mergeSource = myMergeDriver.getCurrentMergeSource();
            if (mergeSource.getRevision1() < mergeSource.getRevision2()) {
                SVNProperties filteredProps = myMergeDriver.filterSelfReferentialMergeInfo(regularProps, file);
                if (filteredProps != null) {
                    regularProps = filteredProps;
                }
            }
View Full Code Here

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

  /**
   * Returns a mountable root containing all entries which will be exposed to the webdav mount.
   * @return
   */
  public VFSItem getMountableRoot(Identity identity) {
    MergeSource vfsRoot = new MergeSource(null, "webdavroot");
    for (Iterator iter = webdavProviders.keySet().iterator(); iter.hasNext();) {
      WebDAVProvider provider = (WebDAVProvider)webdavProviders.get(iter.next());
      vfsRoot.addContainer(new NamedContainerImpl(provider.getMountPoint(), provider.getContainer(identity)));
    }
    return vfsRoot;
  }
View Full Code Here

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

  /**
   * @see org.olat.commons.servlets.util.WebDAVProvider#getContainer(org.olat.core.id.Identity)
   */
  public VFSContainer getContainer(Identity identity) {
    // merge /public and /private
    MergeSource homeMergeSource = new MergeSource(null, identity.getName());
   
    // mount /public
    OlatRootFolderImpl vfsPublic = new OlatRootFolderImpl(getRootPathFor(identity) + "/public", homeMergeSource);
    vfsPublic.getBasefile().mkdirs(); // lazy initialize folders
    // we do a little trick here and wrap it again in a NamedContainerImpl so
    // it doesn't show up as a OlatRootFolderImpl to prevent it from editing its MetaData
    OlatNamedContainerImpl vfsNamedPublic = new OlatNamedContainerImpl("public", vfsPublic);
   
    // mount /private
    OlatRootFolderImpl vfsPrivate = new OlatRootFolderImpl(getRootPathFor(identity) + "/private", homeMergeSource);
    vfsPrivate.getBasefile().mkdirs(); // lazy initialize folders
    // we do a little trick here and wrap it again in a NamedContainerImpl so
    // it doesn't show up as a OlatRootFolderImpl to prevent it from editing its MetaData
    OlatNamedContainerImpl vfsNamedPrivate = new OlatNamedContainerImpl("private", vfsPrivate);
   
    // set quota for this merge source
    QuotaManager qm = QuotaManager.getInstance();
    Quota quota = qm.getCustomQuotaOrDefaultDependingOnRole(identity, getRootPathFor(identity));
    FullAccessWithQuotaCallback secCallback = new FullAccessWithQuotaCallback(quota);

    homeMergeSource.setLocalSecurityCallback(secCallback);
    homeMergeSource.addContainer(vfsNamedPublic);
    homeMergeSource.addContainer(vfsNamedPrivate);
   
    return homeMergeSource;
  }
View Full Code Here

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

   */
  public VFSContainer getContainer(Identity identity) {
    Manager secMgr = ManagerFactory.getManager();
    //FIXME: RH: check if it really should return something => why an empty container?
    if (!secMgr.isIdentityPermittedOnResourceable(identity, Constants.PERMISSION_HASROLE, Constants.ORESOURCE_ADMIN)){
      return new MergeSource(null, null);
    }   

    // mount /static/themes, filter out CVS!
    String staticAbsPath = WebappHelper.getContextRoot() + "/static/themes";
    File themesFile = new File(staticAbsPath);
View Full Code Here

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

  /**
   * @see org.olat.course.ICourse#getCourseFolderPath()
   */
  public VFSContainer getCourseFolderContainer() {
    // add local course folder's children as read/write source and any sharedfolder as subfolder
    MergeSource courseFolderContainer = new MergeSource(null, getCourseTitle());
    courseFolderContainer.addContainersChildren(getIsolatedCourseFolder(), true);
   
    // grab any shared folder that is configured
    OlatRootFolderImpl sharedFolder = null;
    String sfSoftkey = getCourseConfig().getSharedFolderSoftkey();
    if (sfSoftkey != null) {
      RepositoryManager rm = RepositoryManager.getInstance();
      RepositoryEntry re = rm.lookupRepositoryEntryBySoftkey(sfSoftkey, false);
      if (re != null) {
        sharedFolder = SharedFolderManager.getInstance().getSharedFolder(re.getOlatResource());
        if (sharedFolder != null){
          sharedFolder.setLocalSecurityCallback(new ReadOnlyCallback());
          //add local course folder's children as read/write source and any sharedfolder as subfolder
          courseFolderContainer.addContainer(new NamedContainerImpl("_sharedfolder", sharedFolder));
        }
      }
    }
   
    // add all course building blocks of type BC to a virtual folder
    MergeSource BCNodesContainer = new MergeSource(null, "_courseelementdata");
    addFolderBuildingBlocks(BCNodesContainer, getRunStructure().getRootNode());
    if (BCNodesContainer.getItems().size() > 0) {
      courseFolderContainer.addContainer(BCNodesContainer);
    }
   
    return courseFolderContainer;
  }
View Full Code Here

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

  private static final String MOUNTPOINT = "coursefolders";

  public String getMountPoint() { return MOUNTPOINT; }

  public VFSContainer getContainer(Identity identity) {
    MergeSource cfRoot = new MergeSource(null, null);
    RepositoryManager rm = RepositoryManager.getInstance();
    List courseEntries = rm.queryByOwner(identity, CourseModule.getCourseTypeName());
   
    for (Iterator iter = courseEntries.iterator(); iter.hasNext();) {
      RepositoryEntry re = (RepositoryEntry) iter.next();
      OLATResourceable res = re.getOlatResource();
      ICourse course = CourseFactory.loadCourse(res.getResourceableId());
      VFSContainer courseFolder = course.getCourseFolderContainer();
      //NamedContainerImpl cfContainer = new NamedContainerImpl(Formatter.makeStringFilesystemSave(course.getCourseTitle()), courseFolder);
      NamedContainerImpl cfContainer;
      cfContainer = new NamedContainerImpl(Formatter.makeStringFilesystemSave(course.getCourseTitle()), courseFolder);
      cfRoot.addContainer(cfContainer);
    }
    return cfRoot;
  }
View Full Code Here

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

  /**
   * @see org.olat.commons.servlets.util.WebDAVProvider#getContainer(org.olat.core.id.Identity)
   */
  public VFSContainer getContainer(Identity identity) {
    MergeSource rootContainer = new MergeSource(null, "root");

    SharedFolderManager sfm = SharedFolderManager.getInstance();
    RepositoryManager repoManager = RepositoryManager.getInstance();
    List<RepositoryEntry> ownerEntries = (List<RepositoryEntry>) repoManager.queryByOwner(identity, SharedFolderFileResource.TYPE_NAME);
    for (RepositoryEntry repoEntry : ownerEntries) {
      rootContainer.addContainer(sfm.getNamedSharedFolder(repoEntry));
    }

    // see /olat3/webapp/WEB-INF/olat_extensions.xml
    if (publiclyReadableFolders != null && publiclyReadableFolders.size() > 0) {
      // Temporarily save added entries. This is needed to make sure not to add
View Full Code Here

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

  private static final String MOUNTPOINT = "groupfolders";

  public String getMountPoint() { return MOUNTPOINT; }

  public VFSContainer getContainer(Identity identity) {
    MergeSource cfRoot = new MergeSource(null, null);
    // collect buddy groups
    BusinessGroupManager bgm = BusinessGroupManagerImpl.getInstance();
    QuotaManager qm = QuotaManager.getInstance();
    List<BusinessGroup> groups = bgm.findBusinessGroupsAttendedBy(null, identity, null);
    groups.addAll(bgm.findBusinessGroupsOwnedBy(null, identity, null));

    List<Long> addedGroupKeys = new ArrayList<Long>();
    List<String> addedGroupNames = new ArrayList<String>();
    for (BusinessGroup group : groups) {
      if (addedGroupKeys.contains(group.getKey())) continue; // check for duplicate groups
      CollaborationTools tools = CollaborationToolsFactory.getInstance().getOrCreateCollaborationTools(group);
      if (tools.isToolEnabled(CollaborationTools.TOOL_FOLDER)) {
        String name = group.getName();
        if (addedGroupNames.contains(name)) {
          // attach a serial to the group name to avoid duplicate mount points...
          int serial = 1;
          int serialMax = 100;
          while (addedGroupNames.contains(name + serial) && serial < serialMax) {
            serial++;
          }
          if (serial == serialMax) continue; // continue without adding mount point
          name = name + serial;
        }
       
        // create container and set quota
        OlatRootFolderImpl localImpl = new OlatRootFolderImpl(tools.getFolderRelPath(), cfRoot);
        localImpl.getBasefile().mkdirs(); // lazy initialize dirs
        NamedContainerImpl grpContainer = new NamedContainerImpl(Formatter.makeStringFilesystemSave(name), localImpl);
        Quota q = qm.getCustomQuota(tools.getFolderRelPath());
        if (q == null) {
          Quota defQuota = qm.getDefaultQuota(QuotaConstants.IDENTIFIER_DEFAULT_GROUPS);
          q = QuotaManager.getInstance().createQuota(tools.getFolderRelPath(), defQuota.getQuotaKB(), defQuota.getUlLimitKB());
        }
        FullAccessWithQuotaCallback secCallback = new FullAccessWithQuotaCallback(q);
        grpContainer.setLocalSecurityCallback(secCallback);
       
        // add container
        cfRoot.addContainer(grpContainer);
        addedGroupKeys.add(group.getKey());
        addedGroupNames.add(name);
      }
    }
    return cfRoot;
View Full Code Here

Examples of org.tmatesoft.svn.core.internal.wc.SVNMergeDriver.MergeSource

            SVNWCAccess wcAccess = getWCAccess();
            if (wcAccess.getAdminArea(file) == null) {
                wcAccess.probeTry(file, true, SVNWCAccess.INFINITE_DEPTH);
            }
           
            MergeSource mergeSource = myMergeDriver.getCurrentMergeSource();
            if (mergeSource.getRevision1() < mergeSource.getRevision2()) {
                SVNProperties filteredProps = myMergeDriver.filterSelfReferentialMergeInfo(regularProps, file);
                if (filteredProps != null) {
                    regularProps = filteredProps;
                }
            }
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.