Interface ArtifactResolver
-
public interface ArtifactResolver
A resolver forArtifact
files. In order for it to be found by XL Deploy it should be annotated with the enclosedArtifactResolver.Resolver
annotation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
ArtifactResolver.Resolver
Denote which protocols theArtifactResolver
supports.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ResolvedArtifactFile
resolveLocation(com.xebialabs.deployit.plugin.api.udm.artifact.SourceArtifact artifact)
This method is only called with aSourceArtifact
that has aSourceArtifact.getFileUri()
URI that contains (one of) the URI schemes that theArtifactResolver.Resolver
annotation specifies.boolean
validateCorrectness(com.xebialabs.deployit.plugin.api.udm.artifact.SourceArtifact artifact)
Validate whether theSourceArtifact.getFileUri()
URI
is correct with regards to the scheme specific part of the defined scheme.
-
-
-
Method Detail
-
resolveLocation
ResolvedArtifactFile resolveLocation(com.xebialabs.deployit.plugin.api.udm.artifact.SourceArtifact artifact)
This method is only called with aSourceArtifact
that has aSourceArtifact.getFileUri()
URI that contains (one of) the URI schemes that theArtifactResolver.Resolver
annotation specifies.- Parameters:
artifact
- TheSourceArtifact
for which we need to resolve aResolvedArtifactFile
against itsSourceArtifact.getFileUri()
.- Returns:
- The
ResolvedArtifactFile
from which you can obtain theInputStream
. - Throws:
CannotLocateArtifactException
- when the file pointed to by the artifact could not be found at the indicated URI.
-
validateCorrectness
boolean validateCorrectness(com.xebialabs.deployit.plugin.api.udm.artifact.SourceArtifact artifact)
Validate whether theSourceArtifact.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 returnstrue
, that the location actually resolves to a file, or the file is present. It is implementation specific whether this is checked with this call.- Parameters:
artifact
- TheSourceArtifact
which needs to be validated with regards to itsSourceArtifact.getFileUri()
.- Returns:
true
iff theURI
has a valid scheme specific part, i.e. thisArtifactResolver
would be able to resolve it.
-
-