Package com.avrix.plugin
Class Metadata.MetadataBuilder
java.lang.Object
com.avrix.plugin.Metadata.MetadataBuilder
- Enclosing class:
- Metadata
Builder class for constructing
Metadata
instances.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSets the author of the plugin.build()
Builds and returns theMetadata
instance.Sets the contact information for the plugin author.dependencies
(Map<String, String> dependencies) Sets theMap
of dependencies for the plugin.description
(String description) Sets the description of the plugin.entryPointsList
(List<String> entryPointsList) Sets theList
of entry points for the plugin.environment
(String environment) Sets the environment of the plugin.Sets the ID of the plugin.Sets the license of the plugin.Sets the name of the plugin.Sets theList
of patches for the plugin.pluginFile
(File file) Sets the file of the plugin.Sets the version of the plugin.
-
Constructor Details
-
MetadataBuilder
public MetadataBuilder()Creates a new builder instance.
-
-
Method Details
-
name
Sets the name of the plugin.- Parameters:
name
- the name of the plugin- Returns:
- the builder instance
-
id
Sets the ID of the plugin.- Parameters:
id
- the ID of the plugin- Returns:
- the builder instance
-
pluginFile
Sets the file of the plugin.- Parameters:
file
- plugin archive Jar object- Returns:
- the builder instance
-
description
Sets the description of the plugin.- Parameters:
description
- the description of the plugin- Returns:
- the builder instance
-
author
Sets the author of the plugin.- Parameters:
author
- the author of the plugin- Returns:
- the builder instance
-
environment
Sets the environment of the plugin.- Parameters:
environment
- the environment of the plugin- Returns:
- the builder instance
-
version
Sets the version of the plugin.- Parameters:
version
- the version of the plugin- Returns:
- the builder instance
-
license
Sets the license of the plugin.- Parameters:
license
- the license of the plugin- Returns:
- the builder instance
-
contacts
Sets the contact information for the plugin author.- Parameters:
contacts
- the contact information for the plugin author- Returns:
- the builder instance
-
entryPointsList
Sets theList
of entry points for the plugin.- Parameters:
entryPointsList
- the list of entry points for the plugin- Returns:
- the builder instance
-
patchList
Sets theList
of patches for the plugin.- Parameters:
patchList
- the list of patches for the plugin- Returns:
- the builder instance
-
dependencies
Sets theMap
of dependencies for the plugin.- Parameters:
dependencies
- the map of dependencies for the plugin- Returns:
- the builder instance
-
build
Builds and returns theMetadata
instance. Ensures that all required fields are set.- Returns:
- the constructed
Metadata
instance - Throws:
NullPointerException
- if any required field is not set
-