Package org.osgi.service.feature
Interface FeatureExtensionBuilder
-
@ProviderType public interface FeatureExtensionBuilder
A builder for Feature ModelFeatureExtension
objects.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description FeatureExtensionBuilder
addArtifact(FeatureArtifact artifact)
Add an Artifact to the extension.FeatureExtensionBuilder
addText(java.lang.String text)
Add a line of text to the extension.FeatureExtension
build()
Build the Extension.FeatureExtensionBuilder
setJSON(java.lang.String json)
Add JSON in String form to the extension.
-
-
-
Method Detail
-
addText
FeatureExtensionBuilder addText(java.lang.String text)
Add a line of text to the extension. Can only be called for extensions of typeFeatureExtension.Type.TEXT
.- Parameters:
text
- The text to be added.- Returns:
- This builder.
-
setJSON
FeatureExtensionBuilder setJSON(java.lang.String json)
Add JSON in String form to the extension. Can only be called for extensions of typeFeatureExtension.Type.JSON
.- Parameters:
json
- The JSON to be added.- Returns:
- This builder.
-
addArtifact
FeatureExtensionBuilder addArtifact(FeatureArtifact artifact)
Add an Artifact to the extension. Can only be called for extensions of typeFeatureExtension.Type.ARTIFACTS
.- Parameters:
artifact
- The artifact to add.- Returns:
- This builder.
-
build
FeatureExtension build()
Build the Extension. Can only be called once on a builder. After calling this method the current builder instance cannot be used any more.- Returns:
- The Extension.
-
-