Interface RepositoryLayoutFactory
- All Known Implementing Classes:
 Maven2RepositoryLayoutFactory
public interface RepositoryLayoutFactory
A factory to obtain repository layouts. A repository layout is responsible to map an artifact or some metadata to a
 URI relative to the repository root where the resource resides. When the repository system needs to access a given
 remote repository, it iterates the registered factories in descending order of their priority and calls
 
newInstance(RepositorySystemSession, RemoteRepository) on them. The first layout returned by a factory will
 then be used for transferring artifacts/metadata.- 
Method Summary
Modifier and TypeMethodDescriptionfloatThe priority of this factory.newInstance(RepositorySystemSession session, RemoteRepository repository) Tries to create a repository layout for the specified remote repository. 
- 
Method Details
- 
newInstance
RepositoryLayout newInstance(RepositorySystemSession session, RemoteRepository repository) throws NoRepositoryLayoutException Tries to create a repository layout for the specified remote repository. Typically, a factory will inspectRemoteRepository.getContentType()to determine whether it can handle a repository.- Parameters:
 session- The repository system session from which to configure the layout, must not benull.repository- The remote repository to create a layout for, must not benull.- Returns:
 - The layout for the given repository, never 
null. - Throws:
 NoRepositoryLayoutException- If the factory cannot create a repository layout for the specified remote repository.
 - 
getPriority
float getPriority()The priority of this factory. When multiple factories can handle a given repository, factories with higher priority are preferred over those with lower priority.- Returns:
 - The priority of this factory.
 
 
 -