Package org.olat.core.logging

Examples of org.olat.core.logging.OLATRuntimeException


    String newDefault = orgs[index].getAttributeValue(SCORM12_Core.IDENTIFIER);
    _sequencerModel.setDefaultOrg(newDefault);
    try {
      _sequencerModel.saveDocument();
    } catch (IOException ex) {
      throw new OLATRuntimeException(this.getClass(), "Could not save changes to default organization. ", ex);
    }

  }
View Full Code Here


    super(ureq, wControl, "easycondedit");
    /*
     * my instance variables, these data is used by form items to initialise
     */
    this.validatedCondition = cloneCondition(cond);
    if (this.validatedCondition == null) throw new OLATRuntimeException("CondititionEditController called with a NULL condition",
        new IllegalArgumentException());
    this.courseEditorEnv = env;
    hasAreas = courseEditorEnv.getCourseGroupManager().getAllAreasFromAllContexts().size() > 0;
    hasGroups = courseEditorEnv.getCourseGroupManager().getAllLearningGroupsFromAllContexts().size() > 0;

View Full Code Here

        items.remove(item);
        removed = true;
        break;
      }
    }
    if (!removed) { throw new OLATRuntimeException(CPOrganizations.class, "error while removing child: child-element with identifier \""
        + id + "\" not found!", new Exception()); }

  }
View Full Code Here

        this.operator = o;
        break;
      }     
    }
    if (this.operator == null)
      throw new OLATRuntimeException("Attention: Operator " + operator + " given for extended condition, but no belonging Operator class found. Taking EqualsOperator fallback!", new IllegalArgumentException());
    this.value = value;
  }
View Full Code Here

      InputStream is = null;
      try {
        is = new BufferedInputStream(new FileInputStream(scorePropsFile));
        scoresProp.load(is);
      } catch (IOException e) {
        throw new OLATRuntimeException(this.getClass(), "could not load existing scorm-score-properties file: "+scorePropsFile.getAbsolutePath(),e);
      }
      finally {
        if (is != null) FileUtils.closeSafely(is);
      }
    }
View Full Code Here

          OutputStream os = null;
          try {
            os = new BufferedOutputStream(new FileOutputStream(scorePropsFile));
            scoresProp.store(os, null);
          } catch (IOException e) {
            throw new OLATRuntimeException(this.getClass(), "could not save scorm-properties-file: "+scorePropsFile.getAbsolutePath(), e);
          }
          finally {
            FileUtils.closeSafely(os);
          }
          // notify
View Full Code Here

    // Make sure its there
    if (scormSettingsHandler.getManifestFile().exists()) {
      try {
        _navViewer = new NavigationViewer(scormSettingsHandler);
      } catch (Exception ex) {
        throw new OLATRuntimeException(ScormManager.class, "Could not load manifest",ex);
      }
      // Package Links - use a clone so we can add referenced elements
      Element manifestRoot = (Element) _navViewer.getRootElement().clone();
      // now get the organizations node
      Element orgs = manifestRoot.getChild(CP_Core.ORGANIZATIONS, manifestRoot.getNamespace());
      Element[] tmp = _navViewer.getOrganizationList();
      organizationElements = new LinkedList();
      for (int i = 0; i < tmp.length; ++i) {
        organizationElements.add(tmp[i]);
      }
      // remember the default organization
      _defaultorg = _navViewer.getDefaultOrgElement(orgs);
      // NO orgs, so cant play - flag it
      if (_defaultorg == null) {
        _ReloadNoItemFoundExceptionFlag = false;
      } else {
        _sequence = new SequenceManager(_defaultorg.getAttributeValue(CP_Core.IDENTIFIER), scormSettingsHandler);
        // it exists so try to load it...
        try {
          initialize();
        } catch (Exception ex) {
          _error_found = true;
          throw new OLATRuntimeException(ScormManager.class, "Could not initialise manifest",ex);
        }
      } //
    } else {
      // problems if we cannot find the nav file...
      _error_found = true;
View Full Code Here

    } else if (functionType == FUNCTION_TYPE_HAS_NOT_ATTRIBUTE) {
      this.name = FUNCTION_NAME_HAS_NOT_ATTRIBUTE;
    } else if (functionType == FUNCTION_TYPE_IS_NOT_IN_ATTRIBUTE) {
      this.name = FUNCTION_NAME_IS_NOT_IN_ATTRIBUTE;
    } else {
      throw new OLATRuntimeException("This function type index is undefined: " + functionType, null);
    }
  }
View Full Code Here

   */
  private File getFileResource(OLATResourceable res, String resourceFolderName) {
    FileResource fr = getAsGenericFileResource(res);
    File f = getFile(fr, resourceFolderName);
    if (f == null) // folder not existing or no file in it
    throw new OLATRuntimeException(FileResourceManager.class, "could not getFileResource for OLATResourceable " + res.getResourceableId()
        + ":" + res.getResourceableTypeName(), null);
    return f;
  }
View Full Code Here

   */
  public MediaResource getAsDownloadeableMediaResource(OLATResourceable res) {
    FileResource fr = getAsGenericFileResource(res);
    File f = getFile(fr);
    if (f == null) // folder not existing or no file in it
    throw new OLATRuntimeException(FileResourceManager.class, "could not get File for OLATResourceable " + res.getResourceableId() + ":"
        + res.getResourceableTypeName(), null);
    return new DownloadeableMediaResource(f);
  }
View Full Code Here

TOP

Related Classes of org.olat.core.logging.OLATRuntimeException

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.