Package org.palladiosimulator.edp2.impl
Class RepositoryManager
- java.lang.Object
-
- org.palladiosimulator.edp2.impl.RepositoryManager
-
public class RepositoryManager extends Object
Utility class to manage repositories.
-
-
Constructor Summary
Constructors Constructor Description RepositoryManager()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addRepository(Repositories repos, Repository newRepo)
Adds a repository to the list of repositories.static Repositories
getCentralRepository()
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.
-
-
-
Method Detail
-
addRepository
public static void addRepository(Repositories repos, Repository newRepo)
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
public static void removeRepository(Repositories repos, Repository repo)
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
public static Repositories 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
public static Repository getRepositoryFromUUID(String uuid)
Returns Repository with given UUID from central repository.- Returns:
- Reference to the repository with given UUID. Null if not found.
-
-