Examples of lookupRepositoryEntry()


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

    boolean hasAccess = false;
    if (allowsGuestAccess(feed)) {
      hasAccess = true;
    } else if (identity != null) {
      RepositoryManager resMgr = RepositoryManager.getInstance();
      RepositoryEntry repoEntry = resMgr.lookupRepositoryEntry(feed, false);
      Roles roles = ManagerFactory.getManager().getRoles(identity);
      boolean isAllowedToLaunch = resMgr.isAllowedToLaunch(identity, roles, repoEntry);
      if (isAllowedToLaunch && validAuthentication(identity, token)) {
        hasAccess = true;
      }
View Full Code Here

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

   * @return true if the feed allows guest access.
   */
  private boolean allowsGuestAccess(OLATResourceable res) {
    boolean guestsAllowed = false;
    RepositoryManager resMgr = RepositoryManager.getInstance();
    RepositoryEntry repoEntry = resMgr.lookupRepositoryEntry(res, false);
    if (repoEntry.getAccess() == RepositoryEntry.ACC_USERS_GUESTS) {
      guestsAllowed = true;
    }
    return guestsAllowed;
  }
View Full Code Here

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

    // Check for RepositoryEntry resource
    boolean ceConsumed = false;
    if (ores.getResourceableTypeName().equals(OresHelper.calculateTypeName(RepositoryEntry.class))) {
      // It is a repository-entry => get OLATResourceable from RepositoryEntry
      RepositoryManager repom = RepositoryManager.getInstance();
      RepositoryEntry re = repom.lookupRepositoryEntry(ores.getResourceableId());
      ores = re.getOlatResource();
      ceConsumed = true;
    }

    // was brasato:: DTabs dts = wControl.getDTabs();
View Full Code Here

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

    PersistingCourseGroupManager.getInstance(this).exportCourseLeaningGroups(fExportedDataDir);
    // export right groups
    PersistingCourseGroupManager.getInstance(this).exportCourseRightGroups(fExportedDataDir);
    // export repo metadata
    RepositoryManager rm = RepositoryManager.getInstance();
    RepositoryEntry myRE = rm.lookupRepositoryEntry(this, true);
    RepositoryEntryImportExport importExport = new RepositoryEntryImportExport(myRE, fExportedDataDir);
    importExport.exportDoExportProperties();
   
    //OLAT-5368: do intermediate commit to avoid transaction timeout
    // discussion intermediatecommit vs increased transaction timeout:
View Full Code Here

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

      } else {
        // only list the specified folders
        for (String folder : publiclyReadableFolders) {
          try {
            Long repoKey = Long.parseLong(folder);
            RepositoryEntry entry = repoManager.lookupRepositoryEntry(repoKey);
            if (entry != null) {
              if (entry.getAccess() >= RepositoryEntry.ACC_USERS) {
                // add folder (which is a repo entry) to root container if not
                // present
                addReadonlyFolder(rootContainer, entry, sfm, addedEntries);
View Full Code Here

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

     */
    changeEmail = new ContactMessage(ureq.getIdentity());

    RepositoryManager rm = RepositoryManager.getInstance();
    // the owners of this qtiPkg
    RepositoryEntry myEntry = rm.lookupRepositoryEntry(qtiPackage.getRepresentingResourceable(), false);
    SecurityGroup qtiPkgOwners = myEntry.getOwnerGroup();

    // add qti resource owners as group
    ContactList cl = new ContactList("qtiPkgOwners");
    cl.addAllIdentites(ManagerFactory.getManager().getIdentitiesOfSecurityGroup(qtiPkgOwners));
View Full Code Here

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

      if ("CourseModule".equals(element.getSource().getResourceableTypeName())) {
        ICourse course = CourseFactory.loadCourse(element.getSource().getResourceableId());

        // the course owners

        RepositoryEntry entry = rm.lookupRepositoryEntry(course, false);
        String courseTitle = course.getCourseTitle();
        SecurityGroup owners = entry.getOwnerGroup();
        List stakeHoldersIds = ManagerFactory.getManager().getIdentitiesOfSecurityGroup(owners);

        // add stakeholders as group
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);
          //node forum
          businessPath = "[RepositoryEntry:" + re.getKey() + "][CourseNode:" + courseNodeId + "]";
        } catch (Exception e) {
          businessPath = null;
          //if something went wrong, like error while loading course...
View Full Code Here

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

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

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

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