-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add create/load/refereshRepository() methods to IRepositoryManager #311
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only think I can think of is that a repository manager not necessarily must support creation/loading/ of repositories and these must not necessarily even be URI based...
Also I wonder if this can be used in P2 anywhere directly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems fine.
At least at the moment there are only two sub-interfaces, which both do support it and override these methods.
I checked it and indeed there are many places and I added another commit to use the new methods. It also unifies the behavior if a repository manager of specific type cannot be found in The little difficulty is that the generic A review of the changes in the third commit would be more than welcome. |
64e67a0
to
2ed4e1d
Compare
// remove the repo first. | ||
mgr.removeRepository(toInit.getRepoLocation()); | ||
|
||
// first try and load to see if one already exists at that location. | ||
try { | ||
IMetadataRepository repository = mgr.loadRepository(toInit.getRepoLocation(), null); | ||
if (!validRepositoryLocation(repository) && initDestinationRepository(repository, toInit)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
validRepositoryLocation()
either returned true or threw an exception.
Therefore initDestinationRepository()
was never called for a metadata repository.
8819fc7
to
6d3bd85
Compare
6d3bd85
to
9d09201
Compare
@HannesWell can we merge this one? |
9d09201
to
8796f60
Compare
Add the following methods to the super interface IRepositoryManager, which both existing sub-interfaces IArtifactRepositoryManager and IMetadataRepositoryManager covariantly override: - createRepository() - loadRepository() - refreshRepository() This allows more general usage of the IRepositoryManager interface
This also unifies the behavior if a repository manager of specific type cannot be found in ProvisioningHelper.
8796f60
to
e3bce54
Compare
Add the following methods to the super interface
IRepositoryManager
, which both existing sub-interfacesIArtifactRepositoryManager
andIMetadataRepositoryManager
covariantly override:createRepository()
loadRepository()
refreshRepository()
This allows more general usage of the
IRepositoryManager
interface, for example in Tycho.Furthermore (in the first of the two commits), apply a few minor doc unifications and clean-ups in all RepositoryManager interfaces.