- Enclosing interface:
Repository
public static interface Repository.Factory
An factory interface for constructing repositories.
See
RepositoryPlugin.-
Method Summary
Modifier and TypeMethodDescriptioncreate(ProjectId projectId, RepositoryMetadata metadata) Constructs a repository.default Repositorycreate(ProjectId projectId, RepositoryMetadata metadata, Function<String, Repository.Factory> typeLookup) Constructs a repository.
-
Method Details
-
create
Constructs a repository.- Parameters:
projectId- the project-id for the repository ornullif the repository is at the cluster level.metadata- metadata for the repository including name and settings- Throws:
Exception
-
create
default Repository create(@Nullable ProjectId projectId, RepositoryMetadata metadata, Function<String, Repository.Factory> typeLookup) throws ExceptionConstructs a repository.- Parameters:
projectId- the project-id for the repository ornullif the repository is at the cluster level.metadata- metadata for the repository including name and settingstypeLookup- a function that returns the repository factory for the given repository type.- Throws:
Exception
-