Package org.jboss.arquillian.container.spi

Examples of org.jboss.arquillian.container.spi.ConfigurationException


    */
   public static void configurationDirectoryExists(final String string, final String message) throws ConfigurationException
   {
      if (string == null || string.length() == 0 || new File(string).isDirectory() == false)
      {
         throw new ConfigurationException(message);
      }
   } 
View Full Code Here


      if (wlpHome != null) {
         File wlpHomeDir = new File(wlpHome);
         File bsAgentJar = new File(wlpHome + "/lib/bootstrap-agent.jar");
         File wsLaunchJar = new File(wlpHome + "/lib/ws-launch.jar");
         if (!(wlpHomeDir.isDirectory() && bsAgentJar.isFile() && wsLaunchJar.isFile()))
            throw new ConfigurationException("wlpHome provided is not valid: " + wlpHome);
      } else {
         // If wlpHome is null, throw exception
         throw new ConfigurationException("wlpHome is required for initialization");
      }
     
      // Validate serverName
      if (!serverName.matches("^[A-Za-z][A-Za-z0-9]*$"))
         throw new ConfigurationException("serverName provided is not valid: '" + serverName + "'");
     
      // Validate httpPort
      if (httpPort > 65535 || httpPort <= 0)
         throw new ConfigurationException("httpPort provided is not valid: " + httpPort);

      // Validate deployType
      if (!deployType.equalsIgnoreCase("xml") && !deployType.equalsIgnoreCase("dropins"))
         throw new ConfigurationException("deployType provided is not valid: " + deployType + ".  deployType should be xml or dropins.");

      //Validate sharedLib
      if (sharedLib != null) {
         if (!sharedLib.isEmpty()) {
            if (!deployType.equalsIgnoreCase("xml"))
               throw new ConfigurationException("deployType must be set to xml when sharedLib is not empty");
         }
      }
   }
View Full Code Here

     * @param message The exception message
     * @throws ConfigurationException Thrown if string is empty, null or it does not represent a path the a valid directory
     */
    public static void directoryExists(final String string, final String message) throws ConfigurationException {
        if (string == null || string.length() == 0 || new File(string).isDirectory() == false) {
            throw new ConfigurationException(message);
        }
    }
View Full Code Here

    */
   public static void configurationDirectoryExists(final String string, final String message) throws ConfigurationException
   {
      if (string == null || string.length() == 0 || new File(string).isDirectory() == false)
      {
         throw new ConfigurationException(message);
      }
   } 
View Full Code Here

    */
   public static void configurationDirectoryExists(final String string, final String message) throws ConfigurationException
   {
      if (string == null || string.length() == 0 || new File(string).isDirectory() == false)
      {
         throw new ConfigurationException(message);
      }
   } 
View Full Code Here

                props.load(input);
                for (String key : props.stringPropertyNames()) {
                    frameworkConfiguration.put(key, props.getProperty(key));
                }
            } catch (IOException ex) {
                throw new ConfigurationException("Cannot read: " + file.getAbsolutePath());
            }
        }

        // Get the {@link FrameworkFactory}
        Iterator<FrameworkFactory> factories = ServiceLoader.load(FrameworkFactory.class).iterator();
View Full Code Here

   @Override
   public void validate() throws ConfigurationException
   {
      if (Strings.isNullOrEmpty(classifier))
      {
         throw new ConfigurationException("Classifier should not be null or empty");
      }
   }
View Full Code Here

    }

    @Override
    public void validate() throws ConfigurationException {
        if (username != null && password == null) {
            throw new ConfigurationException("username has been set, but no password given");
        }
    }
View Full Code Here

    public void setup(AppEngineLocalConfiguration configuration) {
        this.configuration = configuration;

        if (configuration.getSdkDir() == null)
            throw new ConfigurationException("AppEngine SDK root is null.");

        System.setProperty(AppEngineLocalConfiguration.SDK_ROOT, configuration.getSdkDir());
    }
View Full Code Here

    @Override
    public void validate() throws ConfigurationException {
        RhqAgentPluginContainer.init();
       
        if (isNativeSystemInfoEnabled() && !SystemInfoFactory.isNativeSystemInfoAvailable()) {
            throw new ConfigurationException("SIGAR is not available - cannot use native SystemInfo.");
        }
       
        try {
            String serverServices = getServerServicesImplementationClassName();
            if (serverServices != null) {
                Class.forName(serverServices);
            }
        } catch (Exception e) {
            throw new ConfigurationException("Failed to look up the ServerServices implementation class ["
                    + getServerServicesImplementationClassName() + "].", e);
        }
    }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.container.spi.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.