Class ShopwarePluginApiClient
- java.lang.Object
-
- com.customweb.shopware.plugin.api.client.ShopwarePluginApiClient
-
public class ShopwarePluginApiClient extends java.lang.ObjectClient for Shopware plugin management API.
-
-
Constructor Summary
Constructors Constructor Description ShopwarePluginApiClient(ShopwareCredentials credentials)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PluginInformationfetchPluginDetails(long pluginId)Retrieve details for the specified plugin.PluginVersionfetchPluginVersionStatus(long pluginId, long versionId)Retrieve plugin version information.java.util.List<PluginInformation>listPlugins(boolean includeInactive, int limit, int offset)List all the uploaded plugins.ReviewResponserequestReview(long pluginId)Request plugin version review.PluginVersionupdatePluginVersion(long pluginId, PluginVersion version)Update plugin version informaiton.PluginVersionuploadPluginVersion(long pluginId, byte[] fileContent)Upload a ZIP file containing the code for a new plugin version.
-
-
-
Constructor Detail
-
ShopwarePluginApiClient
public ShopwarePluginApiClient(ShopwareCredentials credentials)
Constructor.- Parameters:
username- Shopware usernamepassword- Shopware passwordproducerId- 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 includedlimit- how many results to returnoffset- 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 idfileContent- 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 idversion- plugin version information- Returns:
- updated information
-
fetchPluginVersionStatus
public PluginVersion fetchPluginVersionStatus(long pluginId, long versionId)
Retrieve plugin version information.- Parameters:
pluginId- plugin idversionId- plugin version id- Returns:
- plugin version information.
-
requestReview
public ReviewResponse requestReview(long pluginId)
Request plugin version review.- Parameters:
pluginId- plugin id
-
-