Package org.osgi.service.feature
Interface FeatureExtension
-
@ProviderType public interface FeatureExtension
A Feature Model Extension. Extensions can contain either Text, JSON or a list of Artifacts.Extensions are of one of the following kinds:
- Mandatory: this extension must be processed by the runtime
- Optional: this extension does not have to be processed by the runtime
- Transient: this extension contains transient information such as caching data that is for optimization purposes. It may be changed or removed and is not part of the feature's identity.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
FeatureExtension.Kind
The kind of extension: optional, mandatory or transient.static class
FeatureExtension.Type
The type of extension
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<FeatureArtifact>
getArtifacts()
Get the Artifacts from this extension.java.lang.String
getJSON()
Get the JSON from this extension.FeatureExtension.Kind
getKind()
Get the extension kind.java.lang.String
getName()
Get the extension name.java.util.List<java.lang.String>
getText()
Get the Text from this extension.FeatureExtension.Type
getType()
Get the extension type.
-
-
-
Method Detail
-
getName
java.lang.String getName()
Get the extension name.- Returns:
- The name.
-
getType
FeatureExtension.Type getType()
Get the extension type.- Returns:
- The type.
-
getKind
FeatureExtension.Kind getKind()
Get the extension kind.- Returns:
- The kind.
-
getJSON
java.lang.String getJSON()
Get the JSON from this extension.- Returns:
- The JSON.
- Throws:
java.lang.IllegalStateException
- If called on an extension which is not of type JSON.
-
getText
java.util.List<java.lang.String> getText()
Get the Text from this extension.- Returns:
- The lines of text. The returned list is unmodifiable.
- Throws:
java.lang.IllegalStateException
- If called on an extension which is not of type TEXT.
-
getArtifacts
java.util.List<FeatureArtifact> getArtifacts()
Get the Artifacts from this extension.- Returns:
- The Artifacts. The returned list is unmodifiable.
- Throws:
java.lang.IllegalStateException
- If called on an extension which is not of type ARTIFACTS.
-
-