Examples of VFSItemFilter


Examples of org.olat.core.util.vfs.filters.VFSItemFilter

        break;
      }
    }
    // create directory filter combined with suffix filter
    String[] dirFilters = { "_courseelementdata" };
    VFSItemFilter customFilter = null;
    VFSItemFilter dirFilter = new VFSItemExcludePrefixFilter(dirFilters);
    if (suffixes != null) {
      VFSItemFileTypeFilter typeFilter = new VFSItemFileTypeFilter(
          suffixes);
      typeFilter.setCompositeFilter(dirFilter);
      customFilter = typeFilter;
View Full Code Here

Examples of org.olat.core.util.vfs.filters.VFSItemFilter

   * @param vfsContainer
   * @return
   */
  private void initFileSelectionController(UserRequest ureq) {
    VFSContainer vfsRoot = new NamedContainerImpl(getTranslator().translate(NLS_FOLDER_DISPLAYNAME), rootContainer);
    VFSItemFilter typeFilter = null;
    if (!allFileSuffixesAllowed && allowedFileSuffixes != null) {
      typeFilter = new VFSItemFileTypeFilter(allowedFileSuffixes);
    }
    // Clanup old file chooser and open up new one
    removeAsListenerAndDispose(fileChooserCtr);
View Full Code Here

Examples of org.olat.core.util.vfs.filters.VFSItemFilter

   *
   * @param parentContainer
   */
  private void deleteIfEmpty(VFSContainer container) {
    String[] unwantedPrefixes = { "." };
    VFSItemFilter filter = new VFSItemExcludePrefixFilter(unwantedPrefixes);
    if (container != null) {
      List<VFSItem> items = container.getItems(filter);
      if (items == null || items.size() == 0) {
        container.delete();
      }
View Full Code Here

Examples of org.olat.core.util.vfs.filters.VFSItemFilter

    // Create File chooser for the web app root directory
    File webappRootFile = new File(WebappHelper.getContextRoot());
    VFSContainer webappRoot = new LocalFolderImpl(webappRootFile)
    // don't show cvs and hidden files meta files
    VFSItemFilter filter = new VFSItemExcludePrefixFilter(new String[]{"CVS","cvs", "."});
    // create file chooser with the filter and the web app root
    chooserCtr = FileChooserUIFactory.createFileChooserController(ureq, getWindowControl(), webappRoot, filter, false);
    listenTo(chooserCtr);   
    contentVC.put("chooserCtr", chooserCtr.getInitialComponent());
   
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.