Package org.jboss.arquillian.container.spi

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


    }

    public void setup(AppEngineToolsConfiguration configuration) {
        final String sdkDir = configuration.getSdkDir();
        if (sdkDir == null)
            throw new ConfigurationException("AppEngine SDK root is null.");

        if (configuration.getOauth2token() == null) {
            final String userId = configuration.getUserId();
            if (userId == null)
                throw new ConfigurationException("Null userId.");

            final String password = configuration.getPassword();
            if (password == null)
                throw new ConfigurationException("Null password.");
        }

        SdkInfo.setSdkRoot(new File(sdkDir));

        this.configuration = configuration;
View Full Code Here


        String runOauth2Msg = "Create ${HOME}/.appcfg_oauth2_tokens by running $appcfg.sh --oauth2 update YOUR-WAR-DIR";
        String userDir = System.getProperty("user.home");
        File tokenFile = new File(userDir, ".appcfg_oauth2_tokens_java");

        if (!tokenFile.exists()) {
            throw new ConfigurationException(runOauth2Msg);
        }

        boolean useCookies = true// use ${HOME}/.appcfg_oauth2_tokens_java
        String oauth2ClientId = null;
        String oauth2ClientSecret = null;
        String oauth2RefreshToken = null;
        OAuth2Native client = new OAuth2Native(useCookies, oauth2ClientId,
            oauth2ClientSecret, oauth2RefreshToken);
        Credential credential = client.authorize();

        if (credential == null || credential.getAccessToken() == null) {
            String errMsg = "Tokens expired? " + runOauth2Msg;
            throw new ConfigurationException(errMsg);
        }
        return credential.getAccessToken();
    }
View Full Code Here

    }

    public void setup(AppEngineToolsConfiguration configuration) {
        final String sdkDir = configuration.getSdkDir();
        if (sdkDir == null)
            throw new ConfigurationException("AppEngine SDK root is null.");

        if (configuration.getOauth2token() == null) {
            final String userId = configuration.getUserId();
            if (userId == null)
                throw new ConfigurationException("Null userId.");

            final String password = configuration.getPassword();
            if (password == null)
                throw new ConfigurationException("Null password.");
        }

        SdkInfo.setSdkRoot(new File(sdkDir));

        this.configuration = configuration;
View Full Code Here

        String runOauth2Msg = "Create ${HOME}/.appcfg_oauth2_tokens by running $appcfg.sh --oauth2 update YOUR-WAR-DIR";
        String userDir = System.getProperty("user.home");
        File tokenFile = new File(userDir, ".appcfg_oauth2_tokens_java");

        if (!tokenFile.exists()) {
            throw new ConfigurationException(runOauth2Msg);
        }

        boolean useCookies = true// use ${HOME}/.appcfg_oauth2_tokens_java
        String oauth2ClientId = null;
        String oauth2ClientSecret = null;
        String oauth2RefreshToken = null;
        OAuth2Native client = new OAuth2Native(useCookies, oauth2ClientId,
            oauth2ClientSecret, oauth2RefreshToken);
        Credential credential = client.authorize();

        if (credential == null || credential.getAccessToken() == null) {
            String errMsg = "Tokens expired? " + runOauth2Msg;
            throw new ConfigurationException(errMsg);
        }
        return credential.getAccessToken();
    }
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

                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 (username != null && password == null) {
            throw new ConfigurationException("username has been set, but no password given");
        }
    }
View Full Code Here

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

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

        if (configuration.getPassword() == null)
            throw new ConfigurationException("AppEngine password is null.");

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

    }

    public void setup(AppEngineToolsConfiguration configuration) {
        final String sdkDir = configuration.getSdkDir();
        if (sdkDir == null)
            throw new ConfigurationException("AppEngine SDK root is null.");

        if (configuration.getOauth2token() == null) {
            final String userId = configuration.getUserId();
            if (userId == null)
                throw new ConfigurationException("Null userId.");

            final String password = configuration.getPassword();
            if (password == null)
                throw new ConfigurationException("Null password.");
        }

        SdkInfo.setSdkRoot(new File(sdkDir));

        this.configuration = configuration;
View Full Code Here

        String runOauth2Msg = "Create ${HOME}/.appcfg_oauth2_tokens by running $appcfg.sh --oauth2 update YOUR-WAR-DIR";
        String userDir = System.getProperty("user.home");
        File tokenFile = new File(userDir, ".appcfg_oauth2_tokens_java");

        if (!tokenFile.exists()) {
            throw new ConfigurationException(runOauth2Msg);
        }

        boolean useCookies = true// use ${HOME}/.appcfg_oauth2_tokens_java
        String oauth2ClientId = null;
        String oauth2ClientSecret = null;
        String oauth2RefreshToken = null;
        OAuth2Native client = new OAuth2Native(useCookies, oauth2ClientId,
                                               oauth2ClientSecret, oauth2RefreshToken);
        Credential credential = client.authorize();

        if (credential == null || credential.getAccessToken() == null) {
            String errMsg = "Tokens expired? " + runOauth2Msg;
            throw new ConfigurationException(errMsg);
        }
        return credential.getAccessToken();
    }
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.