public class Extension extends Object
ExtensionType| Modifier and Type | Field and Description |
|---|---|
static String |
EXTENSION_NAME_ASSEMBLED_FEATURES
Extension name containing the assembled features as produced by
FeatureBuilder.assemble(ArtifactId, BuilderContext, Feature...). |
static String |
EXTENSION_NAME_CONTENT_PACKAGES
Common extension name to specify the content packages for Apache Sling.
|
static String |
EXTENSION_NAME_REPOINIT
Common extension name to specify the repoinit part for Apache Sling.
|
| Constructor and Description |
|---|
Extension(ExtensionType t,
String name,
boolean required)
Create a new extension
|
| Modifier and Type | Method and Description |
|---|---|
Extension |
copy()
Create a copy of the Extension
|
boolean |
equals(Object obj) |
Artifacts |
getArtifacts()
Get the artifacts of the extension
|
String |
getJSON()
Get the JSON of the extension
|
String |
getName()
Get the extension name
|
String |
getText()
Get the text of the extension
|
ExtensionType |
getType()
Get the extension type
|
int |
hashCode() |
boolean |
isOptional()
Return whether the extension is required or optional
|
boolean |
isRequired()
Return whether the extension is required or optional
|
void |
setJSON(String text)
Set the JSON of the extension
|
void |
setText(String text)
Set the text of the extension
|
String |
toString() |
public static final String EXTENSION_NAME_REPOINIT
ExtensionType.TEXT and is required.public static final String EXTENSION_NAME_CONTENT_PACKAGES
ExtensionType.ARTIFACTS and is required.public static final String EXTENSION_NAME_ASSEMBLED_FEATURES
FeatureBuilder.assemble(ArtifactId, BuilderContext, Feature...).
This extension is of type ExtensionType.ARTIFACTS and is optional.public Extension(ExtensionType t, String name, boolean required)
t - The type of the extensionname - The name of the extensionrequired - Whether the extension is required or optionalIllegalArgumentException - If name or t are nullpublic ExtensionType getType()
public String getName()
public boolean isRequired()
true if the extension is required.public boolean isOptional()
true if the extension is optional.public String getText()
IllegalStateException - if the type is not ExtensionType#TEXTpublic void setText(String text)
text - The textIllegalStateException - if the type is not ExtensionType#TEXTpublic String getJSON()
IllegalStateException - if the type is not ExtensionType#JSONpublic void setJSON(String text)
text - The JSONIllegalStateException - if the type is not ExtensionType#JSONpublic Artifacts getArtifacts()
IllegalStateException - if the type is not ExtensionType#ARTIFACTSpublic Extension copy()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.