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
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder class for constructingMetadatainstances. -
Method Summary
Modifier and TypeMethodDescriptionstatic MetadatacreateFromJar(File jarFile, String metadataFileName) Creating metadata from a file inside a Jar archiveReturns the author of the plugin.Returns aFileobject representing the configuration directory for this plugin.Returns the contact information for the plugin author.Returns theMapof dependencies for the plugin.Returns the description of the plugin.Returns theListof entry points for the plugin.Returns theEnvironmentof the plugin.getId()Returns the ID of the plugin.Returns the license of the plugin.getName()Returns the name of the plugin.Returns theListof patches for the plugin.Returns the pluginFileReturns the version of the plugin.sortMetadata(List<Metadata> metadataList) Sorts a list ofMetadataobjects based on their dependencies using topological sort.
-
Method Details
-
createFromJar
Creating metadata from a file inside a Jar archive -
sortMetadata
Sorts a list ofMetadataobjects based on their dependencies using topological sort.- Parameters:
metadataList- the list ofMetadataobjects to be sorted- Returns:
- a sorted list of
Metadataobjects 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 aFileobject representing the configuration directory for this plugin. The directory path is normalized to prevent problems with various file systems.- Returns:
- A
Fileobject 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 theEnvironmentof the plugin.- Returns:
- the
Environmentof the plugin
-
getPluginFile
Returns the pluginFile- Returns:
- the
Fileof 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 theListof entry points for the plugin.- Returns:
- the
Listof entry points for the plugin
-
getPatchList
Returns theListof patches for the plugin.- Returns:
- the
Listof patches for the plugin
-
getDependencies
Returns theMapof dependencies for the plugin.- Returns:
- the
Mapof dependencies for the plugin
-