Package org.olat.repository

Examples of org.olat.repository.RepositoryManager


   * Do search for all resources of a given type where identity is owner.
   * @param owner
   * @param access
   */
  public void doSearchByOwnerLimitAccess(Identity owner, int access) {
    RepositoryManager rm = RepositoryManager.getInstance();
    List entries = rm.queryByOwnerLimitAccess(owner, access);
   
    repoTableModel.setEntries(entries);
    tableCtr.modelChanged();
    displaySearchResults(null);
  }
View Full Code Here


   *
   * @param type
   * @param ureq
   */
  void doSearchByTypeLimitAccess(String type, UserRequest ureq) {
    RepositoryManager rm = RepositoryManager.getInstance();
    List entries = rm.queryByTypeLimitAccess(type, ureq);
    repoTableModel.setEntries(entries);
    tableCtr.modelChanged();
    displaySearchResults(ureq);
  }
View Full Code Here

    tableCtr.modelChanged();
    displaySearchResults(ureq);
  }

  private void doSearchById(int id) {
    RepositoryManager rm = RepositoryManager.getInstance();
    RepositoryEntry entry = rm.lookupRepositoryEntry(new Long(id));
    List<RepositoryEntry> entries = new ArrayList<RepositoryEntry>(1);
    if (entry != null) entries.add(entry);
    repoTableModel.setEntries(entries);
    tableCtr.modelChanged();
    displaySearchResults(null);
View Full Code Here

    tableCtr.modelChanged();
    displaySearchResults(null);
  }

  protected void doSearchMyCoursesStudent(UserRequest ureq){
    RepositoryManager rm = RepositoryManager.getInstance();
    List<RepositoryEntry> entries = rm.getLearningResourcesAsStudent(ureq.getIdentity());
    repoTableModel.setEntries(entries);
    tableCtr.modelChanged();
    displaySearchResults(ureq);
  }
View Full Code Here

    tableCtr.modelChanged();
    displaySearchResults(ureq);
  }
 
  protected void doSearchMyCoursesTeacher(UserRequest ureq){
    RepositoryManager rm = RepositoryManager.getInstance();
    List<RepositoryEntry> entries = rm.getLearningResourcesAsTeacher(ureq.getIdentity());
    repoTableModel.setEntries(entries);
    tableCtr.modelChanged();
    displaySearchResults(ureq);
  }
View Full Code Here

      } catch (NumberFormatException e) {
        Tracing.createLoggerFor(InstitutionPortletRunController.class).error(e.getMessage());
      }

      if (polyLink.getLinkType().equals(InstitutionPortlet.TYPE_COURSE)) {
        RepositoryManager rm = RepositoryManager.getInstance();
        RepositoryEntry re = null;

        // id corresponding to the conditions set for this user
        if (polyLink != null && resultIDForUser != null) re = rm.lookupRepositoryEntry(resultIDForUser);

        // if ressource is not available choose default link
        if (re == null && defaultID != null) re = rm.lookupRepositoryEntry(defaultID);

        if (re != null) {
          if (!rm.isAllowedToLaunch(ureq, re)) {
            getWindowControl().setWarning(translate("warn.cantlaunch"));
          } else {
            OLATResourceable ores = re.getOlatResource();
            DTabs dts = (DTabs)Windows.getWindows(ureq).getWindow(ureq).getAttribute("DTabs");
            DTab dt = dts.getDTab(ores);
View Full Code Here

    String repoSoftkey = (String) config.get(CONFIG_KEY_REPOSITORY_SOFTKEY);
    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);
  }
View Full Code Here

   * @see org.olat.course.nodes.CourseNode#getReferencedRepositoryEntry()
   */
  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;
  }
View Full Code Here

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

    String repoSoftkey = (String) config.get(WikiEditController.CONFIG_KEY_REPOSITORY_SOFTKEY);
    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

Related Classes of org.olat.repository.RepositoryManager

Copyright © 2018 www.massapicom. 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.