Top Description Methods
org.osgi.service.feature

public Interface FeatureBuilder

Annotations
@ProviderType
Imports
java.util.Map, org.osgi.annotation.versioning.ProviderType

A builder for Feature Models.

Method Summary

Modifier and TypeMethod and Description
public FeatureBuilder

Returns:

This builder.
addBundles
(FeatureBundle...
The Bundles to add.
bundles
)

Add Bundles to the Feature.

public FeatureBuilder

Returns:

This builder.
addCategories
(String...
The Categories.
categories
)

Adds one or more categories to the Feature.

public FeatureBuilder

Returns:

This builder.
addConfigurations
(FeatureConfiguration...
The Configurations to add.
configs
)

Add Configurations to the Feature.

public FeatureBuilder

Returns:

This builder.
addExtensions
(FeatureExtension...
The Extensions to add.
extensions
)

Add Extensions to the Feature

public FeatureBuilder

Returns:

This builder.
addVariable
(String
The key.
key
,
Object
The default value.
defaultValue
)

Add a variable to the Feature.

public FeatureBuilder

Returns:

This builder.
addVariables
(Map<String, Object>
to be added.
variables
)

Add a map of variables to the Feature.

public Feature

Returns:

The Feature.
build
()

Build the Feature.

public FeatureBuilder

Returns:

This builder.
setComplete
(boolean
If the feature is complete.
complete
)

Set the Feature Complete flag.

public FeatureBuilder

Returns:

This builder.
setDescription
(String
The description.
description
)

Set the Feature Description.

public FeatureBuilder

Returns:

This builder.
setDocURL
(String
The Documentation URL.
docURL
)

Set the documentation URL.

public FeatureBuilder

Returns:

This builder.
setLicense
(String
The License.
license
)

Set the License.

public FeatureBuilder

Returns:

This builder.
setName
(String
The Name.
name
)

Set the Feature Name.

public FeatureBuilder

Returns:

This builder.
setSCM
(String
The SCM information.
scm
)

Set the SCM information.

public FeatureBuilder

Returns:

This builder.
setVendor
(String
The Vendor.
vendor
)

Set the Vendor.

Method Detail

addBundlesback to summary
public FeatureBuilder addBundles(FeatureBundle... bundles)

Add Bundles to the Feature.

Parameters
bundles:FeatureBundle[]

The Bundles to add.

Returns:FeatureBuilder

This builder.

addCategoriesback to summary
public FeatureBuilder addCategories(String... categories)

Adds one or more categories to the Feature.

Parameters
categories:String[]

The Categories.

Returns:FeatureBuilder

This builder.

addConfigurationsback to summary
public FeatureBuilder addConfigurations(FeatureConfiguration... configs)

Add Configurations to the Feature.

Parameters
configs:FeatureConfiguration[]

The Configurations to add.

Returns:FeatureBuilder

This builder.

addExtensionsback to summary
public FeatureBuilder addExtensions(FeatureExtension... extensions)

Add Extensions to the Feature

Parameters
extensions:FeatureExtension[]

The Extensions to add.

Returns:FeatureBuilder

This builder.

addVariableback to summary
public FeatureBuilder addVariable(String key, Object defaultValue)

Add a variable to the Feature. If a variable with the specified key already exists it is replaced with this one. Variable values are of type: String, Boolean or BigDecimal for numbers.

Parameters
key:String

The key.

defaultValue:Object

The default value.

Returns:FeatureBuilder

This builder.

Exceptions
IllegalArgumentException:
if the value is of an invalid type.
addVariablesback to summary
public FeatureBuilder addVariables(Map<String, Object> variables)

Add a map of variables to the Feature. Pre-existing variables with the same key in are overwritten if these keys exist in the map. Variable values are of type: String, Boolean or BigDecimal for numbers.

Parameters
variables:Map<String, Object>

to be added.

Returns:FeatureBuilder

This builder.

Exceptions
IllegalArgumentException:
if a value is of an invalid type.
buildback to summary
public Feature build()

Build the Feature. Can only be called once on a builder. After calling this method the current builder instance cannot be used any more.

Returns:Feature

The Feature.

setCompleteback to summary
public FeatureBuilder setComplete(boolean complete)

Set the Feature Complete flag. If this method is not called the complete flag defaults to false.

Parameters
complete:boolean

If the feature is complete.

Returns:FeatureBuilder

This builder.

setDescriptionback to summary
public FeatureBuilder setDescription(String description)

Set the Feature Description.

Parameters
description:String

The description.

Returns:FeatureBuilder

This builder.

setDocURLback to summary
public FeatureBuilder setDocURL(String docURL)

Set the documentation URL.

Parameters
docURL:String

The Documentation URL.

Returns:FeatureBuilder

This builder.

setLicenseback to summary
public FeatureBuilder setLicense(String license)

Set the License.

Parameters
license:String

The License.

Returns:FeatureBuilder

This builder.

setNameback to summary
public FeatureBuilder setName(String name)

Set the Feature Name.

Parameters
name:String

The Name.

Returns:FeatureBuilder

This builder.

setSCMback to summary
public FeatureBuilder setSCM(String scm)

Set the SCM information.

Parameters
scm:String

The SCM information.

Returns:FeatureBuilder

This builder.

setVendorback to summary
public FeatureBuilder setVendor(String vendor)

Set the Vendor.

Parameters
vendor:String

The Vendor.

Returns:FeatureBuilder

This builder.