Class ShopwarePluginApiClient


  • public class ShopwarePluginApiClient
    extends java.lang.Object
    Client for Shopware plugin management API.
    • Constructor Detail

      • ShopwarePluginApiClient

        public ShopwarePluginApiClient​(ShopwareCredentials credentials)
        Constructor.
        Parameters:
        username - Shopware username
        password - Shopware password
        producerId - Shopware producer id
    • Method Detail

      • listPlugins

        public java.util.List<PluginInformation> listPlugins​(boolean includeInactive,
                                                             int limit,
                                                             int offset)
        List all the uploaded plugins. Because querying a lot of plugins can be slow, this method allows to make use of pagination with limit and offset parameters.
        Parameters:
        includeInactive - true, if inactive plugins should be included
        limit - how many results to return
        offset - which result to start on
        Returns:
        list of plugins
      • fetchPluginDetails

        public PluginInformation fetchPluginDetails​(long pluginId)
        Retrieve details for the specified plugin.
        Parameters:
        pluginId - plugin id
        Returns:
        plugin detais
      • uploadPluginVersion

        public PluginVersion uploadPluginVersion​(long pluginId,
                                                 byte[] fileContent)
        Upload a ZIP file containing the code for a new plugin version.
        Parameters:
        pluginId - plugin id
        fileContent - the ZIP file contents
        Returns:
        the new plugin version information
      • updatePluginVersion

        public PluginVersion updatePluginVersion​(long pluginId,
                                                 PluginVersion version)
        Update plugin version informaiton.
        Parameters:
        pluginId - plugin id
        version - plugin version information
        Returns:
        updated information
      • fetchPluginVersionStatus

        public PluginVersion fetchPluginVersionStatus​(long pluginId,
                                                      long versionId)
        Retrieve plugin version information.
        Parameters:
        pluginId - plugin id
        versionId - plugin version id
        Returns:
        plugin version information.
      • requestReview

        public ReviewResponse requestReview​(long pluginId)
        Request plugin version review.
        Parameters:
        pluginId - plugin id