Package org.apache.archiva.admin.model.beans

Examples of org.apache.archiva.admin.model.beans.NetworkProxy


        Wagon wagon = null;
        try
        {
            RepositoryURL repoUrl = remoteRepository.getURL();
            String protocol = repoUrl.getProtocol();
            NetworkProxy networkProxy = null;
            if ( StringUtils.isNotBlank( connector.getProxyId() ) )
            {
                networkProxy = networkProxyAdmin.getNetworkProxy( connector.getProxyId() );
            }
            WagonFactoryRequest wagonFactoryRequest = new WagonFactoryRequest( "wagon#" + protocol,
View Full Code Here


        {
            Wagon wagon = null;
            try
            {
                String protocol = getProtocol( remoteRepository.getUrl() );
                final NetworkProxy networkProxy = this.networkProxyMap.get( remoteRepository.getId() );

                wagon = wagonFactory.getWagon(
                    new WagonFactoryRequest( "wagon#" + protocol, remoteRepository.getExtraHeaders() ).networkProxy(
                        networkProxy ) );
View Full Code Here

     */
    private boolean connectToRepository( Wagon wagon, RemoteRepository remoteRepository )
    {
        boolean connected;

        final NetworkProxy proxyConnector = this.networkProxyMap.get( remoteRepository.getId() );
        ProxyInfo networkProxy = null;
        if ( proxyConnector != null )
        {
            networkProxy = new ProxyInfo();
            networkProxy.setType( proxyConnector.getProtocol() );
            networkProxy.setHost( proxyConnector.getHost() );
            networkProxy.setPort( proxyConnector.getPort() );
            networkProxy.setUserName( proxyConnector.getUsername() );
            networkProxy.setPassword( proxyConnector.getPassword() );

            String msg = "Using network proxy " + networkProxy.getHost() + ":" + networkProxy.getPort()
                + " to connect to remote repository " + remoteRepository.getUrl();
            if ( networkProxy.getNonProxyHosts() != null )
            {
View Full Code Here

                    if ( remoteRepoConfig != null )
                    {
                        remoteRepositories.add( remoteRepoConfig );

                        NetworkProxy networkProxyConfig =
                            networkProxyAdmin.getNetworkProxy( proxyConnector.getProxyId() );

                        if ( networkProxyConfig != null )
                        {
                            // key/value: remote repo ID/proxy info
View Full Code Here

            if ( remoteRepository == null )
            {
                log.warn( "ignore scheduleDownloadRemote for repo with id {} as not exists", repositoryId );
                return;
            }
            NetworkProxy networkProxy = null;
            if ( StringUtils.isNotBlank( remoteRepository.getRemoteDownloadNetworkProxyId( ) ) )
            {
                networkProxy = networkProxyAdmin.getNetworkProxy( remoteRepository.getRemoteDownloadNetworkProxyId( ) );
                if ( networkProxy == null )
                {
View Full Code Here

        {
            addActionError( "Unable to delete network proxy with blank id." );
            return SUCCESS;
        }

        NetworkProxy networkProxy = getNetworkProxyAdmin().getNetworkProxy( id );
        if ( networkProxy == null )
        {
            addActionError( "Unable to remove network proxy, proxy with id [" + id + "] not found." );
            return SUCCESS;
        }
View Full Code Here

            proxy = findNetworkProxy( id );
        }

        if ( proxy == null )
        {
            proxy = new NetworkProxy();
        }
    }
View Full Code Here

    @Test
    public void testStruts2ValidationFrameworkWithNullInputs() throws Exception
    {
        // prep
        NetworkProxy networkProxy = createNetworkProxy(null, null, null, null);
        configureNetworkProxyAction.setProxy(networkProxy);

        // test
        actionValidatorManager.validate(configureNetworkProxyAction, VALIDATION_CONTEXT);
View Full Code Here

    @Test
    public void testStruts2ValidationFrameworkWithBlankInputs() throws Exception
    {
        // prep
        NetworkProxy networkProxy = createNetworkProxy(EMPTY_STRING, EMPTY_STRING, EMPTY_STRING, EMPTY_STRING);
        configureNetworkProxyAction.setProxy(networkProxy);

        // test
        actionValidatorManager.validate(configureNetworkProxyAction, VALIDATION_CONTEXT);
View Full Code Here

    @Test
    public void testStruts2ValidationFrameworkWithInvalidInputs() throws Exception
    {
        // prep
        NetworkProxy networkProxy = createNetworkProxy( PROXY_ID_INVALID_INPUT, PROXY_HOST_INVALID_INPUT,
                                                        PROXY_PORT_INVALID_INPUT, PROXY_PROTOCOL_INVALID_INPUT,
                                                        PROXY_USERNAME_INVALID_INPUT );
        configureNetworkProxyAction.setProxy(networkProxy);

        // test
View Full Code Here

TOP

Related Classes of org.apache.archiva.admin.model.beans.NetworkProxy

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.