Package org.palladiosimulator.edp2.impl
Class RepositoryManager
java.lang.Object
org.palladiosimulator.edp2.impl.RepositoryManager
Utility class to manage repositories.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addRepository
(Repositories repos, Repository newRepo) Adds a repository to the list of repositories.static Repositories
Provides access to a central repository.static Repository
getRepositoryFromUUID
(String uuid) Returns Repository with given UUID from central repository.static void
removeRepository
(Repositories repos, Repository repo) Removes a repository from the given list of the available repositories.
-
Constructor Details
-
RepositoryManager
public RepositoryManager()
-
-
Method Details
-
addRepository
Adds a repository to the list of repositories. The repository is automatically opened, if possible.- Parameters:
repos
- The currently available repositories.newRepo
- The new repository to add.
-
removeRepository
Removes a repository from the given list of the available repositories. The repository is automatically closed, if possible.- Parameters:
repos
- The currently available repositories.repo
- The repository to remove.
-
getCentralRepository
Provides access to a central repository. Convenience function to provide access to a singleton which can then be managed.- Returns:
- Reference to the central repository.
-
getRepositoryFromUUID
Returns Repository with given UUID from central repository.- Returns:
- Reference to the repository with given UUID. Null if not found.
-