Examples of AssertException


Examples of org.olat.core.logging.AssertException

    return ratingLabels;
  }
 
  public String getRatingLabel(int position) {
    if (position >= ratingLabels.size()) {
      throw new AssertException("Can not get rating at position::" + position + " in rating array of size::" + ratingLabels.size() + " in component::" + getComponentName());
    }
    return ratingLabels.get(position);
  }
View Full Code Here

Examples of org.olat.core.logging.AssertException

    return ratingLabels.get(position);
  }

  public void setLevelLabel(int position, String ratingLabel) {
    if (position >= ratingLabels.size()) {
      throw new AssertException("Can not set rating at position::" + position + " in rating array of size::" + ratingLabels.size() + " in component::" + getComponentName());
    }
    this.ratingLabels.set(position, ratingLabel);
    this.setDirty(true);
  }
View Full Code Here

Examples of org.olat.core.logging.AssertException

   * @param text can be null and gets then replaced with empty string.
   */
  MessageController(UserRequest ureq, WindowControl control, int msgType, String title, String text) {
    super(ureq, control);
    if(msgType < 0 || msgType > VC_PAGES.length){
      throw new AssertException("provided message type is undefined, type given:"+msgType);
    }
    // use tranlsation keys from default package
    setTranslator(Util.createPackageTranslator(I18nManager.class, getLocale()));
    //
    msgVC = createVelocityContainer(VC_PAGES[msgType]);
View Full Code Here

Examples of org.olat.core.logging.AssertException

  @Override
  protected void event(@SuppressWarnings("unused")
  UserRequest ureq, Component source, Event event) {
    // This is only simple text in this controller, there should no events come
    // along here.
    throw new AssertException("This is a simple Wrapper controller without meaning in event method: event from "+source.getComponentName()+" event:"+event.getCommand());
  }
View Full Code Here

Examples of org.olat.core.logging.AssertException

   * controller
   *
   * @param node
   */
  private void checkNodeToAdd(GenericTreeNode node) {
    if (node.getUserObject() == null) { throw new AssertException(
        "GenericTreeNode to append/prepend needs to have a UserObject set! Please use setUserObject()."); }
  }
View Full Code Here

Examples of org.olat.core.logging.AssertException

  @Override
  protected void event(@SuppressWarnings("unused")
  UserRequest ureq, Component source, Event event) {
    // This is only simple text in this controller, there should no events come
    // along here.
    throw new AssertException("This is a simple Wrapper controller without meaning in event method: event from "+source.getComponentName()+" event:"+event.getCommand());
  }
View Full Code Here

Examples of org.olat.core.logging.AssertException

      ActionExtension ae = (ActionExtension) uobject;
      contentCtr1Tmp = createController(ae, ureq);
    } else {
      contentCtr1Tmp = handleOwnMenuTreeEvent(uobject, ureq);
    }
    if (contentCtr1Tmp == null) { throw new AssertException(
        "Node must either be an ActionExtension or implementation must handle this MenuTreeEvent: " + uobject.toString()); }
    return contentCtr1Tmp;
  }
View Full Code Here

Examples of org.olat.core.logging.AssertException

    if (values == null) { // no selection made (possible for radioboxes, but not
      // for dropdown list) -> selected = -1
      //selected = -1;
      throw new OLATRuntimeException(StaticSingleSelectionElement.class, "error.noformpostdata", null, PACKAGE, "no value submitted!, name of element:"+getName(), null);
    }
    if (values.length != 1) throw new AssertException("got multiple values in singleselectionelement:" + getName());
    String key = values[0];
    selected = findPosByKey(key);
  }
View Full Code Here

Examples of org.olat.core.logging.AssertException

  /**
   * @see org.olat.core.gui.formelements.SingleSelectionElement#getSelectedKey()
   */
  public String getSelectedKey() {
    if (selected == -1) throw new AssertException("no key selected");
    return getKey(selected);
  }
View Full Code Here

Examples of org.olat.core.logging.AssertException

      jo.put("cmd", c.getCommand());
      jo.put("w", winId);
      jo.put("cda", c.getSubJSON());
      return jo;
    } catch (JSONException e) {
      throw new AssertException("json exception:", e);
    }
  }
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.