Package org.apache.camel.k.catalog.model
Class ImmutableCamelCapability.Builder
java.lang.Object
org.apache.camel.k.catalog.model.ImmutableCamelCapability.Builder
- Direct Known Subclasses:
CamelCapability.Builder
- Enclosing class:
- ImmutableCamelCapability
Builds instances of type
ImmutableCamelCapability.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal CamelCapability.BuilderaddAllBuildTimeProperties(Iterable<? extends Property> elements) Adds elements tobuildTimePropertiessortedSet.final CamelCapability.BuilderaddAllDependencies(Iterable<? extends Artifact> elements) Adds elements todependenciessortedSet.final CamelCapability.BuilderaddAllRuntimeProperties(Iterable<? extends Property> elements) Adds elements toruntimePropertiessortedSet.final CamelCapability.BuilderaddBuildTimeProperties(Property... elements) Adds elements tobuildTimePropertiessortedSet.final CamelCapability.BuilderaddBuildTimeProperty(Property element) Adds one element tobuildTimePropertiessortedSet.final CamelCapability.BuilderaddDependencies(Artifact... elements) Adds elements todependenciessortedSet.final CamelCapability.BuilderaddDependency(Artifact element) Adds one element todependenciessortedSet.final CamelCapability.BuilderaddRuntimeProperties(Property... elements) Adds elements toruntimePropertiessortedSet.final CamelCapability.BuilderaddRuntimeProperty(Property element) Adds one element toruntimePropertiessortedSet.build()Builds a newImmutableCamelCapability.final CamelCapability.BuilderbuildTimeProperties(Iterable<? extends Property> elements) Sets or replaces all elements forbuildTimePropertiessortedSet.final CamelCapability.Builderdependencies(Iterable<? extends Artifact> elements) Sets or replaces all elements fordependenciessortedSet.final CamelCapability.Builderfrom(CamelCapability instance) Fill a builder with attribute values from the providedCamelCapabilityinstance.final CamelCapability.BuilderSets or replaces all mappings from the specified map as entries for themetadatamap.final CamelCapability.BuilderputAllMetadata(Map<String, ? extends String> entries) Put all mappings from the specified map as entries tometadatamap.final CamelCapability.BuilderputMetadata(String key, String value) Put one entry to themetadatamap.final CamelCapability.BuilderputMetadata(Map.Entry<String, ? extends String> entry) Put one entry to themetadatamap.final CamelCapability.BuilderruntimeProperties(Iterable<? extends Property> elements) Sets or replaces all elements forruntimePropertiessortedSet.
-
Constructor Details
-
Builder
public Builder()Creates a builder forImmutableCamelCapabilityinstances.new CamelCapability.Builder() .addDependency|addAllDependencies(org.apache.camel.k.catalog.model.Artifact) //dependencieselements .addRuntimeProperty|addAllRuntimeProperties(org.apache.camel.k.catalog.model.Property) //runtimePropertieselements .addBuildTimeProperty|addAllBuildTimeProperties(org.apache.camel.k.catalog.model.Property) //buildTimePropertieselements .putMetadata|putAllMetadata(String => String) //metadatamappings .build();
-
-
Method Details
-
from
Fill a builder with attribute values from the providedCamelCapabilityinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
addDependency
Adds one element todependenciessortedSet.- Parameters:
element- A dependencies element- Returns:
thisbuilder for use in a chained invocation
-
addDependencies
Adds elements todependenciessortedSet.- Parameters:
elements- An array of dependencies elements- Returns:
thisbuilder for use in a chained invocation
-
dependencies
Sets or replaces all elements fordependenciessortedSet.- Parameters:
elements- An iterable of dependencies elements- Returns:
thisbuilder for use in a chained invocation
-
addAllDependencies
Adds elements todependenciessortedSet.- Parameters:
elements- An iterable of dependencies elements- Returns:
thisbuilder for use in a chained invocation
-
addRuntimeProperty
Adds one element toruntimePropertiessortedSet.- Parameters:
element- A runtimeProperties element- Returns:
thisbuilder for use in a chained invocation
-
addRuntimeProperties
Adds elements toruntimePropertiessortedSet.- Parameters:
elements- An array of runtimeProperties elements- Returns:
thisbuilder for use in a chained invocation
-
runtimeProperties
Sets or replaces all elements forruntimePropertiessortedSet.- Parameters:
elements- An iterable of runtimeProperties elements- Returns:
thisbuilder for use in a chained invocation
-
addAllRuntimeProperties
Adds elements toruntimePropertiessortedSet.- Parameters:
elements- An iterable of runtimeProperties elements- Returns:
thisbuilder for use in a chained invocation
-
addBuildTimeProperty
Adds one element tobuildTimePropertiessortedSet.- Parameters:
element- A buildTimeProperties element- Returns:
thisbuilder for use in a chained invocation
-
addBuildTimeProperties
Adds elements tobuildTimePropertiessortedSet.- Parameters:
elements- An array of buildTimeProperties elements- Returns:
thisbuilder for use in a chained invocation
-
buildTimeProperties
Sets or replaces all elements forbuildTimePropertiessortedSet.- Parameters:
elements- An iterable of buildTimeProperties elements- Returns:
thisbuilder for use in a chained invocation
-
addAllBuildTimeProperties
public final CamelCapability.Builder addAllBuildTimeProperties(Iterable<? extends Property> elements) Adds elements tobuildTimePropertiessortedSet.- Parameters:
elements- An iterable of buildTimeProperties elements- Returns:
thisbuilder for use in a chained invocation
-
putMetadata
Put one entry to themetadatamap.- Parameters:
key- The key in the metadata mapvalue- The associated value in the metadata map- Returns:
thisbuilder for use in a chained invocation
-
putMetadata
Put one entry to themetadatamap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
metadata
Sets or replaces all mappings from the specified map as entries for themetadatamap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the metadata map- Returns:
thisbuilder for use in a chained invocation
-
putAllMetadata
Put all mappings from the specified map as entries tometadatamap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the metadata map- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableCamelCapability.- Returns:
- An immutable instance of CamelCapability
- Throws:
IllegalStateException- if any required attributes are missing
-