@Service(value="mavenRepositoryProvider") public class MavenRepositoryProvider extends Object implements RepositoryProvider
Constructor and Description |
---|
MavenRepositoryProvider() |
Modifier and Type | Method and Description |
---|---|
ManagedRepository |
createManagedInstance(ManagedRepositoryConfiguration cfg)
Creates a new managed repository instance from the given configuration.
|
MavenManagedRepository |
createManagedInstance(String id,
String name)
Creates a editable managed repository instance.
|
MavenManagedRepository |
createManagedInstance(String id,
String name,
Path baseDir) |
RemoteRepository |
createRemoteInstance(RemoteRepositoryConfiguration cfg)
Creates a new remote repository instance from the given configuration.
|
MavenRemoteRepository |
createRemoteInstance(String id,
String name)
Creates a editable remote repository instance.
|
MavenRemoteRepository |
createRemoteInstance(String id,
String name,
Path baseDir) |
RepositoryGroup |
createRepositoryGroup(RepositoryGroupConfiguration configuration)
Creates a new repository group instance from the given configuration.
|
EditableRepositoryGroup |
createRepositoryGroup(String id,
String name)
Creates a editable repository group. .
|
MavenRepositoryGroup |
createRepositoryGroup(String id,
String name,
Path baseDir) |
ManagedRepository |
createStagingInstance(ManagedRepositoryConfiguration baseConfiguration)
Creates a new managed staging repository instance from the given configuration.
|
ArchivaConfiguration |
getArchivaConfiguration() |
ManagedRepositoryConfiguration |
getManagedConfiguration(ManagedRepository managedRepository)
Returns a configuration object from the given managed repository instance.
|
RemoteRepositoryConfiguration |
getRemoteConfiguration(RemoteRepository remoteRepository)
Returns a configuration object from the given remote repository instance.
|
RepositoryGroupConfiguration |
getRepositoryGroupConfiguration(RepositoryGroup repositoryGroup)
Returns a configuration object from the given repository group instance.
|
void |
handle(Event event) |
Set<RepositoryType> |
provides()
Returns the types of repositories this provider can handle.
|
void |
setArchivaConfiguration(ArchivaConfiguration archivaConfiguration) |
void |
updateManagedInstance(EditableManagedRepository repo,
ManagedRepositoryConfiguration cfg)
Updates the given managed repository instance from the given configuration.
|
void |
updateRemoteInstance(EditableRemoteRepository repo,
RemoteRepositoryConfiguration cfg)
Updates the given remote repository instance from the given configuration.
|
void |
updateRepositoryGroupInstance(EditableRepositoryGroup repositoryGroup,
RepositoryGroupConfiguration configuration)
Updates the given remote repository instance from the given configuration.
|
public MavenRepositoryProvider()
public Set<RepositoryType> provides()
RepositoryProvider
provides
in interface RepositoryProvider
public MavenManagedRepository createManagedInstance(String id, String name)
RepositoryProvider
createManagedInstance
in interface RepositoryProvider
id
- the repository identifiername
- the repository namepublic MavenManagedRepository createManagedInstance(String id, String name, Path baseDir)
public MavenRemoteRepository createRemoteInstance(String id, String name)
RepositoryProvider
createRemoteInstance
in interface RepositoryProvider
id
- the repository identifiername
- the repository namepublic MavenRemoteRepository createRemoteInstance(String id, String name, Path baseDir)
public EditableRepositoryGroup createRepositoryGroup(String id, String name)
RepositoryProvider
createRepositoryGroup
in interface RepositoryProvider
id
- the repository identifiername
- the repository namepublic MavenRepositoryGroup createRepositoryGroup(String id, String name, Path baseDir)
public ManagedRepository createManagedInstance(ManagedRepositoryConfiguration cfg) throws RepositoryException
RepositoryProvider
createManagedInstance
in interface RepositoryProvider
cfg
- the repository configuration that contains the repository dataRepositoryException
- if some of the configuration values are not validpublic void updateManagedInstance(EditableManagedRepository repo, ManagedRepositoryConfiguration cfg) throws RepositoryException
RepositoryProvider
updateManagedInstance
in interface RepositoryProvider
repo
- the repository instance that should be updatedcfg
- the repository configuration that contains the repository dataRepositoryException
- if some of the configuration values are not validpublic ManagedRepository createStagingInstance(ManagedRepositoryConfiguration baseConfiguration) throws RepositoryException
RepositoryProvider
createStagingInstance
in interface RepositoryProvider
baseConfiguration
- the repository configuration of the base repository that references the staging repositoryRepositoryException
- if some of the configuration values are not validpublic RemoteRepository createRemoteInstance(RemoteRepositoryConfiguration cfg) throws RepositoryException
RepositoryProvider
createRemoteInstance
in interface RepositoryProvider
cfg
- the repository configuration that contains the repository dataRepositoryException
- if some of the configuration values are not validpublic void updateRemoteInstance(EditableRemoteRepository repo, RemoteRepositoryConfiguration cfg) throws RepositoryException
RepositoryProvider
updateRemoteInstance
in interface RepositoryProvider
repo
- the repository instance that should be updatedcfg
- the repository configuration that contains the repository dataRepositoryException
- if some of the configuration values are not validpublic RepositoryGroup createRepositoryGroup(RepositoryGroupConfiguration configuration) throws RepositoryException
RepositoryProvider
createRepositoryGroup
in interface RepositoryProvider
configuration
- the repository group configurationRepositoryException
- if some of the configuration values are not validpublic void updateRepositoryGroupInstance(EditableRepositoryGroup repositoryGroup, RepositoryGroupConfiguration configuration) throws RepositoryException
RepositoryProvider
updateRepositoryGroupInstance
in interface RepositoryProvider
repositoryGroup
- the repository group instance that should be updatedconfiguration
- the repository group configuration that contains the group dataRepositoryException
- if some of the configuration values are not validpublic RemoteRepositoryConfiguration getRemoteConfiguration(RemoteRepository remoteRepository) throws RepositoryException
RepositoryProvider
getRemoteConfiguration
in interface RepositoryProvider
remoteRepository
- the remote repository instanceRepositoryException
- if the data cannot be convertedpublic ManagedRepositoryConfiguration getManagedConfiguration(ManagedRepository managedRepository) throws RepositoryException
RepositoryProvider
getManagedConfiguration
in interface RepositoryProvider
managedRepository
- the managed repository instanceRepositoryException
- if the data cannot be convertedpublic RepositoryGroupConfiguration getRepositoryGroupConfiguration(RepositoryGroup repositoryGroup) throws RepositoryException
RepositoryProvider
getRepositoryGroupConfiguration
in interface RepositoryProvider
repositoryGroup
- the repository groupRepositoryException
- if the data cannot be convertedpublic ArchivaConfiguration getArchivaConfiguration()
public void setArchivaConfiguration(ArchivaConfiguration archivaConfiguration)
public void handle(Event event)
handle
in interface EventHandler
Copyright © 2006–2019 The Apache Software Foundation. All rights reserved.