Package org.apache.sling.feature.scanner
Class ContainerDescriptor
- java.lang.Object
-
- org.apache.sling.feature.scanner.Descriptor
-
- org.apache.sling.feature.scanner.ContainerDescriptor
-
- Direct Known Subclasses:
FeatureDescriptor
public abstract class ContainerDescriptor extends Descriptor
Information about a container (feature). This is the aggregated information. 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
ContainerDescriptor(String name)
Constructor for a new descriptor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<ArtifactDescriptor>
getArtifactDescriptors()
Return a set of artifact descriptors The requirements and capabilities of the returned artifacts are available as an aggregate fromDescriptor.getCapabilities()
,Descriptor.getRequirements()
.Set<BundleDescriptor>
getBundleDescriptors()
Return a set of bundle descriptors.void
lock()
Lock the descriptor.-
Methods inherited from class org.apache.sling.feature.scanner.Descriptor
aggregate, checkLocked, getCapabilities, getDynamicImportedPackages, getExportedPackages, getImportedPackages, getName, getRequirements, isLocked, toString
-
-
-
-
Constructor Detail
-
ContainerDescriptor
protected ContainerDescriptor(String name)
Constructor for a new descriptor- Parameters:
name
- The name
-
-
Method Detail
-
getBundleDescriptors
public final Set<BundleDescriptor> getBundleDescriptors()
Return a set of bundle descriptors. The requirements and capabilities of the returned bundles are available as an aggregate fromDescriptor.getCapabilities()
,Descriptor.getRequirements()
,Descriptor.getDynamicImportedPackages()
Descriptor.getExportedPackages()
andDescriptor.getImportedPackages()
- Returns:
- The set of bundle descriptors (might be empty)
-
getArtifactDescriptors
public final Set<ArtifactDescriptor> getArtifactDescriptors()
Return a set of artifact descriptors The requirements and capabilities of the returned artifacts are available as an aggregate fromDescriptor.getCapabilities()
,Descriptor.getRequirements()
.- Returns:
- The set of artifact descriptors (might be empty)
-
lock
public void lock()
Description copied from class:Descriptor
Lock the descriptor. Once invoked no changes can be made to the descriptor.- Overrides:
lock
in classDescriptor
-
-