Package org.eclipse.aether.internal.impl
Class DefaultLocalRepositoryProvider
- java.lang.Object
-
- org.eclipse.aether.internal.impl.DefaultLocalRepositoryProvider
-
- All Implemented Interfaces:
LocalRepositoryProvider
,Service
@Named public class DefaultLocalRepositoryProvider extends Object implements LocalRepositoryProvider, Service
-
-
Constructor Summary
Constructors Constructor Description DefaultLocalRepositoryProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DefaultLocalRepositoryProvider
addLocalRepositoryManagerFactory(LocalRepositoryManagerFactory factory)
void
initService(ServiceLocator locator)
Provides the opportunity to initialize this service and to acquire other services for its operation from the locator.LocalRepositoryManager
newLocalRepositoryManager(RepositorySystemSession session, LocalRepository repository)
Creates a new manager for the specified local repository.DefaultLocalRepositoryProvider
setLocalRepositoryManagerFactories(Collection<LocalRepositoryManagerFactory> factories)
-
-
-
Constructor Detail
-
DefaultLocalRepositoryProvider
public DefaultLocalRepositoryProvider()
-
-
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 interfaceService
- Parameters:
locator
- The service locator, must not benull
.
-
addLocalRepositoryManagerFactory
public DefaultLocalRepositoryProvider addLocalRepositoryManagerFactory(LocalRepositoryManagerFactory factory)
-
setLocalRepositoryManagerFactories
public DefaultLocalRepositoryProvider setLocalRepositoryManagerFactories(Collection<LocalRepositoryManagerFactory> factories)
-
newLocalRepositoryManager
public LocalRepositoryManager newLocalRepositoryManager(RepositorySystemSession session, LocalRepository repository) throws NoLocalRepositoryManagerException
Description copied from interface:LocalRepositoryProvider
Creates a new manager for the specified local repository. If the specified local repository has no type, the default local repository type of the system will be used. Note: It is expected that this method invocation is one of the last steps of setting up a new session, in particular any configuration properties should have been set already.- Specified by:
newLocalRepositoryManager
in interfaceLocalRepositoryProvider
- Parameters:
session
- The repository system session from which to configure the manager, must not benull
.repository
- The local repository to create a manager for, must not benull
.- Returns:
- The local repository manager, never
null
. - Throws:
NoLocalRepositoryManagerException
- If the specified repository type is not recognized or no base directory is given.- See Also:
RepositorySystem.newLocalRepositoryManager(RepositorySystemSession, LocalRepository)
-
-