Package org.olat.core.logging

Examples of org.olat.core.logging.AssertException


    } catch (InvocationTargetException e) {
      re = e;
    }
    finally {
      if (re != null) {
        throw new AssertException("could not create controller via reflection. classname:"+className, re);
      }
    }
    return null;
  }
View Full Code Here


   */
  public synchronized void signOn() {
    //   ^^^^^^^^^^^^ Added synchronized to be symmetric with sign off and to
    //                fix a possible dead-lock see also OLAT-3390
    Tracing.logDebug("signOn() START", getClass());
    if (isAuthenticated()) throw new AssertException("sign on: already signed on!");
    Identity identity = identityEnvironment.getIdentity();
    if (identity == null) throw new AssertException("identity is null in identityEnvironment!");
    if (sessionInfo == null) throw new AssertException("sessionInfo was null for identity " + identity);
    //String login = identity.getName();
    authenticated = true;

    if (sessionInfo.isWebDAV()) {
      // load user prefs
View Full Code Here

    } catch (InvocationTargetException e) {
      re = e;
    } catch (InstantiationException e) {
      re = e;
    } finally {
      if (re != null) { throw new AssertException("could not create controller via reflection. factoryName: " + factoryName + " method: "
          + factoryMethod, re); }
    }
    return null;
  }
View Full Code Here

      MessageDigest md5Helper = MessageDigest.getInstance(HASH_ALGORITHM);
      byte[] outbytes = md5Helper.digest(inbytes);
      String out = md5Encoder.encode(outbytes);
      return out;
    } catch (NoSuchAlgorithmException e) {
      throw new AssertException("Cannot load MD5 Message Digest ," + HASH_ALGORITHM + " not supported");
    }
  }
View Full Code Here

   * @param identity the identity belonging to the listener, or null if there is
   *          none (e.g. the LockManager = the 'System')
   */
  void addListener(GenericEventListener gel, Identity identity) {
    synchronized (listeners) { //o_clusterOK by:fj
      if (listeners.containsKey(gel)) throw new AssertException(" already added gel:" + gel.getClass().getName() + " to eventagency "
          + this.toString());
     
      // here: look at the latest event fired. (1 sticky)
      // if it is younger that this agency's ttl, then immediately fire it to the registrant.
      //
View Full Code Here

    form.formListeners = new ArrayList<FormBasicController>();
    if(listener instanceof FormBasicController){
      form.formListeners.add((FormBasicController)listener);
    }
    Translator translator = formLayout.getTranslator();
    if (translator == null) { throw new AssertException("please provide a translator in the FormItemContainer <" + formLayout.getName()
        + ">"); }
    // renders header + <formLayout> + footer of html form
    form.formWrapperComponent = new FormWrapperContainer(name, translator, form);
    form.formWrapperComponent.addListener(listener);
    form.formWrapperComponent.put(formLayout.getComponent().getComponentName(), formLayout.getComponent());
View Full Code Here

    Long id = replayIdMap.get(oid);
    if (id != null) return id.longValue();
    id = new Long(++replayIdCount);
   
    if (id >= 999900000L) {
      throw new AssertException ("Form count limit for a loadtest reached");
    }
    if (id%999990000L==9999) {
      throw new AssertException ("Form item count limit for a form reached");
    }
   
    replayIdMap.put(oid, id);
    if (comp instanceof FormBaseComponentImpl) {
      // set the replayID which was just determined because it is convenient
View Full Code Here

      } else if (cmd.indexOf(CMD_FILTER) == 0) {
        String areafilter = cmd.substring(CMD_FILTER.length());
        int filterPosition = Integer.parseInt(areafilter);
        // security check
        if (filters.size() < (filterPosition + 1)) throw new AssertException("Filter size was ::" + filters.size()
            + " but requested filter was ::" + filterPosition);
        // update new filter value
        setActiveFilter((ShortName) this.filters.get(filterPosition));
        fireEvent(ureq, EVENT_FILTER_SELECTED);
      }
View Full Code Here

  /**
   * @param attributes
   */
  public void setAttributes(Map<String,String> attributes) {
    if (this.attributes != null) throw new AssertException("can only set attributes once");
    if (identity == null) throw new AssertException("must set identity before setting attribues");
    this.attributes = attributes;
   
    // for the usertracking project needed:
    // the volatile, e.g. not db stored attributes must be available on the User Object besides the UserProperties.
    // The UserProperties (firstname, lastname, email, skypeId etc.) and the Attributes (e.g. shibboleth attributes) are very close related.
View Full Code Here

  /**
   *
   * @param addAttribues
   */
  public void addAttributes(Map<String,String> addAttribues){
    if(this.attributes == null) throw new AssertException("set attributes first");
    //identity must be not null, which is asserted because setAttributes must be calld first.
    this.attributes.putAll(addAttribues);//changes also the attribues already set previously in the User
  }
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.