Examples of lookupRepositoryEntryBySoftkey()


Examples of org.olat.repository.RepositoryManager.lookupRepositoryEntryBySoftkey()

  public static RepositoryEntry getScormCPReference(ModuleConfiguration config, boolean strict) {
    if (config == null) throw new AssertException("missing config in CP");
    String repoSoftkey = (String) config.get(ScormEditController.CONFIG_KEY_REPOSITORY_SOFTKEY);
    if (repoSoftkey == null) throw new AssertException("invalid config when being asked for references");
    RepositoryManager rm = RepositoryManager.getInstance();
    RepositoryEntry entry = rm.lookupRepositoryEntryBySoftkey(repoSoftkey, strict);
    // entry can be null only if !strict
    return entry;
  }

  /**
 
View Full Code Here

Examples of org.olat.repository.RepositoryManager.lookupRepositoryEntryBySoftkey()

    // grab any shared folder that is configured
    OlatRootFolderImpl sharedFolder = null;
    String sfSoftkey = getCourseConfig().getSharedFolderSoftkey();
    if (sfSoftkey != null) {
      RepositoryManager rm = RepositoryManager.getInstance();
      RepositoryEntry re = rm.lookupRepositoryEntryBySoftkey(sfSoftkey, false);
      if (re != null) {
        sharedFolder = SharedFolderManager.getInstance().getSharedFolder(re.getOlatResource());
        if (sharedFolder != null){
          sharedFolder.setLocalSecurityCallback(new ReadOnlyCallback());
          //add local course folder's children as read/write source and any sharedfolder as subfolder
View Full Code Here

Examples of org.olat.repository.RepositoryManager.lookupRepositoryEntryBySoftkey()

    // create the repository entry
    RepositoryManager rm = RepositoryManager.getInstance();
    RepositoryEntry re = rm.createRepositoryEntryInstance("administrator");
    RepositoryEntryImportExport importExport = new RepositoryEntryImportExport(courseExportData);
    String softKey = importExport.getSoftkey();
    RepositoryEntry existingEntry = rm.lookupRepositoryEntryBySoftkey(softKey, false);
    if (existingEntry != null) {
      Tracing.logInfo("RepositoryEntry with softkey " + softKey + " already exists. Course will not be deployed.", CourseFactory.class);
      CourseFactory.deleteCourse(newCourseResource);
      return existingEntry;
    }
View Full Code Here

Examples of org.olat.repository.RepositoryManager.lookupRepositoryEntryBySoftkey()

    // Find repository entry for this course
    String helpCourseSoftKey = CourseModule.getHelpCourseSoftKey();
    RepositoryManager rm = RepositoryManager.getInstance();
    RepositoryEntry entry = null;
    if (helpCourseSoftKey != null) {
      entry = rm.lookupRepositoryEntryBySoftkey(helpCourseSoftKey, false);
    }
    if (entry == null) {
      wControl.setError("error.helpcourse.not.configured");
      // create empty main controller
      LayoutMain3ColsController emptyCtr = new LayoutMain3ColsController(ureq, wControl, null, null, null, null);
View Full Code Here

Examples of org.olat.repository.RepositoryManager.lookupRepositoryEntryBySoftkey()

    if (repoSoftkey == null) {
      if (strict) throw new AssertException("invalid config when being asked for references");
      else return null;
    }
    RepositoryManager rm = RepositoryManager.getInstance();
    RepositoryEntry entry = rm.lookupRepositoryEntryBySoftkey(repoSoftkey, strict);
    // entry can be null only if !strict
    return entry;
  }

  /**
 
View Full Code Here

Examples of org.olat.repository.RepositoryManager.lookupRepositoryEntryBySoftkey()

              }
            }
          } else if(changedCourseConfig.getGlossarySoftKey()!=null) {
            // update references
            RepositoryManager rm = RepositoryManager.getInstance();
            RepositoryEntry repoEntry = rm.lookupRepositoryEntryBySoftkey(changedCourseConfig.getGlossarySoftKey(), false);
            ReferenceManager.getInstance().addReference(course, repoEntry.getOlatResource(), GlossaryManager.GLOSSARY_REPO_REF_IDENTIFYER);
          }
        }
        //course config transaction fihished
        initialCourseConfig = course.getCourseEnvironment().getCourseConfig().clone();       
View Full Code Here

Examples of org.olat.repository.RepositoryManager.lookupRepositoryEntryBySoftkey()

    if (repoSoftkey == null) {
      if (strict) throw new AssertException("invalid config when being asked for references");
      else return null;
    }
    RepositoryManager rm = RepositoryManager.getInstance();
    return rm.lookupRepositoryEntryBySoftkey(repoSoftkey, strict);
  }

  /**
   * Set the referenced repository entry.
   *
 
View Full Code Here

Examples of org.olat.repository.RepositoryManager.lookupRepositoryEntryBySoftkey()

   */
  public RepositoryEntry getReferencedRepositoryEntry() {
    this.config = getModuleConfiguration();
    String repoSoftkey = (String) config.get(CONFIG_KEY_REPOSITORY_SOFTKEY);
    RepositoryManager rm = RepositoryManager.getInstance();
    RepositoryEntry entry = rm.lookupRepositoryEntryBySoftkey(repoSoftkey, false);
    return entry;
  }

  /**
   * @see org.olat.course.nodes.CourseNode#isConfigValid()
View Full Code Here

Examples of org.olat.repository.RepositoryManager.lookupRepositoryEntryBySoftkey()

  public static RepositoryEntry getWikiRepoReference(ModuleConfiguration config, boolean strict) {
    if (config == null) throw new AssertException("missing config in wiki course node");
    String repoSoftkey = (String) config.get(WikiEditController.CONFIG_KEY_REPOSITORY_SOFTKEY);
    if (repoSoftkey == null) throw new AssertException("invalid config when being asked for references");
    RepositoryManager rm = RepositoryManager.getInstance();
    RepositoryEntry entry = rm.lookupRepositoryEntryBySoftkey(repoSoftkey, strict);
    // entry can be null only if !strict
    return entry;
  }

  /**
 
View Full Code Here

Examples of org.olat.repository.RepositoryManager.lookupRepositoryEntryBySoftkey()

    if (repoSoftkey == null) {
      if (strict) throw new AssertException("invalid config when being asked for references");
      else return null;
    }
    RepositoryManager rm = RepositoryManager.getInstance();
    RepositoryEntry entry = rm.lookupRepositoryEntryBySoftkey(repoSoftkey, strict);
    // entry can be null only if !strict
    return entry;
  }

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