@Service(value="repositoryContentProvider#maven") public class MavenContentProvider extends Object implements RepositoryContentProvider
Modifier and Type | Field and Description |
---|---|
protected List<? extends ArtifactMappingProvider> |
artifactMappingProviders |
Constructor and Description |
---|
MavenContentProvider() |
Modifier and Type | Method and Description |
---|---|
<T extends RepositoryContent,V extends Repository> |
createContent(Class<T> clazz,
V repository)
Creates a generic content object.
|
ManagedRepositoryContent |
createManagedContent(ManagedRepository repository)
Creates a new instance of ManagedRepositoryContent.
|
RemoteRepositoryContent |
createRemoteContent(RemoteRepository repository)
Creates a new instance of RemoteRepositoryContent.
|
Set<RepositoryType> |
getSupportedRepositoryTypes()
Returns the repository types, this content object can be used for.
|
boolean |
supports(RepositoryType type)
Returns true, if this content object supports the given repository type.
|
boolean |
supportsLayout(String layout)
Returns true, if this content object supports the given layout otherwise, false.
|
@Inject protected List<? extends ArtifactMappingProvider> artifactMappingProviders
public MavenContentProvider()
public boolean supportsLayout(String layout)
RepositoryContentProvider
supportsLayout
in interface RepositoryContentProvider
layout
- the layout stringpublic Set<RepositoryType> getSupportedRepositoryTypes()
RepositoryContentProvider
getSupportedRepositoryTypes
in interface RepositoryContentProvider
public boolean supports(RepositoryType type)
RepositoryContentProvider
supports
in interface RepositoryContentProvider
type
- the type to check.public RemoteRepositoryContent createRemoteContent(RemoteRepository repository) throws RepositoryException
RepositoryContentProvider
createRemoteContent
in interface RepositoryContentProvider
repository
- the repositoryRepositoryException
- if the layout is not supported, or a error occured during initializationpublic ManagedRepositoryContent createManagedContent(ManagedRepository repository) throws RepositoryException
RepositoryContentProvider
createManagedContent
in interface RepositoryContentProvider
repository
- the repositoryRepositoryException
- if the layout is not supported, or a error occured during initializationpublic <T extends RepositoryContent,V extends Repository> T createContent(Class<T> clazz, V repository) throws RepositoryException
RepositoryContentProvider
createContent
in interface RepositoryContentProvider
T
- the generic type of the contentV
- the generic type of the repository (must correspond to the content class)clazz
- the content classrepository
- the repositoryRepositoryException
- if the clazz, or layout is not supported, or something went wrong during initializationCopyright © 2006–2019 The Apache Software Foundation. All rights reserved.