public class RepositoryManager extends Object
Constructor and Description |
---|
RepositoryManager()
Creates an instance of
RepositoryManager . |
Modifier and Type | Method and Description |
---|---|
void |
addDataProvider(DataProvider dataProvider)
Adds a
DataProvider |
void |
addListener(RepositoryManagerListener listener)
Adds a
RepositoryManagerListener . |
void |
addRepository(Repository repository)
Adds a new
Repository |
DataProvider |
getDataProvider(int index)
Returns the
DataProvider at the given index. |
DataProvider[] |
getDataProviders()
Returns an array of registered
DataProvider . |
int |
getNumDataProviders()
Retrieves the number of
DataProvider . |
int |
getNumRepositories()
Retrieves the number of repositories.
|
Repository[] |
getRepositories()
Returns an array of registered
Repository . |
Repository |
getRepository(int index)
Returns the
Repository at the given index. |
Repository |
getRepository(String baseDir)
Returns the
Repository with the given baseDir . |
void |
removeListener(RepositoryManagerListener listener)
Removes a
RepositoryManagerListener . |
void |
removeRepository(Repository repository)
Removes the given repository from the internal list of repositories.
|
void |
startUpdateRepository(Repository repository,
com.bc.ceres.core.ProgressMonitor pm,
Callback uiCallback)
This method starts an seperate thread.
|
void |
stopUpdateRepository()
This method stops the process started by a call to
startUpdateRepository(Repository, ProgressMonitor, Callback) startUpdateRepository()}. |
public RepositoryManager()
RepositoryManager
.public void addRepository(Repository repository)
Repository to the internal list of repositories.
repository
- the repository to be added.public void removeRepository(Repository repository)
repository
- the repository to be removed.public Repository getRepository(int index)
Repository
at the given index.index
- the index of the repository to return.public Repository getRepository(String baseDir)
Repository
with the given baseDir
.baseDir
- the baseDir
of the repository to return.baseDir
, or null
if not found.public int getNumRepositories()
public Repository[] getRepositories()
Repository
.public void addDataProvider(DataProvider dataProvider)
DataProvider.
dataProvider
- the DataProvider
to be added.public DataProvider getDataProvider(int index)
DataProvider
at the given index.index
- the index of the DataProvider
to return.DataProvider
at the given index.public int getNumDataProviders()
DataProvider
.DataProvider
.public DataProvider[] getDataProviders()
DataProvider
.DataProvider
, never nullpublic void addListener(RepositoryManagerListener listener)
RepositoryManagerListener
.listener
- the RepositoryManagerListener
to be added.public void removeListener(RepositoryManagerListener listener)
RepositoryManagerListener
.listener
- the RepositoryManagerListener
to be removed.public void startUpdateRepository(Repository repository, com.bc.ceres.core.ProgressMonitor pm, Callback uiCallback)
RepositoryEntry
of the given Repository
is
filled with data. A possibly running update process is stopped before the new one is started.repository
- the Repository
whose entries
are updated.pm
- a ProgressMonitor
to get informed about the progress.uiCallback
- a callback to handle ui updates.public void stopUpdateRepository()
startUpdateRepository(Repository, ProgressMonitor, Callback)
startUpdateRepository()}.
If no process is started the method has no effect.Copyright © 2002–2014 Brockmann Consult GmbH. All rights reserved.