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 Details

    • ArtifactHandler

      public ArtifactHandler(String url, URL localURL)
      Create a new handler.
      Parameters:
      url - The url of the artifact
      localURL - 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
  • Method Details

    • getUrl

      public String getUrl()
      Get the url of the artifact
      Returns:
      The url.
    • getLocalURL

      public URL getLocalURL()
      Get a local url for the artifact
      Returns:
      The file