public class TypeFilteringRepositoryManager extends RepositoryManager
initializedRepositories, logger, NAMESPACE, PROXIED_ID| Constructor and Description |
|---|
TypeFilteringRepositoryManager(String type,
RepositoryManager delegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
addRepositoryConfig(RepositoryConfig config)
Adds or updates the configuration of a repository to the manager's system repository.
|
protected void |
cleanUpRepository(String repositoryID)
Clean up a removed repository.
|
protected Repository |
createRepository(String id)
Creates and initializes the repository with the specified ID.
|
protected Repository |
createSystemRepository() |
Collection<RepositoryInfo> |
getAllRepositoryInfos(boolean skipSystemRepo) |
org.apache.http.client.HttpClient |
getHttpClient()
HttpClient that has been assigned or has been used by this object. |
Collection<Repository> |
getInitializedRepositories()
Returns all initialized repositories.
|
Set<String> |
getInitializedRepositoryIDs()
Returns all initialized repositories.
|
URL |
getLocation()
Gets the URL of the server or directory.
|
String |
getNewRepositoryID(String baseName)
Generates an ID for a new repository based on the specified base name.
|
Repository |
getRepository(String id)
Gets the repository that is known by the specified ID from this manager.
|
RepositoryConfig |
getRepositoryConfig(String repositoryID) |
Set<String> |
getRepositoryIDs() |
RepositoryInfo |
getRepositoryInfo(String id)
Gets the repository that is known by the specified ID from this manager.
|
Repository |
getSystemRepository()
Gets the SYSTEM repository.
|
boolean |
hasRepositoryConfig(String repositoryID) |
void |
initialize()
Initializes the repository manager.
|
protected boolean |
isCorrectType(RepositoryConfig repositoryConfig) |
protected boolean |
isCorrectType(String repositoryID) |
void |
refresh()
Shuts down all initialized user repositories.
|
boolean |
removeRepositoryConfig(String repositoryID)
Deprecated.
|
void |
setHttpClient(org.apache.http.client.HttpClient httpClient)
Should be called before
RepositoryManager.init(). |
void |
shutDown()
Shuts down all initialized repositories, including the SYSTEM repository.
|
getAllRepositories, getAllRepositoryInfos, getAllUserRepositoryInfos, getModelFactory, init, isInitialized, isSafeToRemove, removeRepository, setInitializedRepositories, setModelFactory, updateInitializedRepositoriespublic TypeFilteringRepositoryManager(String type, RepositoryManager delegate)
public org.apache.http.client.HttpClient getHttpClient()
HttpClientDependentHttpClient that has been assigned or has been used by this object. The life cycle might not be or might
be tied to this object, depending on whether HttpClient was passed to or created by this object
respectively.getHttpClient in interface HttpClientDependentgetHttpClient in class RepositoryManagerRepository construction.RepositoryManager.getHttpClient()public void setHttpClient(org.apache.http.client.HttpClient httpClient)
RepositoryManagerRepositoryManager.init().setHttpClient in interface HttpClientDependentsetHttpClient in class RepositoryManagerhttpClient - RepositoryManager.setHttpClient(org.apache.http.client.HttpClient)public void initialize()
throws RepositoryException
RepositoryManagerinitialize in class RepositoryManagerRepositoryException - If the manager failed to initializepublic URL getLocation() throws MalformedURLException
RepositoryManagergetLocation in class RepositoryManagerMalformedURLException - If the location cannot be represented as a URL.protected Repository createSystemRepository() throws RepositoryException
createSystemRepository in class RepositoryManagerRepositoryExceptionpublic Repository getSystemRepository()
RepositoryManagergetSystemRepository in class RepositoryManagerpublic String getNewRepositoryID(String baseName) throws RepositoryException, RepositoryConfigException
RepositoryManagergetNewRepositoryID in class RepositoryManagerbaseName - The String on which the returned ID should be based, must not be null.RepositoryExceptionRepositoryConfigExceptionpublic Set<String> getRepositoryIDs() throws RepositoryException
getRepositoryIDs in class RepositoryManagerRepositoryExceptionpublic boolean hasRepositoryConfig(String repositoryID) throws RepositoryException, RepositoryConfigException
hasRepositoryConfig in class RepositoryManagerRepositoryExceptionRepositoryConfigExceptionpublic RepositoryConfig getRepositoryConfig(String repositoryID) throws RepositoryConfigException, RepositoryException
getRepositoryConfig in class RepositoryManagerRepositoryConfigExceptionRepositoryExceptionpublic void addRepositoryConfig(RepositoryConfig config) throws RepositoryException, RepositoryConfigException
RepositoryManageraddRepositoryConfig in class RepositoryManagerconfig - The repository configuration that should be added to or updated in the system repository.RepositoryException - If the manager failed to update it's system repository.RepositoryConfigException - If the manager doesn't know how to update a configuration due to inconsistent
configuration data in the system repository. For example, this happens when
there are multiple existing configurations with the concerning ID.@Deprecated public boolean removeRepositoryConfig(String repositoryID) throws RepositoryException, RepositoryConfigException
RepositoryManagerremoveRepositoryConfig in class RepositoryManagerrepositoryID - The ID of the repository whose configuration needs to be removed.RepositoryException - If the manager failed to update it's system repository.RepositoryConfigException - If the manager doesn't know how to remove a configuration due to inconsistent
configuration data in the system repository. For example, this happens when
there are multiple existing configurations with the concerning ID.public Repository getRepository(String id) throws RepositoryConfigException, RepositoryException
RepositoryManagergetRepository in interface RepositoryResolvergetRepository in class RepositoryManagerid - A repository ID.RepositoryConfigException - If no repository could be created due to invalid or incomplete configuration
data.RepositoryExceptionpublic Set<String> getInitializedRepositoryIDs()
RepositoryManagergetInitializedRepositoryIDs in class RepositoryManagerRepositoryManager.getRepositoryIDs()public Collection<Repository> getInitializedRepositories()
RepositoryManagergetInitializedRepositories in class RepositoryManagerRepositoryManager.getAllRepositories()protected Repository createRepository(String id) throws RepositoryConfigException, RepositoryException
RepositoryManagercreateRepository in class RepositoryManagerid - A repository ID.RepositoryConfigException - If no repository could be created due to invalid or incomplete configuration
data.RepositoryException - If the repository could not be initialized.public Collection<RepositoryInfo> getAllRepositoryInfos(boolean skipSystemRepo) throws RepositoryException
getAllRepositoryInfos in class RepositoryManagerRepositoryException - When not able to retrieve existing configurationspublic RepositoryInfo getRepositoryInfo(String id) throws RepositoryException
RepositoryManagergetRepositoryInfo in class RepositoryManagerid - A repository ID.RepositoryException - When not able to retrieve existing configurationspublic void refresh()
RepositoryManagerrefresh in class RepositoryManagerRepositoryManager.shutDown()public void shutDown()
RepositoryManagershutDown in class RepositoryManagerRepositoryManager.refresh()protected void cleanUpRepository(String repositoryID) throws IOException
RepositoryManagercleanUpRepository in class RepositoryManagerrepositoryID - the ID of the repository to clean upIOExceptionprotected boolean isCorrectType(String repositoryID) throws RepositoryConfigException, RepositoryException
protected boolean isCorrectType(RepositoryConfig repositoryConfig)
Copyright © 2015-2022 Eclipse Foundation. All Rights Reserved.