Examples of LibrarySettings


Examples of org.davinci.server.user.LibrarySettings

      return this.resource.delete();
    }
   
  protected LibrarySettings getLibSettings() {
   
    return new LibrarySettings(this.resource.newInstance(this.resource, IDavinciServerConstants.SETTINGS_DIRECTORY_NAME));
  }
View Full Code Here

Examples of org.davinci.server.user.LibrarySettings

     
      if(isConfig(userFiles[j].getName()) || !userFiles[j].isDirectory()) continue;
      VStorageDirectory element = new VStorageDirectory(userFiles[j], root, userFiles[j].getName(),true);
      root.add(element);
    }
    LibrarySettings settings = this.getLibSettings();
    if(!settings.exists()) return;
   
    /* see if there is a .settings/libs.settings file.  If there is
     * build out the virtual structure
     */
    Vector<ILibInfo> libs = new Vector();
    libs.addAll(Arrays.asList( settings.allLibs()));
    for (int i = 0; i < libs.size(); i++) {
      root = this;
      String defaultRoot = libs.get(i).getVirtualRoot();
      if(defaultRoot==null) continue;
      Library b = this.getLibrary(libs.get(i));
View Full Code Here

Examples of org.davinci.server.user.LibrarySettings

    IStorage baseFile = userDirectory.newInstance(this.userDirectory, base);
    if(!isValid(baseFile.getAbsolutePath())) return;
    IStorage settings = userDirectory.newInstance(baseFile, IDavinciServerConstants.SETTINGS_DIRECTORY_NAME);
    settings.mkdirs();
   
    LibrarySettings ls = this.getLibSettings(base);
    ls.save();
    ILibraryFinder[] finders = this.getFinders(base);
    for(int i=0;i<finders.length;i++){
      finders[i].librarySettingsChanged(ls.allLibs());
    }
    rebuildWorkspace();

 
  }
View Full Code Here

Examples of org.davinci.server.user.LibrarySettings

    return getLibSettings(this.userDirectory.newInstance(this.userDirectory, base));
   
  }
  protected LibrarySettings getLibSettings(IStorage baseFile) {
    if(!isValid(baseFile.getAbsolutePath())) return null;
    return new LibrarySettings(this.userDirectory.newInstance(baseFile, IDavinciServerConstants.SETTINGS_DIRECTORY_NAME));
  }
View Full Code Here

Examples of org.davinci.server.user.LibrarySettings

  /* (non-Javadoc)
   * @see org.davinci.server.user.IUser#modifyLibrary(java.lang.String, java.lang.String, java.lang.String, boolean)
   */
  public void modifyLibrary(String id, String version, String base, boolean installed, boolean required) throws IOException {
    LibrarySettings libs = this.getLibSettings(base);

    if (!installed) {
      libs.removeLibrary(id, version, base);

    } else {
      String defaultRoot = ServerManager.getServerManager().getLibraryManager().getDefaultRoot(id, version);
      libs.addLibrary(id, version, id, defaultRoot, required?"true":"false");
    }
   
    ILibraryFinder[] finders = this.getFinders(base);
    for(int i=0;i<finders.length;i++){
      finders[i].librarySettingsChanged(libs.allLibs());
    }
   
    rebuildWorkspace();
  }
View Full Code Here

Examples of org.davinci.server.user.LibrarySettings

  /* (non-Javadoc)
   * @see org.davinci.server.user.IUser#modifyLibrary(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
   */
  public void modifyLibrary(String id, String version, String virtualRoot, String base, boolean required) throws IOException {
    LibrarySettings libs = this.getLibSettings(base);

    libs.modifyLibrary(id, version, virtualRoot, base, required?"true":"false");
    ILibraryFinder[] finders = this.getFinders(base);
    for(int i=0;i<finders.length;i++){
      finders[i].librarySettingsChanged(libs.allLibs());
    }
   
    rebuildWorkspace();
  }
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.