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

The plugin must be installed in Openfire.

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