Examples of ReferenceImpl


Examples of org.olat.resource.references.ReferenceImpl

      // update references
      ReferenceManager refM = ReferenceManager.getInstance();
      List refs = refM.getReferences(sourceCourse);
      for (Iterator iter = refs.iterator(); iter.hasNext();) {
        ReferenceImpl ref = (ReferenceImpl) iter.next();
        refM.addReference(targetCourse, ref.getTarget(), ref.getUserdata());
      }
      CourseGroupManager sourceCgm = sourceCourse.getCourseEnvironment().getCourseGroupManager();
      CourseGroupManager targetCgm = targetCourse.getCourseEnvironment().getCourseGroupManager();
      targetCgm.createCourseGroupmanagementAsCopy(sourceCgm, sourceCourse.getCourseTitle());
    }
View Full Code Here

Examples of org.olat.resource.references.ReferenceImpl

   */
  public static void deleteRefTo(ICourse course) {
    ReferenceManager refM = ReferenceManager.getInstance();
    List repoRefs = refM.getReferences(course);
    for (Iterator iter = repoRefs.iterator(); iter.hasNext();) {
      ReferenceImpl ref = (ReferenceImpl) iter.next();
      if (ref.getUserdata().equals(SHAREDFOLDERREF)) {
        refM.delete(ref);
        return;
      }
    }
  }
View Full Code Here

Examples of org.olat.resource.references.ReferenceImpl

  public void deleteGlossary(OLATResourceable res) {
    // first remove all references
    ReferenceManager refM = ReferenceManager.getInstance();
    List repoRefs = refM.getReferencesTo(res);
    for (Iterator iter = repoRefs.iterator(); iter.hasNext();) {
      ReferenceImpl ref = (ReferenceImpl) iter.next();
      if (ref.getUserdata().equals(GLOSSARY_REPO_REF_IDENTIFYER)) {
        // remove the reference from the course configuration
        // TODO:RH:improvement: this should use a callback method or send a general delete
        // event so that the course can take care of this rather than having it
        // here hardcoded
        OLATResourceImpl courseResource = ref.getSource();
        //ICourse course = CourseFactory.loadCourse(courseResource);
        ICourse course = CourseFactory.openCourseEditSession(courseResource.getResourceableId());
        CourseConfig cc = course.getCourseEnvironment().getCourseConfig();
        cc.setGlossarySoftKey(null);
        CourseFactory.setCourseConfig(course.getResourceableId(), cc);
View Full Code Here

Examples of org.olat.resource.references.ReferenceImpl

   */
  private void deleteRefs(CourseNode courseNode) {
    ReferenceManager refM = ReferenceManager.getInstance();
    List courseRefs = refM.getReferences(course);
    for (Iterator iter = courseRefs.iterator(); iter.hasNext();) {
      ReferenceImpl ref = (ReferenceImpl) iter.next();
      if (!ref.getUserdata().equals(courseNode.getIdent())) continue;
      refM.delete(ref);
      break;
    }
  }
View Full Code Here

Examples of org.olat.resource.references.ReferenceImpl

          if(changedCourseConfig.getGlossarySoftKey()==null) {
            // update references
            ReferenceManager refM = ReferenceManager.getInstance();
            List repoRefs = refM.getReferences(course);
            for (Iterator iter = repoRefs.iterator(); iter.hasNext();) {
              ReferenceImpl ref = (ReferenceImpl) iter.next();
              if (ref.getUserdata().equals(GlossaryManager.GLOSSARY_REPO_REF_IDENTIFYER)) {
                refM.delete(ref);
                continue;
              }
            }
          } else if(changedCourseConfig.getGlossarySoftKey()!=null) {
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.