Examples of lookupRepositoryEntry()


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

   * @param ores
   * @return The repository entry of ores or null
   */
  private RepositoryEntry getRepositoryEntry(OLATResourceable ores) {
    RepositoryManager resMgr = RepositoryManager.getInstance();
    return resMgr.lookupRepositoryEntry(ores, false);
  }

  /**
   * Returns the feed in the given container. It is public and static to be
   * accessible by PodcastFileResource.
View Full Code Here

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

          PopupBrowserWindow pbw = getWindowControl().getWindowBackOffice().getWindowManager().createNewPopupBrowserWindowFor(ureq, layoutCtrlr);
          pbw.open(ureq);
          //
        } else if (actionid.equals(CMD_LAUNCH_COURSE)) {
          RepositoryManager rm = RepositoryManager.getInstance();
          RepositoryEntry re = rm.lookupRepositoryEntry(efficiencyStatement.getCourseRepoEntryKey());
          if (re == null) {
            showWarning("efficiencyStatements.course.noexists");
          } else if (!rm.isAllowedToLaunch(ureq, re)) {
            showWarning("efficiencyStatements.course.noaccess");
          } else {
View Full Code Here

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

    boolean isGuestOnly = ureq.getUserSession().getRoles().isGuestOnly();
    boolean isResourceOwner = false;
    if (isOLatAdmin) isResourceOwner = true;
    else {
      RepositoryManager repoMgr = RepositoryManager.getInstance();
      isResourceOwner = repoMgr.isOwnerOfRepositoryEntry(ureq.getIdentity(), repoMgr.lookupRepositoryEntry(res, true));
    }
   
   
    BusinessControl bc = wControl.getBusinessControl();
    ContextEntry ce = bc.popLauncherContextEntry();
View Full Code Here

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

  public void event(UserRequest ureq, Component source, Event event) {
    if (source == forwardButton){
     
      // check if repository entry is still available
      RepositoryManager rm = RepositoryManager.getInstance();
      RepositoryEntry checkEntry = rm.lookupRepositoryEntry(sourceEntry.getKey());
      if (checkEntry == null) { // entry has been deleted meanwhile
        getWindowControl().setError(translator.translate("error.createcopy"));
        fireEvent(ureq, Event.FAILED_EVENT);
        fireEvent(ureq, new EntryChangedEvent(sourceEntry, EntryChangedEvent.DELETED));
        return;
View Full Code Here

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

   * @param re
   */
  public UpdateEfficiencyStatementsWorker(OLATResourceable ores) {
    this.ores = ores;
    RepositoryManager rm = RepositoryManager.getInstance();
    RepositoryEntry re = rm.lookupRepositoryEntry(ores, false);
    // get all users who already have an efficiency statement
    identities = EfficiencyStatementManager.getInstance().findIdentitiesWithEfficiencyStatements(re.getKey());
  }

  /**
 
View Full Code Here

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

    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

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

      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) {
View Full Code Here

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

        // 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 {
View Full Code Here

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

          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);
          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.RepositoryManager.lookupRepositoryEntry()

   * @param orga
   */
  private void setOrgaTitleToRepoEntryTitle(OLATResourceable ores, CPOrganization orga) {
    // Set the title of the organization to the title of the resource.
    RepositoryManager resMgr = RepositoryManager.getInstance();
    RepositoryEntry cpEntry = resMgr.lookupRepositoryEntry(ores, false);
    if (cpEntry != null) {
      String title = cpEntry.getDisplayname();
      orga.setTitle(title);
    }
  }
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.