Examples of canDelete()


Examples of org.olat.core.util.vfs.VFSItem.canDelete()

   * @param name
   * @return true: can delete; false: can not delete
   */
  public boolean canDelete(String name) {
    VFSItem item = resolveFile(name);
    if (item != null && VFSConstants.YES.equals(item.canDelete())) {
      return !MetaInfoHelper.isLocked(item, userSession);
    }
    else return false;
  }

View Full Code Here

Examples of org.olat.core.util.vfs.VFSItem.canDelete()

          status = FolderCommandStatus.STATUS_FAILED;
          fireEvent(ureq, FOLDERCOMMAND_FINISHED);
        }
        for (String file : files) {
          VFSItem item = currentContainer.resolve(file);
          if (item != null && (item.canDelete() == VFSConstants.YES)) {
            if (item instanceof OlatRelPathImpl) {
              // delete all meta info
              MetaInfo meta = MetaInfoFactory.createMetaInfoFor((OlatRelPathImpl)item);
              if (meta != null) meta.deleteAll();
            }
View Full Code Here

Examples of org.olat.core.util.vfs.VFSItem.canDelete()

        if (!isAllowedFileSuffixes(fileName)) {         
          this.showError(NLS_ERROR_FILETYPE);
          if (cmdUpload.fileWasOverwritten().booleanValue()) return;
          // delete file
          VFSItem item = rootContainer.resolve(cmdUpload.getFileName());
            if (item != null && (item.canDelete() == VFSConstants.YES)) {
              if (item instanceof OlatRelPathImpl) {
                // delete all meta info
                MetaInfo meta = MetaInfoFactory.createMetaInfoFor((OlatRelPathImpl)item);
                if (meta != null) meta.deleteAll();
              }
View Full Code Here

Examples of org.openbp.jaspira.gui.plugin.VisiblePlugin.canDelete()

     * @return EVENT_CONSUMED if the delete action was sucessfully performed, EVENT_IGNORED otherwise
     */
    public JaspiraEventHandlerCode delete(JaspiraActionEvent je)
    {
      VisiblePlugin target = PluginFocusMgr.getInstance().getFocusedPlugin();
      if (target != null && target.canDelete())
      {
        target.delete();

        return EVENT_CONSUMED;
      }
View Full Code Here

Examples of org.zanata.page.administration.TranslationMemoryPage.canDelete()

                .enterImportFileName(importFile.getAbsolutePath())
                .clickUploadButtonAndAcknowledge();

        assertThat(tmMemoryPage.getNumberOfEntries(forceClear)).isEqualTo("1")
                .as("The TM has one item");
        assertThat(tmMemoryPage.canDelete(forceClear)).isFalse()
                .as("The item cannot yet be deleted");

        tmMemoryPage = tmMemoryPage.clickClearTMAndAccept(forceClear);
        tmMemoryPage.waitForExpectedNumberOfEntries(forceClear, "0");
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.