public static PluginMetadata getInstance( Path pluginDir )
    {
        return new PluginMetadata(
                PluginMetadataHelper.getName( pluginDir ),
                PluginMetadataHelper.getCanonicalName( pluginDir ),
                PluginMetadataHelper.getDescription( pluginDir ),
                PluginMetadataHelper.getVersion( pluginDir ),
                PluginMetadataHelper.getAuthor( pluginDir ),
                PluginMetadataHelper.getIcon( pluginDir ),
                PluginMetadataHelper.getChangelog( pluginDir ),
                PluginMetadataHelper.getReadme( pluginDir ),
                PluginMetadataHelper.getLicense( pluginDir ),
                PluginMetadataHelper.getMinServerVersion( pluginDir ),
                PluginMetadataHelper.getPriorToServerVersion( pluginDir ),
                PluginMetadataHelper.getMinJavaVersion( pluginDir ),
                PluginMetadataHelper.isCsrfProtectionEnabled( pluginDir )
                );
    }
Constructs a metadata object based on a plugin.

The plugin must be installed in Openfire.

@param pluginDir the path of the plugin directory (cannot be null)
@return Metadata for the plugin (never null).
xmppserver/src/main/java/org/jivesoftware/openfire/container/PluginMetadata.java