Interface RepositoryLayoutFactory

All Known Implementing Classes:

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 Details

    • newInstance

      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.
      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.
      The layout for the given repository, never null.
      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.
      The priority of this factory.