Interface RepositoryLayoutFactory


  • 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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      float getPriority()
      The priority of this factory.
      RepositoryLayout newInstance​(org.eclipse.aether.RepositorySystemSession session, org.eclipse.aether.repository.RemoteRepository repository)
      Tries to create a repository layout for the specified remote repository.
    • Method Detail

      • newInstance

        RepositoryLayout newInstance​(org.eclipse.aether.RepositorySystemSession session,
                                     org.eclipse.aether.repository.RemoteRepository repository)
                              throws org.eclipse.aether.transfer.NoRepositoryLayoutException
        Tries to create a repository layout for the specified remote repository. Typically, a factory will inspect RemoteRepository.getContentType() to determine whether it can handle a repository.
        Parameters:
        session - The repository system session from which to configure the layout, must not be null.
        repository - The remote repository to create a layout for, must not be null.
        Returns:
        The layout for the given repository, never null.
        Throws:
        org.eclipse.aether.transfer.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.