Package org.apache.sling.feature.scanner

# Class ArtifactDescriptor

java.lang.Object
org.apache.sling.feature.scanner.Descriptor
org.apache.sling.feature.scanner.ArtifactDescriptor

Direct Known Subclasses:
  `BundleDescriptor`, `ContentPackageDescriptor`

public abstract class ArtifactDescriptor extends Descriptor
Information about an artifact. At a minimumm the descriptor returns the artifact. Note that this implementation is not synchronized. If multiple threads access a descriptor concurrently, and at least one of the threads modifies the descriptor structurally, it must be synchronized externally. However, once a descriptor is locked, it is safe to access it concurrently.

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`ArtifactDescriptor(String name)`
Constructor for a new descriptor

## Method Summary

Modifier and Type
Method
Description
`abstract org.apache.sling.feature.Artifact`
`getArtifact()`
Get the artifact
`abstract URL`
`getArtifactFile()`
Get the artifact file
`abstract Manifest`
`getManifest()`
If the artifact has a manifest, return it

### Methods inherited from class org.apache.sling.feature.scanner.Descriptor

`aggregate, checkLocked, getCapabilities, getCapabilities, getDynamicImportedPackages, getExportedPackages, getExportedPackages, getImportedPackages, getName, getRequirements, isLocked, lock, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### ArtifactDescriptor

protected ArtifactDescriptor(String name)
Constructor for a new descriptor

Parameters:
  `name` - The name
Throws:
  `IllegalArgumentException` - if name is `null`

## Method Details

### getManifest

public abstract Manifest getManifest()
If the artifact has a manifest, return it

Returns:
  The manifest or `null`
Since:
  2.2.0

### getArtifactFile

public abstract URL getArtifactFile()
Get the artifact file

Returns:
  The artifact URL or `null` if not present.

### getArtifact

public abstract org.apache.sling.feature.Artifact getArtifact()
Get the artifact

Returns:
  The artifact