Class ArtifactHandler
- java.lang.Object
-
- org.apache.sling.feature.io.artifacts.ArtifactHandler
-
public class ArtifactHandler extends Object
A handler provides a file object for an artifact.
-
-
Constructor Summary
Constructors Constructor Description ArtifactHandler(File file)
Create a new handler.ArtifactHandler(String url, URL localURL)
Create a new handler.ArtifactHandler(Path file)
Create a new handler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description URL
getLocalURL()
Get a local url for the artifactString
getUrl()
Get the url of the artifact
-
-
-
Constructor Detail
-
ArtifactHandler
public ArtifactHandler(String url, URL localURL)
Create a new handler.- Parameters:
url
- The url of the artifactlocalURL
- The local URL for the artifact
-
ArtifactHandler
public ArtifactHandler(File file) throws MalformedURLException
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
public ArtifactHandler(Path file) throws MalformedURLException
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
-
-