org.sonatype.aether.impl.internal
Class DefaultInstaller

java.lang.Object
  extended by org.sonatype.aether.impl.internal.DefaultInstaller
All Implemented Interfaces:
Installer, Service

@Component(role=Installer.class)
public class DefaultInstaller
extends java.lang.Object
implements Installer, Service

Author:
Benjamin Bentmann

Constructor Summary
DefaultInstaller()
           
DefaultInstaller(Logger logger, FileProcessor fileProcessor, java.util.List<MetadataGeneratorFactory> metadataFactories, java.util.List<LocalRepositoryMaintainer> localRepositoryMaintainers)
           
 
Method Summary
 DefaultInstaller addLocalRepositoryMaintainer(LocalRepositoryMaintainer maintainer)
           
 DefaultInstaller addMetadataGeneratorFactory(MetadataGeneratorFactory factory)
           
 void initService(ServiceLocator locator)
          Provides the opportunity to initialize this service and to acquire other services for its operation from the locator.
 InstallResult install(RepositorySystemSession session, InstallRequest request)
          Installs a collection of artifacts and their accompanying metadata to the local repository.
 DefaultInstaller setFileProcessor(FileProcessor fileProcessor)
           
 DefaultInstaller setLocalRepositoryMaintainers(java.util.List<LocalRepositoryMaintainer> maintainers)
           
 DefaultInstaller setLogger(Logger logger)
           
 DefaultInstaller setMetadataFactories(java.util.List<MetadataGeneratorFactory> metadataFactories)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultInstaller

public DefaultInstaller()

DefaultInstaller

public DefaultInstaller(Logger logger,
                        FileProcessor fileProcessor,
                        java.util.List<MetadataGeneratorFactory> metadataFactories,
                        java.util.List<LocalRepositoryMaintainer> localRepositoryMaintainers)
Method Detail

initService

public void initService(ServiceLocator locator)
Description copied from interface: Service
Provides the opportunity to initialize this service and to acquire other services for its operation from the locator. A service must not save the reference to the provided service locator.

Specified by:
initService in interface Service
Parameters:
locator - The service locator, must not be null.

setLogger

public DefaultInstaller setLogger(Logger logger)

setFileProcessor

public DefaultInstaller setFileProcessor(FileProcessor fileProcessor)

addLocalRepositoryMaintainer

public DefaultInstaller addLocalRepositoryMaintainer(LocalRepositoryMaintainer maintainer)

setLocalRepositoryMaintainers

public DefaultInstaller setLocalRepositoryMaintainers(java.util.List<LocalRepositoryMaintainer> maintainers)

addMetadataGeneratorFactory

public DefaultInstaller addMetadataGeneratorFactory(MetadataGeneratorFactory factory)

setMetadataFactories

public DefaultInstaller setMetadataFactories(java.util.List<MetadataGeneratorFactory> metadataFactories)

install

public InstallResult install(RepositorySystemSession session,
                             InstallRequest request)
                      throws InstallationException
Description copied from interface: Installer
Installs a collection of artifacts and their accompanying metadata to the local repository.

Specified by:
install in interface Installer
Parameters:
session - The repository session, must not be null.
request - The installation request, must not be null.
Returns:
The installation result, never null.
Throws:
InstallationException - If any artifact/metadata from the request could not be installed.
See Also:
RepositorySystem.install(RepositorySystemSession, InstallRequest)


Copyright © 2010 Sonatype, Inc.. All Rights Reserved.