Package org.olat.core.logging

Examples of org.olat.core.logging.AssertException


    modalPanel.setContent(modalStackP);
  }

 
  public void setContentController(Controller contentController) {
    if (this.contentController != null) throw new AssertException("can only set contentController once!");
    this.contentController = contentController;

    GuiStack gsh = getWindowControl().getWindowBackOffice().createGuiStack(contentController.getInitialComponent());   
    setGuiStack(gsh);
  }
View Full Code Here


     
      /**
       * @see org.olat.core.gui.control.WindowControl#setInfo(java.lang.String)
       */
      public void setInfo(String info) {
        throw new AssertException("not implemented, need e.g. a SimplBaseController on top of this class here to implement this function");
      }

      /**
       * @see org.olat.core.gui.control.WindowControl#setError(java.lang.String)
       */
      public void setError(String error) {
        throw new AssertException("not implemented, need e.g. a SimplBaseController on top of this class here to implement this function");
      }

      /**
       * @see org.olat.core.gui.control.WindowControl#setWarning(java.lang.String)
       */
      public void setWarning(String warning) {
        throw new AssertException("not implemented, need e.g. a SimplBaseController on top of this class here to implement this function");
      }

      public WindowControlInfo getWindowControlInfo() {
        return wci;
      }

      public void makeFlat() {
        throw new AssertException("not implemented, need e.g. a SimplBaseController on top of this class here to implement this function");
      }

      public BusinessControl getBusinessControl() {
        return BusinessControlFactory.getInstance().getEmptyBusinessControl();
      }
View Full Code Here

  /**
   * @see org.olat.core.gui.control.ContentableChiefController#setContentController(boolean,
   *      org.olat.core.gui.control.Controller)
   */
  public void setContentController(boolean autoDisposeOnWindowClose, Controller contentController) {
    if (this.contentController != null) throw new AssertException("can only set contentController once!");
    this.contentController = contentController;
    this.autoDisposeOnWindowClose = autoDisposeOnWindowClose;
   
    currentGuiStack = new GuiStackSimpleImpl(contentController.getInitialComponent());
    contentPanel.setContent(currentGuiStack.getPanel());   
View Full Code Here

   * @return the path under which this mapper will be called, without / at the end, e.g. /olat/g/521org.olat.demo.tabledemo.MyController (the 521 here is the versionId to guarantee the uniqueness across releases to trick out buggy css browser caches)
   */
  public String register(Class globalNameClass, Mapper mapper) {
    String globalName = Settings.getVersionId()+globalNameClass.getName();
    if (pathToMapper.containsKey(globalName)) {
      throw new AssertException("Could not register global named mapper, name already used::" + globalName);
    }
    pathToMapper.put(globalName, mapper);
    return WebappHelper.getServletContextPath() + DispatcherAction.PATH_GLOBAL_MAPPED + globalName ;     
  }
View Full Code Here

    String normalized = path;

    try { // we need to decode potential UTF-8 characters in the URL
      normalized = new String(normalized.getBytes(), "UTF-8");
    } catch (UnsupportedEncodingException e) {
      throw new AssertException("utf-8 encoding must be supported on all java platforms...");
    }

    if (normalized.equals("/.")) return "/";

    // Normalize the slashes and add leading slash if necessary
View Full Code Here

   * remove a registered mapper if it is no longer needed.
   * @param mapper
   */
  public void deregister(Mapper mapper) {
    boolean removed = pathToMapper.values().remove(mapper);
    if (!removed) throw new AssertException("trying to remove a mapper that was never registered");
  }
View Full Code Here

  public static Command createParentRedirectTo(String redirectURL) {
    JSONObject root = new JSONObject();
    try {
      root.put("rurl", redirectURL);
    } catch (JSONException e) {
      throw new AssertException("wrong data put into json object", e);
    }
    Command c = new Command(3);
    c.setSubJSON(root);
    return c;
  }
View Full Code Here

  public static Command createPrepareClientCommand(String businessControlPath) {
    JSONObject root = new JSONObject();
    try {
      root.put("bc", businessControlPath==null? "":businessControlPath);
    } catch (JSONException e) {
      throw new AssertException("wrong data put into json object", e);
    }
    Command c = new Command(6);
    c.setSubJSON(root);
    return c;   
  }
View Full Code Here

  public static Command createParentRedirectForExternalResource(String redirectMapperURL) {
    JSONObject root = new JSONObject();
    try {
      root.put("rurl", redirectMapperURL);
    } catch (JSONException e) {
      throw new AssertException("wrong data put into json object", e);
    }
    Command c = new Command(5);
    c.setSubJSON(root);
    return c;
 
View Full Code Here

  /* (non-Javadoc)
   * @see org.olat.core.service.ServiceCreatorFactory#createNonNullServiceFor(java.lang.Class)
   */
  public Object createNonNullServiceFor(Class serviceInterfaceName) {
    ServiceCreator sc = serviceCreators.get(serviceInterfaceName.getName());
    if (sc == null) throw new AssertException("service '"+serviceInterfaceName.getName()+"' does not exist!");
    return sc.createService();
  }
View Full Code Here

TOP

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

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.