Class ContentPackageDescriptor
- java.lang.Object
-
- org.apache.sling.feature.scanner.Descriptor
-
- org.apache.sling.feature.scanner.ArtifactDescriptor
-
- org.apache.sling.feature.scanner.impl.ContentPackageDescriptor
-
public class ContentPackageDescriptor extends ArtifactDescriptor
Information about a content package.
-
-
Field Summary
Fields Modifier and Type Field Description List<BundleDescriptor>bundlesBundles in the content package.List<org.apache.sling.feature.Configuration>configsConfigurations in the content package.static StringMETADATA_PACKAGEThe metadata added to bundles and configurations for the package they are in.static StringMETADATA_PATHThe metadata added to bundles and configurations for the path in the package
-
Constructor Summary
Constructors Constructor Description ContentPackageDescriptor(String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.sling.feature.ArtifactgetArtifact()Get the artifactURLgetArtifactFile()Get the artifact fileorg.apache.sling.feature.ArtifactgetContentPackage()Get the content packageStringgetContentPath()Get the content pathStringgetName()Returns the name of the entity associated with this descriptor.booleanhasEmbeddedArtifacts()booleanisEmbeddedInContentPackage()Whether this artifact is embedded in a content packagevoidsetArtifact(org.apache.sling.feature.Artifact artifact)Set the artifactvoidsetArtifactFile(URL artifactFile)Set the artifact filevoidsetContentPackageInfo(org.apache.sling.feature.Artifact artifact, String path)Set the information about the content package containing this artifactvoidsetName(String value)StringtoString()-
Methods inherited from class org.apache.sling.feature.scanner.Descriptor
aggregate, checkLocked, getCapabilities, getDynamicImportedPackages, getExportedPackages, getImportedPackages, getRequirements, isLocked, lock
-
-
-
-
Field Detail
-
METADATA_PACKAGE
public static final String METADATA_PACKAGE
The metadata added to bundles and configurations for the package they are in.- See Also:
- Constant Field Values
-
METADATA_PATH
public static final String METADATA_PATH
The metadata added to bundles and configurations for the path in the package- See Also:
- Constant Field Values
-
bundles
public final List<BundleDescriptor> bundles
Bundles in the content package.
-
configs
public final List<org.apache.sling.feature.Configuration> configs
Configurations in the content package.
-
-
Constructor Detail
-
ContentPackageDescriptor
public ContentPackageDescriptor(String name)
-
-
Method Detail
-
getArtifactFile
public URL getArtifactFile()
Get the artifact file- Specified by:
getArtifactFilein classArtifactDescriptor- Returns:
- The artifact file
-
getArtifact
public org.apache.sling.feature.Artifact getArtifact()
Get the artifact- Specified by:
getArtifactin classArtifactDescriptor- Returns:
- The artifact
-
setArtifact
public void setArtifact(org.apache.sling.feature.Artifact artifact)
Set the artifact- Parameters:
artifact- The artifact
-
setArtifactFile
public void setArtifactFile(URL artifactFile)
Set the artifact file- Parameters:
artifactFile- The artifact file
-
getContentPackage
public org.apache.sling.feature.Artifact getContentPackage()
Get the content package- Returns:
- The content package or
null
-
getContentPath
public String getContentPath()
Get the content path- Returns:
- The content path or
null
-
isEmbeddedInContentPackage
public boolean isEmbeddedInContentPackage()
Whether this artifact is embedded in a content package- Returns:
trueif embedded.
-
setContentPackageInfo
public void setContentPackageInfo(org.apache.sling.feature.Artifact artifact, String path)Set the information about the content package containing this artifact- Parameters:
artifact- The packagepath- The path inside the package
-
getName
public String getName()
Description copied from class:DescriptorReturns the name of the entity associated with this descriptor.- Overrides:
getNamein classDescriptor- Returns:
- the name.
-
setName
public void setName(String value)
-
hasEmbeddedArtifacts
public boolean hasEmbeddedArtifacts()
-
toString
public String toString()
- Overrides:
toStringin classDescriptor
-
-