Package org.apache.archiva.web.xmlrpc.api

Examples of org.apache.archiva.web.xmlrpc.api.AdministrationService


        info.setPassword( args[2] );
        info.setTimeZone( TimeZone.getDefault() );

        try
        {
            AdministrationService adminService = binder.bind( AdministrationService.class, new URL( args[0] ), info );
            PingService pingService = binder.bind( PingService.class, new URL( args[0] ), info );
                      
            System.out.println( "Ping : " + pingService.ping() );
           
            List<ManagedRepository> managedRepos = adminService.getAllManagedRepositories();
           
            System.out.println( "\n******** Managed Repositories ********" );
            for( ManagedRepository managedRepo : managedRepos )
            {
                System.out.println( "=================================" );
                System.out.println( "Id: " + managedRepo.getId() );
                System.out.println( "Name: " + managedRepo.getName() );
                System.out.println( "Layout: " + managedRepo.getLayout() );
                System.out.println( "URL: " + managedRepo.getUrl() );
                System.out.println( "Releases: " + managedRepo.isReleases() );
                System.out.println( "Snapshots: " + managedRepo.isSnapshots() );
            }               
           
            System.out.println( "\n******** Remote Repositories ********" );
            List<RemoteRepository> remoteRepos = adminService.getAllRemoteRepositories();
            for( RemoteRepository remoteRepo : remoteRepos )
            {
                System.out.println( "=================================" );
                System.out.println( "Id: " + remoteRepo.getId() );
                System.out.println( "Name: " + remoteRepo.getName() );
                System.out.println( "Layout: " + remoteRepo.getLayout() );
                System.out.println( "URL: " + remoteRepo.getUrl() );
            }
           
            System.out.println( "\n******** Repository Consumers ********" );
            List<String> repoConsumers = adminService.getAllRepositoryConsumers();
            for( String consumer : repoConsumers )
            {
                System.out.println( consumer );
            }
           
            Boolean success = adminService.configureRepositoryConsumer( "internal", "repository-purge", true );
            System.out.println( "\nConfigured repo consumer 'repository-purge' : " +
                ( (Boolean) success ).booleanValue() );
           
            success = adminService.executeRepositoryScanner( "internal" );
            System.out.println( "\nExecuted repo scanner of repository 'internal' : " +
                ( (Boolean) success ).booleanValue() );

            /** add, get and delete managed repo **/
            /*
 
View Full Code Here


        Binder binder = new DefaultBinder();
       
        try
        {
            AuthenticationInfo authnInfo = new AuthenticationInfo( args[1], args[2] );
            AdministrationService adminService = binder.bind( AdministrationService.class, new URL( args[0] ), authnInfo );
            PingService pingService = binder.bind( PingService.class, new URL( args[0] ), authnInfo );
                      
            System.out.println( "Ping : " + pingService.ping() );
           
            List<ManagedRepository> managedRepos = adminService.getAllManagedRepositories();
           
            System.out.println( "\n******** Managed Repositories ********" );
            for( ManagedRepository managedRepo : managedRepos )
            {
                System.out.println( "=================================" );
                System.out.println( "Id: " + managedRepo.getId() );
                System.out.println( "Name: " + managedRepo.getName() );
                System.out.println( "Layout: " + managedRepo.getLayout() );
                System.out.println( "URL: " + managedRepo.getUrl() );
                System.out.println( "Releases: " + managedRepo.isReleases() );
                System.out.println( "Snapshots: " + managedRepo.isSnapshots() );
            }               
           
            System.out.println( "\n******** Remote Repositories ********" );
            List<RemoteRepository> remoteRepos = adminService.getAllRemoteRepositories();
            for( RemoteRepository remoteRepo : remoteRepos )
            {
                System.out.println( "=================================" );
                System.out.println( "Id: " + remoteRepo.getId() );
                System.out.println( "Name: " + remoteRepo.getName() );
                System.out.println( "Layout: " + remoteRepo.getLayout() );
                System.out.println( "URL: " + remoteRepo.getUrl() );
            }
           
            System.out.println( "\n******** Repository Consumers ********" );
            List<String> repoConsumers = adminService.getAllRepositoryConsumers();
            for( String consumer : repoConsumers )
            {
                System.out.println( consumer );
            }
           
            System.out.println( "\n******** Database Consumers ********" );
            List<String> dbConsumers = adminService.getAllDatabaseConsumers();
            for( String consumer : dbConsumers )
            {
                System.out.println( consumer );
            }
           
            Boolean success = adminService.configureRepositoryConsumer( "internal", "repository-purge", true );
            System.out.println( "\nConfigured repo consumer 'repository-purge' : " +
                ( (Boolean) success ).booleanValue() );
           
            success = adminService.configureDatabaseConsumer( "update-db-bytecode-stats", false );
            System.out.println( "\nConfigured db consumer 'update-db-bytecode-stats' : " +
                ( (Boolean) success ).booleanValue() );
           
            success = adminService.executeRepositoryScanner( "internal" );
            System.out.println( "\nExecuted repo scanner of repository 'internal' : " +
                ( (Boolean) success ).booleanValue() );
           
            success = adminService.executeDatabaseScanner();
            System.out.println( "\nExecuted database scanner : " + ( (Boolean) success ).booleanValue() );
          
            /* delete artifact */
            /*
             * NOTE: before enabling & invoking deleteArtifact, make sure that the repository and artifact exists first!
View Full Code Here

        Binder binder = new DefaultBinder();
       
        try
        {
            AuthenticationInfo authnInfo = new AuthenticationInfo( args[1], args[2] );
            AdministrationService adminService = binder.bind( AdministrationService.class, new URL( args[0] ), authnInfo );
            List<ManagedRepository> managedRepos = adminService.getAllManagedRepositories();
           
            System.out.println( "\n******** Managed Repositories ********" );
            for( ManagedRepository managedRepo : managedRepos )
            {
                System.out.println( "=================================" );
                System.out.println( "Id: " + managedRepo.getId() );
                System.out.println( "Name: " + managedRepo.getName() );
                System.out.println( "Layout: " + managedRepo.getLayout() );
                System.out.println( "URL: " + managedRepo.getUrl() );
                System.out.println( "Releases: " + managedRepo.isReleases() );
                System.out.println( "Snapshots: " + managedRepo.isSnapshots() );
            }               
           
            System.out.println( "\n******** Remote Repositories ********" );
            List<RemoteRepository> remoteRepos = adminService.getAllRemoteRepositories();
            for( RemoteRepository remoteRepo : remoteRepos )
            {
                System.out.println( "=================================" );
                System.out.println( "Id: " + remoteRepo.getId() );
                System.out.println( "Name: " + remoteRepo.getName() );
                System.out.println( "Layout: " + remoteRepo.getLayout() );
                System.out.println( "URL: " + remoteRepo.getUrl() );
            }
           
            System.out.println( "\n******** Repository Consumers ********" );
            List<String> repoConsumers = adminService.getAllRepositoryConsumers();
            for( String consumer : repoConsumers )
            {
                System.out.println( consumer );
            }
           
            System.out.println( "\n******** Database Consumers ********" );
            List<String> dbConsumers = adminService.getAllDatabaseConsumers();
            for( String consumer : dbConsumers )
            {
                System.out.println( consumer );
            }
           
            Boolean success = adminService.configureRepositoryConsumer( "internal", "repository-purge", true );
            System.out.println( "\nConfigured repo consumer 'repository-purge' : " +
                ( (Boolean) success ).booleanValue() );
           
            success = adminService.configureDatabaseConsumer( "update-db-bytecode-stats", false );
            System.out.println( "\nConfigured db consumer 'update-db-bytecode-stats' : " +
                ( (Boolean) success ).booleanValue() );
           
            success = adminService.executeRepositoryScanner( "internal" );
            System.out.println( "\nExecuted repo scanner of repository 'internal' : " +
                ( (Boolean) success ).booleanValue() );
           
            success = adminService.executeDatabaseScanner();
            System.out.println( "\nExecuted database scanner : " + ( (Boolean) success ).booleanValue() );
          
            /* delete artifact */
            /*
             * NOTE: before enabling & invoking deleteArtifact, make sure that the repository and artifact exists first!
View Full Code Here

        Binder binder = new DefaultBinder();
       
        try
        {
            AuthenticationInfo authnInfo = new AuthenticationInfo( args[1], args[2] );
            AdministrationService adminService = binder.bind( AdministrationService.class, new URL( args[0] ), authnInfo );
            List<ManagedRepository> managedRepos = adminService.getAllManagedRepositories();
           
            System.out.println( "\n******** Managed Repositories ********" );
            for( ManagedRepository managedRepo : managedRepos )
            {
                System.out.println( "=================================" );
                System.out.println( "Id: " + managedRepo.getId() );
                System.out.println( "Name: " + managedRepo.getName() );
                System.out.println( "Layout: " + managedRepo.getLayout() );
                System.out.println( "URL: " + managedRepo.getUrl() );
                System.out.println( "Releases: " + managedRepo.isReleases() );
                System.out.println( "Snapshots: " + managedRepo.isSnapshots() );
            }               
           
            System.out.println( "\n******** Remote Repositories ********" );
            List<RemoteRepository> remoteRepos = adminService.getAllRemoteRepositories();
            for( RemoteRepository remoteRepo : remoteRepos )
            {
                System.out.println( "=================================" );
                System.out.println( "Id: " + remoteRepo.getId() );
                System.out.println( "Name: " + remoteRepo.getName() );
                System.out.println( "Layout: " + remoteRepo.getLayout() );
                System.out.println( "URL: " + remoteRepo.getUrl() );
            }
           
            System.out.println( "\n******** Repository Consumers ********" );
            List<String> repoConsumers = adminService.getAllRepositoryConsumers();
            for( String consumer : repoConsumers )
            {
                System.out.println( consumer );
            }
           
            System.out.println( "\n******** Database Consumers ********" );
            List<String> dbConsumers = adminService.getAllDatabaseConsumers();
            for( String consumer : dbConsumers )
            {
                System.out.println( consumer );
            }
           
            Boolean success = adminService.configureRepositoryConsumer( "internal", "repository-purge", true );
            System.out.println( "\nConfigured repo consumer 'repository-purge' : " +
                ( (Boolean) success ).booleanValue() );
           
            success = adminService.configureDatabaseConsumer( "update-db-bytecode-stats", false );
            System.out.println( "\nConfigured db consumer 'update-db-bytecode-stats' : " +
                ( (Boolean) success ).booleanValue() );
           
            success = adminService.executeRepositoryScanner( "internal" );
            System.out.println( "\nExecuted repo scanner of repository 'internal' : " +
                ( (Boolean) success ).booleanValue() );
           
            success = adminService.executeDatabaseScanner();
            System.out.println( "\nExecuted database scanner : " + ( (Boolean) success ).booleanValue() );
          
            /* delete artifact */
            /*
             * NOTE: before enabling & invoking deleteArtifact, make sure that the repository and artifact exists first!
View Full Code Here

TOP

Related Classes of org.apache.archiva.web.xmlrpc.api.AdministrationService

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.