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 Object
implements Installer, Service

Author:
Benjamin Bentmann

Constructor Summary
DefaultInstaller()
           
DefaultInstaller(Logger logger, FileProcessor fileProcessor, RepositoryEventDispatcher repositoryEventDispatcher, List<MetadataGeneratorFactory> metadataFactories, SyncContextFactory syncContextFactory)
           
 
Method Summary
 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 setLogger(Logger logger)
           
 DefaultInstaller setMetadataFactories(List<MetadataGeneratorFactory> metadataFactories)
           
 DefaultInstaller setRepositoryEventDispatcher(RepositoryEventDispatcher repositoryEventDispatcher)
           
 DefaultInstaller setSyncContextFactory(SyncContextFactory syncContextFactory)
           
 
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,
                        RepositoryEventDispatcher repositoryEventDispatcher,
                        List<MetadataGeneratorFactory> metadataFactories,
                        SyncContextFactory syncContextFactory)
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)

setRepositoryEventDispatcher

public DefaultInstaller setRepositoryEventDispatcher(RepositoryEventDispatcher repositoryEventDispatcher)

addMetadataGeneratorFactory

public DefaultInstaller addMetadataGeneratorFactory(MetadataGeneratorFactory factory)

setMetadataFactories

public DefaultInstaller setMetadataFactories(List<MetadataGeneratorFactory> metadataFactories)

setSyncContextFactory

public DefaultInstaller setSyncContextFactory(SyncContextFactory syncContextFactory)

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-2013. All Rights Reserved.