Examples of NetworkProxyConfiguration


Examples of org.apache.archiva.configuration.NetworkProxyConfiguration

    {
        boolean satisfies = false;

        if ( object instanceof NetworkProxyConfiguration )
        {
            NetworkProxyConfiguration proxy = (NetworkProxyConfiguration) object;
            return ( StringUtils.equals( proxyId, proxy.getId() ) );
        }

        return satisfies;
    }
View Full Code Here

Examples of org.apache.archiva.configuration.NetworkProxyConfiguration

        {
            throw new RepositoryAdminException(
                "cannot update NetworkProxy with id " + networkProxy.getId() + " as not exist" );
        }
        Configuration configuration = getArchivaConfiguration().getConfiguration();
        NetworkProxyConfiguration networkProxyConfiguration = getNetworkProxyConfiguration( networkProxy );
        configuration.removeNetworkProxy( networkProxyConfiguration );
        configuration.addNetworkProxy( networkProxyConfiguration );

        triggerAuditEvent( networkProxy.getId(), null, AuditEvent.MODIFY_NETWORK_PROXY, auditInformation );
View Full Code Here

Examples of org.apache.archiva.configuration.NetworkProxyConfiguration

        {
            throw new RepositoryAdminException(
                "cannot delete NetworkProxy with id " + networkProxyId + " as not exist" );
        }
        Configuration configuration = getArchivaConfiguration().getConfiguration();
        NetworkProxyConfiguration networkProxyConfiguration = getNetworkProxyConfiguration( networkProxy );
        configuration.removeNetworkProxy( networkProxyConfiguration );

        for ( RemoteRepositoryConfiguration rrc : configuration.getRemoteRepositories())
        {
            if (StringUtils.equals( rrc.getRemoteDownloadNetworkProxyId(), networkProxyId ))
View Full Code Here

Examples of org.apache.archiva.configuration.NetworkProxyConfiguration

        server.setHandler( handler );
        server.start();

        int port = server.getConnectors()[0].getLocalPort();

        NetworkProxyConfiguration proxyConfig = new NetworkProxyConfiguration();
        proxyConfig.setHost( "localhost" );
        proxyConfig.setPort( port );
        proxyConfig.setProtocol( "http" );
        proxyConfig.setId( PROXY_ID );
        config.getConfiguration().addNetworkProxy( proxyConfig );

        // Setup target (proxied to) repository.
        RemoteRepositoryConfiguration repoConfig = new RemoteRepositoryConfiguration();
View Full Code Here

Examples of org.apache.archiva.configuration.NetworkProxyConfiguration

        {
            throw new RepositoryAdminException(
                "cannot update NetworkProxy with id " + networkProxy.getId() + " as not exist" );
        }
        Configuration configuration = getArchivaConfiguration().getConfiguration();
        NetworkProxyConfiguration networkProxyConfiguration = getNetworkProxyConfiguration( networkProxy );
        configuration.removeNetworkProxy( networkProxyConfiguration );
        configuration.addNetworkProxy( networkProxyConfiguration );

        triggerAuditEvent( networkProxy.getId(), null, AuditEvent.MODIFY_NETWORK_PROXY, auditInformation );
View Full Code Here

Examples of org.apache.archiva.configuration.NetworkProxyConfiguration

        {
            throw new RepositoryAdminException(
                "cannot delete NetworkProxy with id " + networkProxyId + " as not exist" );
        }
        Configuration configuration = getArchivaConfiguration().getConfiguration();
        NetworkProxyConfiguration networkProxyConfiguration = getNetworkProxyConfiguration( networkProxy );
        configuration.removeNetworkProxy( networkProxyConfiguration );

        for ( RemoteRepositoryConfiguration rrc : configuration.getRemoteRepositories() )
        {
            if ( StringUtils.equals( rrc.getRemoteDownloadNetworkProxyId(), networkProxyId ) )
View Full Code Here

Examples of org.apache.archiva.configuration.NetworkProxyConfiguration

        value.setProxyConnectors( proxyConnectors );
        java.util.List networkProxies = new java.util.ArrayList/*<NetworkProxyConfiguration>*/();
        List networkProxiesSubsets = registry.getSubsetList( prefix + "networkProxies.networkProxy" );
        for ( Iterator i = networkProxiesSubsets.iterator(); i.hasNext(); )
        {
            NetworkProxyConfiguration v = readNetworkProxyConfiguration( "", (Registry) i.next() );
            networkProxies.add( v );
        }
        value.setNetworkProxies( networkProxies );
        java.util.List legacyArtifactPaths = new java.util.ArrayList/*<LegacyArtifactPath>*/();
        List legacyArtifactPathsSubsets = registry.getSubsetList( prefix + "legacyArtifactPaths.legacyArtifactPath" );
View Full Code Here

Examples of org.apache.archiva.configuration.NetworkProxyConfiguration

        return value;
    }
   
    private NetworkProxyConfiguration readNetworkProxyConfiguration( String prefix, Registry registry )
    {
        NetworkProxyConfiguration value = new NetworkProxyConfiguration();

        String id = registry.getString( prefix + "id", value.getId() );
        value.setId( id );
        String protocol = registry.getString( prefix + "protocol", value.getProtocol() );
        value.setProtocol( protocol );
        String host = registry.getString( prefix + "host", value.getHost() );
        value.setHost( host );
        int port = registry.getInt( prefix + "port", value.getPort() );
        value.setPort( port );
        String username = registry.getString( prefix + "username", value.getUsername() );
        value.setUsername( username );
        String password = registry.getString( prefix + "password", value.getPassword() );
        value.setPassword( password );

        return value;
    }
View Full Code Here

Examples of org.apache.archiva.configuration.NetworkProxyConfiguration

                int count = 0;
                for ( Iterator iter = value.getNetworkProxies().iterator(); iter.hasNext(); count++ )
                {
                    String name = "networkProxies.networkProxy(" + count + ")";
                    NetworkProxyConfiguration o = ( NetworkProxyConfiguration ) iter.next();
                    writeNetworkProxyConfiguration( prefix + name + ".", o, registry );
                }
            }
            if ( value.getLegacyArtifactPaths() != null && value.getLegacyArtifactPaths().size() > 0
)
View Full Code Here

Examples of org.apache.archiva.configuration.NetworkProxyConfiguration

        {
            throw new RepositoryAdminException(
                "cannot update NetworkProxy with id " + networkProxy.getId() + " as not exist" );
        }
        Configuration configuration = getArchivaConfiguration().getConfiguration();
        NetworkProxyConfiguration networkProxyConfiguration = getNetworkProxyConfiguration( networkProxy );
        configuration.removeNetworkProxy( networkProxyConfiguration );
        configuration.addNetworkProxy( networkProxyConfiguration );

        triggerAuditEvent( networkProxy.getId(), null, AuditEvent.MODIFY_NETWORK_PROXY, auditInformation );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.