Package org.apache.camel.k.catalog.model
Class ImmutableCamelLoader.Builder
java.lang.Object
org.apache.camel.k.catalog.model.ImmutableCamelLoader.Builder
- Direct Known Subclasses:
CamelLoader.Builder
- Enclosing class:
- ImmutableCamelLoader
Builds instances of type
ImmutableCamelLoader.
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 CamelLoader.BuilderaddAllDependencies(Iterable<? extends Artifact> elements) Adds elements todependenciessortedSet.final CamelLoader.BuilderaddAllLanguages(Iterable<String> elements) Adds elements tolanguagessortedSet.final CamelLoader.BuilderaddDependencies(Artifact... elements) Adds elements todependenciessortedSet.final CamelLoader.BuilderaddDependency(Artifact element) Adds one element todependenciessortedSet.final CamelLoader.BuilderaddLanguage(String element) Adds one element tolanguagessortedSet.final CamelLoader.BuilderaddLanguages(String... elements) Adds elements tolanguagessortedSet.final CamelLoader.BuilderartifactId(String artifactId) Initializes the value for theartifactIdattribute.build()Builds a newImmutableCamelLoader.final CamelLoader.Builderclassifier(String classifier) Initializes the optional valueclassifierto classifier.final CamelLoader.Builderclassifier(Optional<String> classifier) Initializes the optional valueclassifierto classifier.final CamelLoader.Builderdependencies(Iterable<? extends Artifact> elements) Sets or replaces all elements fordependenciessortedSet.final CamelLoader.BuilderFill a builder with attribute values from the providedorg.apache.camel.k.catalog.model.Artifactinstance.final CamelLoader.Builderfrom(CamelLoader instance) Fill a builder with attribute values from the providedorg.apache.camel.k.catalog.model.CamelLoaderinstance.final CamelLoader.BuilderInitializes the value for thegroupIdattribute.final CamelLoader.BuilderSets or replaces all elements forlanguagessortedSet.final CamelLoader.BuilderSets or replaces all mappings from the specified map as entries for themetadatamap.final CamelLoader.BuilderputAllMetadata(Map<String, ? extends String> entries) Put all mappings from the specified map as entries tometadatamap.final CamelLoader.BuilderputMetadata(String key, String value) Put one entry to themetadatamap.final CamelLoader.BuilderputMetadata(Map.Entry<String, ? extends String> entry) Put one entry to themetadatamap.final CamelLoader.BuilderInitializes the optional valueversionto version.final CamelLoader.BuilderInitializes the optional valueversionto version.
-
Constructor Details
-
Builder
public Builder()Creates a builder forImmutableCamelLoaderinstances.new CamelLoader.Builder() .groupId(String) // requiredgroupId.artifactId(String) // requiredartifactId.classifier(String) // optionalclassifier.version(String) // optionalversion.addLanguage|addAllLanguages(String) //languageselements .addDependency|addAllDependencies(org.apache.camel.k.catalog.model.Artifact) //dependencieselements .putMetadata|putAllMetadata(String => String) //metadatamappings .build();
-
-
Method Details
-
from
Fill a builder with attribute values from the providedorg.apache.camel.k.catalog.model.CamelLoaderinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedorg.apache.camel.k.catalog.model.Artifactinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
groupId
Initializes the value for thegroupIdattribute.- Parameters:
groupId- The value for groupId- Returns:
thisbuilder for use in a chained invocation
-
artifactId
Initializes the value for theartifactIdattribute.- Parameters:
artifactId- The value for artifactId- Returns:
thisbuilder for use in a chained invocation
-
classifier
Initializes the optional valueclassifierto classifier.- Parameters:
classifier- The value for classifier- Returns:
thisbuilder for chained invocation
-
classifier
Initializes the optional valueclassifierto classifier.- Parameters:
classifier- The value for classifier- Returns:
thisbuilder for use in a chained invocation
-
version
Initializes the optional valueversionto version.- Parameters:
version- The value for version- Returns:
thisbuilder for chained invocation
-
version
Initializes the optional valueversionto version.- Parameters:
version- The value for version- Returns:
thisbuilder for use in a chained invocation
-
addLanguage
Adds one element tolanguagessortedSet.- Parameters:
element- A languages element- Returns:
thisbuilder for use in a chained invocation
-
addLanguages
Adds elements tolanguagessortedSet.- Parameters:
elements- An array of languages elements- Returns:
thisbuilder for use in a chained invocation
-
languages
Sets or replaces all elements forlanguagessortedSet.- Parameters:
elements- An iterable of languages elements- Returns:
thisbuilder for use in a chained invocation
-
addAllLanguages
Adds elements tolanguagessortedSet.- Parameters:
elements- An iterable of languages elements- 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
-
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 newImmutableCamelLoader.- Returns:
- An immutable instance of CamelLoader
- Throws:
IllegalStateException- if any required attributes are missing
-