Package org.sonatype.configuration

Examples of org.sonatype.configuration.ConfigurationException


    }
    else if (configuration instanceof CRepositoryCoreConfiguration) {
      return (CRepositoryCoreConfiguration) configuration;
    }
    else {
      throw new ConfigurationException("The passed configuration object is of class \""
          + configuration.getClass().getName() + "\" and not the required \"" + CRepository.class.getName()
          + "\"!");
    }
  }
View Full Code Here


  protected CoreConfiguration<List<CRepositoryTarget>> wrapConfiguration(Object configuration) throws ConfigurationException {
    if (configuration instanceof ApplicationConfiguration) {
      return new CRepositoryTargetCoreConfiguration((ApplicationConfiguration) configuration);
    }
    else {
      throw new ConfigurationException("The passed configuration object is of class \""
          + configuration.getClass().getName() + "\" and not the required \""
          + ApplicationConfiguration.class.getName() + "\"!");
    }
  }
View Full Code Here

      throws ConfigurationException, PatternSyntaxException
  {
    ContentClass cc = getRepositoryTypeRegistry().getContentClasses().get(resource.getContentClass());

    if (cc == null) {
      throw new ConfigurationException("Content class with ID=\"" + resource.getContentClass()
          + "\" does not exists!");
    }

    Target target = new Target(resource.getId(), resource.getName(), cc, resource.getPatterns());
View Full Code Here

  {
    // propagate call and fill in defaults too
    securityDefaults.loadConfiguration();

    if (getConfigurationFile() == null || getConfigurationFile().getAbsolutePath().contains("${")) {
      throw new ConfigurationException("The configuration file is not set or resolved properly: "
          + (getConfigurationFile() == null ? "null" : getConfigurationFile().getAbsolutePath()));
    }

    if (!getConfigurationFile().exists()) {
      this.getLogger().warn("No configuration file in place, copying the default one and continuing with it.");
View Full Code Here

    setConfiguration(configurationUpgrader.loadOldConfiguration(file));

    // after all we should have a configuration
    if (getConfiguration() == null) {
      throw new ConfigurationException("Could not upgrade Security configuration! Please replace the "
          + file.getAbsolutePath() + " file with a valid Security configuration file.");
    }

    // Need to decrypt the anonymous user's password
    SecurityConfiguration configuration = this.getConfiguration();
View Full Code Here

  {
    if (configuration instanceof ApplicationConfiguration) {
      return new CScheduledTaskCoreConfiguration((ApplicationConfiguration) configuration);
    }
    else {
      throw new ConfigurationException("The passed configuration object is of class \""
          + configuration.getClass().getName() + "\" and not the required \""
          + ApplicationConfiguration.class.getName() + "\"!");
    }
  }
View Full Code Here

  {
    if (configuration instanceof ApplicationConfiguration) {
      return new CGlobalRestApiCoreConfiguration((ApplicationConfiguration) configuration);
    }
    else {
      throw new ConfigurationException("The passed configuration object is of class \""
          + configuration.getClass().getName() + "\" and not the required \""
          + ApplicationConfiguration.class.getName() + "\"!");
    }
  }
View Full Code Here

  {
    if (configuration instanceof ApplicationConfiguration) {
      return new CSmtpConfigurationCoreConfiguration((ApplicationConfiguration) configuration);
    }
    else {
      throw new ConfigurationException("The passed configuration object is of class \""
          + configuration.getClass().getName() + "\" and not the required \""
          + ApplicationConfiguration.class.getName() + "\"!");
    }
  }
View Full Code Here

  {
    if (configuration instanceof ApplicationConfiguration) {
      return new CRoutingCoreConfiguration((ApplicationConfiguration) configuration);
    }
    else {
      throw new ConfigurationException("The passed configuration object is of class \""
          + configuration.getClass().getName() + "\" and not the required \""
          + ApplicationConfiguration.class.getName() + "\"!");
    }
  }
View Full Code Here

  {
    if (configuration instanceof ApplicationConfiguration) {
      return new CRepositoryGroupingCoreConfiguration((ApplicationConfiguration) configuration);
    }
    else {
      throw new ConfigurationException("The passed configuration object is of class \""
          + configuration.getClass().getName() + "\" and not the required \""
          + ApplicationConfiguration.class.getName() + "\"!");
    }
  }
View Full Code Here

TOP

Related Classes of org.sonatype.configuration.ConfigurationException

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.