Examples of ConfigException


Examples of de.odysseus.calyxo.base.conf.ConfigException

  /**
   * Set dispatcher for specified name
   */
  public void setDispatcher(String name, Dispatcher value) throws ConfigException {
    if (dispatchers.containsKey(name)) {
      throw new ConfigException("Dispatcher '" + name + "' already exists");
    }
    dispatchers.put(name, value);
  }
View Full Code Here

Examples of de.odysseus.calyxo.base.conf.ConfigException

  /**
   * Set the default dispatcher.
   */
  public void setDefaultDispatcher(Dispatcher dispatcher) throws ConfigException {
    if (this.dispatcher != defaultDispatcher) {
      throw new ConfigException("Default dispatcher already set");
    }
    this.dispatcher = dispatcher;
  }
View Full Code Here

Examples of de.odysseus.calyxo.base.conf.ConfigException

  /**
   * Set the default action class
   */
  public void setDefaultActionClass(Class clazz) throws ConfigException {
    if (defaultActionClass != initialDefaultActionClass) {
      throw new ConfigException("Default action class already set");
    }
    if (clazz.isInterface() || !Action.class.isAssignableFrom(clazz)) {
      throw new ConfigException("Bad action class '" + clazz.getName() + "'");
    }
    defaultActionClass = clazz;
  }
View Full Code Here

Examples of de.odysseus.calyxo.base.conf.ConfigException

    } else if (pattern.endsWith("/*")) {
      prefix = pattern.substring(0, pattern.length() - 2);
    } else if (pattern.equals("/")) {
      prefix = "";
    } else {
      throw new ConfigException("Bad url-pattern: " + pattern);
    }
  }
View Full Code Here

Examples of de.odysseus.calyxo.base.conf.ConfigException

   * @param loader
   * @throws ConfigException
   */
  public void setClassLoader(ClassLoader loader) throws ConfigException {
    if (this.loader != null) {
      throw new ConfigException("Module class loader must not be set more than once!");
    }
    this.loader = loader;
  }
View Full Code Here

Examples of de.odysseus.calyxo.base.conf.ConfigException

  /**
   * Add parameter
   */
  public void add(ParamConfigImpl value) throws ConfigException {
    if (paramConfigs.containsKey(value.getName())) {
      throw new ConfigException("Duplicate param name '" + value.getName() + "' in " + toInlineString());
    }
    paramConfigs.put(value.getName(), value);
  }
View Full Code Here

Examples of de.odysseus.calyxo.base.conf.ConfigException

  /**
   * Add exception element.
   */
  public void add(ExceptionHandlerConfigImpl value) throws ConfigException {
    if (exceptions.containsKey(value.getType())) {
      throw new ConfigException("Duplicate exception type '" + value.getClassName() + "' in " + toInlineString());
    }
    exceptions.put(value.getType(), value);
  }
View Full Code Here

Examples of de.odysseus.calyxo.base.conf.ConfigException

  /**
   * Add dispatch element.
   */
  public void add(DispatchConfigImpl value) throws ConfigException {
    if (dispatches.containsKey(value.getName())) {
      throw new ConfigException("Duplicate dispatch name '" + value.getName() + "' in " + toInlineString());
    }
    dispatches.put(value.getName(), value);
  }
View Full Code Here

Examples of de.odysseus.calyxo.base.conf.ConfigException

   * @see de.odysseus.calyxo.base.conf.impl.ConfigImpl#_init()
   */
  protected void _init() throws ConfigException {
    super._init();
    if ((action == null) == (path == null)) {
      throw new ConfigException("Either path or action must be specified in dispatch '" + toInlineString() + "'");
    }
    if (path != null && module != null) {
      throw new ConfigException("Cannot specify module with path in dispatch '" + toInlineString());
    }
  }
View Full Code Here

Examples of de.odysseus.calyxo.base.conf.ConfigException

   * Add action.
   * @exception ConfigException if an action with same path already exists
   */
  public void add(ActionConfigImpl action) throws ConfigException {
    if (actions.containsKey(action.getPath())) {
      throw new ConfigException("Duplicate action path '" + action.getPath() + "' in " + toInlineString());
    }
    actions.put(action.getPath(), action);
  }
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.