Logo Search packages:      
Sourcecode: uimaj version File versions  Download package

ResourceConfigurationException.java

/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 * 
 *   http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

package org.apache.uima.resource;

import org.apache.uima.UIMAException;

/**
 * Thrown to indicate that a {@link Resource}'s configuration paramters could not be set. Most
 * commonly this will be because the caller has specified a nonexistent parameter name or a value of
 * the incorrect data type.
 * 
 * 
 */
00031 public class ResourceConfigurationException extends UIMAException {

  private static final long serialVersionUID = -412324593044962476L;

  /**
   * Message key for a standard UIMA exception message: "No configuration parameter with name {0} is
   * declared in component "{1}."
   */
00039   public static final String NONEXISTENT_PARAMETER = "nonexistent_parameter";

  /**
   * Message key for a standard UIMA exception message: "No configuration parameter with name {0} is
   * declared in group {1} in this component "{2}"."
   */
00045   public static final String NONEXISTENT_PARAMETER_IN_GROUP = "nonexistent_parameter_in_group";

  /**
   * Message key for a standard UIMA exception message: "Parameter type mismatch in component "{0}".
   * A value of class {1} cannot be assigned to the configuration parameter {2}, which has type
   * {3}."
   */
00052   public static final String PARAMETER_TYPE_MISMATCH = "parameter_type_mismatch";

  /**
   * Message key for a standard UIMA exception message: "Configuration parameter "{0}" in component
   * "{1}" is multi-valued and must be assigned an array for its value."
   */
00058   public static final String ARRAY_REQUIRED = "array_required";

  /**
   * Message key for a standard UIMA exception message: "No value has been assigned to the mandatory
   * configuration parameter {0}."
   */
00064   public static final String MANDATORY_VALUE_MISSING = "mandatory_value_missing";

  /**
   * Message key for a standard UIMA exception message: "No value has been assigned to the mandatory
   * configuration parameter {0} in group {1}."
   */
00070   public static final String MANDATORY_VALUE_MISSING_IN_GROUP = "mandatory_value_missing_in_group";

  /**
   * Message key for a standard UIMA exception message: "The configuration data {0} for Configuraion
   * parameter {1} in the resource is absent or not valid"
   */
00076   public static final String RESOURCE_DATA_NOT_VALID = "resource_data_not_valid";

  /**
   * Message key for a standard UIMA exception message: Configuration setting for {0} is absent
   */
00081   public static final String CONFIG_SETTING_ABSENT = "config_setting_absent";

  /**
   * Message key for a standard UIMA exception message: "Could not load properties file "{0}"."
   */
00086   public static final String PROPERTIES_FILE_NOT_FOUND = "properties_file_not_found";

  /**
   * Message key for a standard UIMA exception message: Invalid value for parameter "{0}" in
   * component "{1}" -- directory "{2}" does not exist.
   */
00092   public static final String DIRECTORY_NOT_FOUND = "directory_not_found";

  /**
   * Creates a new exception with a null message.
   */
00097   public ResourceConfigurationException() {
    super();
  }

  /**
   * Creates a new exception with the specified cause and a null message.
   * 
   * @param aCause
   *          the original exception that caused this exception to be thrown, if any
   */
00107   public ResourceConfigurationException(Throwable aCause) {
    super(aCause);
  }

  /**
   * Creates a new exception with a the specified message.
   * 
   * @param aResourceBundleName
   *          the base name of the resource bundle in which the message for this exception is
   *          located.
   * @param aMessageKey
   *          an identifier that maps to the message for this exception. The message may contain
   *          placeholders for arguments as defined by the
   *          {@link java.text.MessageFormat MessageFormat} class.
   * @param aArguments
   *          The arguments to the message. <code>null</code> may be used if the message has no
   *          arguments.
   */
00125   public ResourceConfigurationException(String aResourceBundleName, String aMessageKey,
          Object[] aArguments) {
    super(aResourceBundleName, aMessageKey, aArguments);
  }

  /**
   * Creates a new exception with the specified message and cause.
   * 
   * @param aResourceBundleName
   *          the base name of the resource bundle in which the message for this exception is
   *          located.
   * @param aMessageKey
   *          an identifier that maps to the message for this exception. The message may contain
   *          placeholders for arguments as defined by the
   *          {@link java.text.MessageFormat MessageFormat} class.
   * @param aArguments
   *          The arguments to the message. <code>null</code> may be used if the message has no
   *          arguments.
   * @param aCause
   *          the original exception that caused this exception to be thrown, if any
   */
00146   public ResourceConfigurationException(String aResourceBundleName, String aMessageKey,
          Object[] aArguments, Throwable aCause) {
    super(aResourceBundleName, aMessageKey, aArguments, aCause);
  }

  /**
   * Creates a new exception with a message from the {@link #STANDARD_MESSAGE_CATALOG}.
   * 
   * @param aMessageKey
   *          an identifier that maps to the message for this exception. The message may contain
   *          placeholders for arguments as defined by the
   *          {@link java.text.MessageFormat MessageFormat} class.
   * @param aArguments
   *          The arguments to the message. <code>null</code> may be used if the message has no
   *          arguments.
   */
00162   public ResourceConfigurationException(String aMessageKey, Object[] aArguments) {
    super(aMessageKey, aArguments);
  }

  /**
   * Creates a new exception with the specified cause and a message from the
   * {@link #STANDARD_MESSAGE_CATALOG}.
   * 
   * @param aMessageKey
   *          an identifier that maps to the message for this exception. The message may contain
   *          placeholders for arguments as defined by the
   *          {@link java.text.MessageFormat MessageFormat} class.
   * @param aArguments
   *          The arguments to the message. <code>null</code> may be used if the message has no
   *          arguments.
   * @param aCause
   *          the original exception that caused this exception to be thrown, if any
   */
00180   public ResourceConfigurationException(String aMessageKey, Object[] aArguments, Throwable aCause) {
    super(aMessageKey, aArguments, aCause);
  }
}

Generated by  Doxygen 1.6.0   Back to index