public class MavenRepositoryChartResolver extends AbstractChartResolver
AbstractChartResolver capable of resolving Helm charts
from Maven repositories.resolve(String, String)| Constructor and Description |
|---|
MavenRepositoryChartResolver(RepositorySystem repositorySystem,
RepositorySystemSession session,
List<RemoteRepository> remoteRepositories)
Creates a new
MavenRepositoryChartResolver. |
| Modifier and Type | Method and Description |
|---|---|
List<RemoteRepository> |
getRemoteRepositories()
Returns the
List of RemoteRepository instances
from which resolution will be attempted. |
RepositorySystem |
getRepositorySystem()
Returns the
RepositorySystem responsible for performing the
actual resolution. |
RepositorySystemSession |
getSession()
Returns the
RepositorySystemSession governing resolution. |
protected ChartOuterClass.Chart.Builder |
loadChart(File chartFile,
String packaging)
Returns a
ChartOuterClass.Chart.Builder
representing the Helm chart contained by the supplied regular File. |
ChartOuterClass.Chart.Builder |
resolve(Artifact chart)
Creates and returns a
ChartOuterClass.Chart.Builder representing a Helm
chart resolvable at the Maven repository coordinates represented
by the supplied Artifact. |
ChartOuterClass.Chart.Builder |
resolve(String coordinatesWithoutVersion,
String chartVersion)
Creates and returns a
ChartOuterClass.Chart.Builder representing a Helm
chart resolvable at the given Maven repository coordinates. |
public MavenRepositoryChartResolver(RepositorySystem repositorySystem, RepositorySystemSession session, List<RemoteRepository> remoteRepositories)
MavenRepositoryChartResolver.repositorySystem - the RepositorySystem responsible
for performing the actual resolution; must not be nullrepositorySystemSession - the RepositorySystemSession governing artifact resolution; must not
be nullremoteRepositories - a List of RemoteRepository instances from which resolution will be
attempted; may be nullNullPointerException - if repositorySystem or
session is nullgetRepositorySystem(),
getSession(),
getRemoteRepositories()public RepositorySystem getRepositorySystem()
RepositorySystem responsible for performing the
actual resolution.
This method never returns null.
Overrides of this method must not return null.
RepositorySystem responsible for performing the
actual resolution; never nullMavenRepositoryChartResolver(RepositorySystem,
RepositorySystemSession, List)public RepositorySystemSession getSession()
RepositorySystemSession governing resolution.
This method never returns null.
Overrides of this method must not return null.
RepositorySystemSession governing resolution;
never nullMavenRepositoryChartResolver(RepositorySystem,
RepositorySystemSession, List)public List<RemoteRepository> getRemoteRepositories()
List of RemoteRepository instances
from which resolution will be attempted.
This method may return null.
Overrides of this method are permitted to return null.
List of RemoteRepository instances
from which resolution will be attempted, or nullMavenRepositoryChartResolver(RepositorySystem,
RepositorySystemSession, List)public final ChartOuterClass.Chart.Builder resolve(String coordinatesWithoutVersion, String chartVersion) throws ChartResolverException
ChartOuterClass.Chart.Builder representing a Helm
chart resolvable at the given Maven repository coordinates.resolve in class AbstractChartResolvercoordinatesWithoutVersion - a String of one of the
following forms: groupId:artifactId, groupId:artifactId:packaging, or groupId:artifactId:packaging:classifier; must not be nullchartVersion - the version of the Helm chart artifact to
resolve; may be null in which case LATEST will be
used insteadnull ChartOuterClass.Chart.BuilderNullPointerException - if coordinatesWithoutVersion is nullChartResolverException - if coordinatesWithoutVersion is malformed, if either the getRepositorySystem() or getSession() method returns
null, if an ArtifactResolutionException was
encountered during artifact resolution, or if the loadChart(File, String) method throws a ChartResolverExceptionresolve(Artifact),
loadChart(File, String)public ChartOuterClass.Chart.Builder resolve(Artifact chart) throws ChartResolverException
ChartOuterClass.Chart.Builder representing a Helm
chart resolvable at the Maven repository coordinates represented
by the supplied Artifact.
This method never returns null.
Overrides of this method must not return null.
chart - the Artifact representing the Helm chart to
resolve; must not be nullnull ChartOuterClass.Chart.BuilderNullPointerException - if chart is nullChartResolverException - if either the getRepositorySystem() or getSession() method returns
null, if an ArtifactResolutionException was
encountered during artifact resolution, or if the loadChart(File, String) method throws a ChartResolverExceptionloadChart(File, String)protected ChartOuterClass.Chart.Builder loadChart(File chartFile, String packaging) throws ChartResolverException
ChartOuterClass.Chart.Builder
representing the Helm chart contained by the supplied regular File.
This method never returns null.
Overrides of this method must not return null.
This implementation will return a ChartOuterClass.Chart.Builder provided that the
supplied File is either a GZIP-encoded tape archive or a
ZIP archive. Overrides should feel free to expand these
capabilities.
chartFile - the File containing a Helm chart; must
not be nullpackaging - the kind of archive or other packaging mechanism
that the supplied chartFile value is; must not be null; examples include tgz, tar.gz, zip
and the like; overrides of this method may use this parameter to
help in determining how to read the supplied chartFilenull ChartOuterClass.Chart.Builder, usually but not
necessarily as produced by an AbstractChartLoader
implementationNullPointerException - if chartFile or packaging is nullChartResolverException - if the chart could not be
loaded for any reasonresolve(String, String)Copyright © 2017–2017, microBean. All rights reserved.