Examples of VFSItemExcludePrefixFilter


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

      }
    }
    // 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.VFSItemExcludePrefixFilter

    this.fm = ForumManager.getInstance();

    tempUploadFolder = new OlatRootFolderImpl(File.separator + "tmp/" + CodeHelper.getGlobalForeverUniqueID() + "/", null);
    // nfs creates .nfs12345 - files during deletion, those shouldn't be displayed / copied after save
    // See OLAT-4182 and OLAT-4219
    exclFilter = new VFSItemExcludePrefixFilter(ATTACHMENT_EXCLUDE_PREFIXES);
   
    // decide which mode is used
    this.editMode = "";
    if (message.getKey() == null) {
      editMode = EDITMODE_NEWTHREAD;
View Full Code Here

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

    // mount /static/themes, filter out CVS!
    String staticAbsPath = WebappHelper.getContextRoot() + "/static/themes";
    File themesFile = new File(staticAbsPath);
    LocalFolderImpl vfsThemes = new LocalFolderImpl(themesFile);
    vfsThemes.setDefaultItemFilter(new VFSItemExcludePrefixFilter(new String[]{"CVS","cvs"} ));
    VFSContainer vfsCont = vfsThemes;
    return vfsCont;
  }
View Full Code Here

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

    map.put("modified", dateFormat.format(m.getLastModified()));
    // message attachments
    ForumManager fm = ForumManager.getInstance();
    OlatRootFolderImpl msgContainer = fm.getMessageContainer(forum.getKey(), m.getKey());
    map.put("messageContainer", msgContainer);
    List<VFSItem> attachments = new ArrayList<VFSItem>(msgContainer.getItems(new VFSItemExcludePrefixFilter(MessageEditController.ATTACHMENT_EXCLUDE_PREFIXES)));
//    List attachments = msgContainer.getItems();
    map.put("attachments", attachments);
    if (attachments == null || attachments.size() == 0) map.put("hasAttachments", Boolean.FALSE);
    else map.put("hasAttachments", Boolean.TRUE);
    // number of children and modify/delete permissions
View Full Code Here

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

   
    map.put("modified", f.formatDateAndTime(m.getLastModified()));
    // message attachments
    OlatRootFolderImpl msgContainer = fm.getMessageContainer(forum.getKey(), m.getKey());
    map.put("messageContainer", msgContainer);
    List<VFSItem> attachments = new ArrayList<VFSItem>(msgContainer.getItems(new VFSItemExcludePrefixFilter(MessageEditController.ATTACHMENT_EXCLUDE_PREFIXES)));
//    List attachments = msgContainer.getItems();
    map.put("attachments", attachments);
    if (attachments == null || attachments.size() == 0) map.put("hasAttachments", Boolean.FALSE);
    else map.put("hasAttachments", Boolean.TRUE);
    // number of children and modify/delete permissions
View Full Code Here

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

   *
   * @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.VFSItemExcludePrefixFilter

    // 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.