Examples of RepositoryEntry


Examples of org.olat.repository.RepositoryEntry

    } else if (source == unselectSFResButton) { // unselect shared folder     
      if (courseConfig.hasCustomSharedFolder()) {
        // delete reference from course to sharedfolder
        // get unselected shared folder's softkey used for logging
        String softkeyUsf = courseConfig.getSharedFolderSoftkey();
        RepositoryEntry usfRe = rm.lookupRepositoryEntryBySoftkey(softkeyUsf, true);
        if (usfRe != null) sharedFolderRepositoryEntry = usfRe;
        // set default value to delete configured value in course config
        courseConfig.setSharedFolderSoftkey(CourseConfig.VALUE_EMPTY_SHAREDFOLDER_SOFTKEY);
        //deleteRefTo(course);
        //course.getCourseEnvironment().setCourseConfig(cc);
View Full Code Here

Examples of org.olat.repository.RepositoryEntry

        // remove selected entry from the data model
        CatalogManager cm = CatalogManager.getInstance();
        List<CatalogEntry> children = cm.getChildrenOf(selectedCategoryLevel);
        // find all child element of this level that reference our repo entry
        for (CatalogEntry child : children) {
          RepositoryEntry childRepoEntry = child.getRepositoryEntry();
          if (childRepoEntry != null && childRepoEntry.equalsByPersistableKey(repoEntry)) {
            // remove from catalog
            cm.deleteCatalogEntry(child);
          }
        }
        // The catalog entry must have been deleted in the meantime by someone
View Full Code Here

Examples of org.olat.repository.RepositoryEntry

   * @param glossarySoftkey
   * @param exportedDataDir
   * @return
   */
  public boolean exportGlossary(String glossarySoftkey, File exportedDataDir) {
    RepositoryEntry re = RepositoryManager.getInstance().lookupRepositoryEntryBySoftkey(glossarySoftkey, false);
    if (re == null) return false;
    File fExportBaseDirectory = new File(exportedDataDir, EXPORT_FOLDER_NAME);
    if (!fExportBaseDirectory.mkdir()) return false;
    // export properties
    RepositoryEntryImportExport reImportExport = new RepositoryEntryImportExport(re, fExportBaseDirectory);
View Full Code Here

Examples of org.olat.repository.RepositoryEntry

   *
   * @param res
   * @return
   */
  public MediaResource getAsMediaResource(OLATResourceable res) {
    RepositoryEntry repoEntry = RepositoryManager.getInstance().lookupRepositoryEntry(res, false);
    String exportFileName = repoEntry.getDisplayname() + ".zip";
    File fExportZIP = new File(FolderConfig.getCanonicalTmpDir() + "/" + exportFileName);
    VFSContainer glossaryRoot = getGlossaryRootFolder(res);
    ZipUtil.zip(glossaryRoot.getItems(), new LocalFileImpl(fExportZIP));
    return new CleanupAfterDeliveryFileMediaResource(fExportZIP);
  }
View Full Code Here

Examples of org.olat.repository.RepositoryEntry

          String courseNodeId = courseNode.substring(0, courseNode.indexOf(':'));
          Long resId = publisher.getResId();
          ICourse course = CourseFactory.loadCourse(resId);
          RepositoryManager rm = RepositoryManager.getInstance();
          OLATResource rsrc = OLATResourceManager.getInstance().findResourceable(course.getResourceableId(), course.getResourceableTypeName());
          RepositoryEntry re = rm.lookupRepositoryEntry(rsrc, true);
          //node forum
          businessPath = "[RepositoryEntry:" + re.getKey() + "][CourseNode:" + courseNodeId + "]";
        } catch (Exception e) {
          businessPath = null;
          //if something went wrong, like error while loading course...
          logWarn("error while processing resid: "+publisher.getResId(), e);
         
View Full Code Here

Examples of org.olat.repository.RepositoryEntry

      /*
       * for those coursenodes which need a reference to a repository entry to
       * function properly, check that the reference is valid
       */
      if (cn.needsReferenceToARepositoryEntry()) {
        RepositoryEntry referencedEntry = cn.getReferencedRepositoryEntry();
        if (referencedEntry == null) {
          cetnDamaged.add(new StatusDescription(ValidationStatus.ERROR, "pbl.error.refs", "pbl.error.refs", new String[] { cetn.getTitle()
              + "(id:" + cetn.getIdent() + " )" }, PACKAGE));
        }
      }
View Full Code Here

Examples of org.olat.repository.RepositoryEntry

   *          null if updatedNode is a new node.
   */
  private void updateRefs(CourseNode updatedNode, CourseNode oldNode) {
    if (oldNode != null) deleteRefs(oldNode);
    if (updatedNode.needsReferenceToARepositoryEntry()) {
      RepositoryEntry referencedEntry = updatedNode.getReferencedRepositoryEntry();
      if (referencedEntry == null) throw new AssertException("Could not fetch referenced entry where an entry is expected.");
      // if there is an entry, add the reference
      addRef(updatedNode, referencedEntry.getOlatResource());
    }
  }
View Full Code Here

Examples of org.olat.repository.RepositoryEntry

    myContent = new VelocityContainer("olatmodiqrun", VELOCITY_ROOT + "/qti.html", translator, this);
   
    // Check if fibautocompl.js and fibautocompl.css exists for enhance FIB autocomplete feature
     Resolver autcompResolver = null;
    if (resolver == null){
      RepositoryEntry re = RepositoryManager.getInstance().lookupRepositoryEntryBySoftkey(repositorySoftkey, true);
       autcompResolver = new ImsRepositoryResolver(re.getKey());
    } else {
      autcompResolver = this.resolver;
    }
     
    if (autcompResolver != null && autcompResolver.hasAutocompleteFiles()) {
View Full Code Here

Examples of org.olat.repository.RepositoryEntry

  public String getJumpInLink() {
    String jumpInLink = null;
    RepositoryManager resMgr = RepositoryManager.getInstance();
    if (courseId != null && nodeId != null) {
      OLATResourceable oresCourse = OLATResourceManager.getInstance().findResourceable(courseId, CourseModule.getCourseTypeName());
      RepositoryEntry repositoryEntry = resMgr.lookupRepositoryEntry(oresCourse, false);
      jumpInLink = RepoJumpInHandlerFactory.buildRepositoryDispatchURI(repositoryEntry, nodeId);
    } else {
      RepositoryEntry repositoryEntry = resMgr.lookupRepositoryEntry(feed, false);
      jumpInLink = RepoJumpInHandlerFactory.buildRepositoryDispatchURI(repositoryEntry);
    }
    return jumpInLink;
  }
View Full Code Here

Examples of org.olat.repository.RepositoryEntry

            NotificationsManager.getInstance().deactivate(p);
            // return nothing available
            return NotificationsManager.getInstance().getNoSubscriptionInfo();
          }
          ModuleConfiguration config = ((WikiCourseNode)courseNode).getModuleConfiguration();
          RepositoryEntry re = WikiEditController.getWikiRepoReference(config, true);
          resId = re.getOlatResource().getResourceableId();
          logDebug("resId=" + resId, null);
          ores = OresHelper.createOLATResourceableInstance(WikiResource.TYPE_NAME, resId);
          businessControlString = p.getBusinessPath() + "[path=";
        } else {
          // resName = 'BusinessGroup' or 'FileResource.WIKI'
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.