public interface ArtifactResolver
Artifact
files. In order for it to be found by
XL Deploy it should be annotated with the enclosed ArtifactResolver.Resolver
annotation.Modifier and Type | Interface and Description |
---|---|
static interface |
ArtifactResolver.Resolver
Denote which protocols the
ArtifactResolver supports. |
Modifier and Type | Method and Description |
---|---|
ResolvedArtifactFile |
resolveLocation(com.xebialabs.deployit.plugin.api.udm.artifact.SourceArtifact artifact)
This method is only called with a
SourceArtifact that has a
SourceArtifact.getFileUri() URI that contains (one of) the URI schemes that the
ArtifactResolver.Resolver annotation specifies. |
boolean |
validateCorrectness(com.xebialabs.deployit.plugin.api.udm.artifact.SourceArtifact artifact)
Validate whether the
SourceArtifact.getFileUri() URI is correct with regards to the scheme specific part of the defined scheme. |
ResolvedArtifactFile resolveLocation(com.xebialabs.deployit.plugin.api.udm.artifact.SourceArtifact artifact)
SourceArtifact
that has a
SourceArtifact.getFileUri()
URI that contains (one of) the URI schemes that the
ArtifactResolver.Resolver
annotation specifies.artifact
- The SourceArtifact
for which we need to
resolve a ResolvedArtifactFile
against its SourceArtifact.getFileUri()
.ResolvedArtifactFile
from which you can obtain the InputStream
.CannotLocateArtifactException
- when the file pointed to by the artifact could not be found at the indicated URI.boolean validateCorrectness(com.xebialabs.deployit.plugin.api.udm.artifact.SourceArtifact artifact)
SourceArtifact.getFileUri()
URI
is correct with regards to the scheme specific part of the defined scheme.
Only the resolver that "knows about" this scheme is able to do this.
NOTE: There is no guarantee that when this method returns true, that the location actually resolves to a file, or the file is present. It is implementation specific whether this is checked with this call.
artifact
- The SourceArtifact
which needs to be
validated with regards to its SourceArtifact.getFileUri()
.trueiff the
URI
has a valid scheme specific part,
i.e. this ArtifactResolver
would be able to resolve it.