Package com.avrix.plugin
Class Metadata
java.lang.Object
com.avrix.plugin.Metadata
Represents metadata for a plugin, including various details such as name, description, author, version, and dependencies.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Builder class for constructingMetadata
instances. -
Method Summary
Modifier and TypeMethodDescriptionstatic Metadata
createFromJar
(File jarFile, String metadataFileName) Creating metadata from a file inside a Jar archiveReturns the author of the plugin.Returns aFile
object representing the configuration directory for this plugin.Returns the contact information for the plugin author.Returns theMap
of dependencies for the plugin.Returns the description of the plugin.Returns theList
of entry points for the plugin.Returns theEnvironment
of the plugin.getId()
Returns the ID of the plugin.Returns the license of the plugin.getName()
Returns the name of the plugin.Returns theList
of patches for the plugin.Returns the pluginFile
Returns the version of the plugin.sortMetadata
(List<Metadata> metadataList) Sorts a list ofMetadata
objects based on their dependencies using topological sort.
-
Method Details
-
createFromJar
Creating metadata from a file inside a Jar archive -
sortMetadata
Sorts a list ofMetadata
objects based on their dependencies using topological sort.- Parameters:
metadataList
- the list ofMetadata
objects to be sorted- Returns:
- a sorted list of
Metadata
objects where dependencies appear before the dependent objects - Throws:
IllegalStateException
- if a cyclic dependency is detectedIllegalArgumentException
- if a dependency is missing from the metadata list
-
getConfigFolder
Returns aFile
object representing the configuration directory for this plugin. The directory path is normalized to prevent problems with various file systems.- Returns:
- A
File
object pointing to the normalized path to the plugin configuration directory.
-
getName
Returns the name of the plugin.- Returns:
- the name of the plugin
-
getEnvironment
Returns theEnvironment
of the plugin.- Returns:
- the
Environment
of the plugin
-
getPluginFile
Returns the pluginFile
- Returns:
- the
File
of the plugin
-
getId
Returns the ID of the plugin.- Returns:
- the ID of the plugin
-
getDescription
Returns the description of the plugin.- Returns:
- the description of the plugin
-
getAuthor
Returns the author of the plugin.- Returns:
- the author of the plugin
-
getVersion
Returns the version of the plugin.- Returns:
- the version of the plugin
-
getLicense
Returns the license of the plugin.- Returns:
- the license of the plugin
-
getContacts
Returns the contact information for the plugin author.- Returns:
- the contact information for the plugin author
-
getEntryPoints
Returns theList
of entry points for the plugin.- Returns:
- the
List
of entry points for the plugin
-
getPatchList
Returns theList
of patches for the plugin.- Returns:
- the
List
of patches for the plugin
-
getDependencies
Returns theMap
of dependencies for the plugin.- Returns:
- the
Map
of dependencies for the plugin
-