Class ArtifactHandler
java.lang.Object
org.apache.sling.feature.io.artifacts.ArtifactHandler
A handler provides a file object for an artifact.
-
Constructor Summary
ConstructorsConstructorDescriptionArtifactHandler
(File file) Create a new handler.ArtifactHandler
(String url, URL localURL) Create a new handler.ArtifactHandler
(Path file) Create a new handler. -
Method Summary
Modifier and TypeMethodDescriptionGet a local url for the artifactgetUrl()
Get the url of the artifact
-
Constructor Details
-
ArtifactHandler
Create a new handler.- Parameters:
url
- The url of the artifactlocalURL
- The local URL for the artifact
-
ArtifactHandler
Create a new handler.- Parameters:
file
- The file for the artifact- Throws:
MalformedURLException
- If the file name cannot be converted to a URL.- Since:
- 1.1.0
-
ArtifactHandler
Create a new handler.- Parameters:
file
- The file for the artifact- Throws:
MalformedURLException
- If the file name cannot be converted to a URL.- Since:
- 1.2.0
-
-
Method Details
-
getUrl
Get the url of the artifact- Returns:
- The url.
-
getLocalURL
Get a local url for the artifact- Returns:
- The file
-