Package de.xima.fc.pluginstore
Class PluginStoreItem.Builder
- java.lang.Object
-
- de.xima.fc.pluginstore.PluginStoreItem.Builder
-
- Enclosing class:
- PluginStoreItem
public static final class PluginStoreItem.Builder extends Object
A builder for configuring aPluginStoreItem
instance- Since:
- 8.0.0
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PluginStoreItem
build()
Creates a new store item with the current data.PluginStoreItem.Builder
description(String description)
Sets the localized description of the plugin.PluginStoreItem.Builder
downloadCount(long downloadCount)
Sets the total number of downloads of the plugin.PluginStoreItem.Builder
free(boolean free)
Sets if the plugin is free or not.PluginStoreItem.Builder
images(List<GuiImage> images)
Sets the list of image links (e.g.PluginStoreItem.Builder
installedVersionRange(String installedVersionRange)
Sets the range of the installed versions.PluginStoreItem.Builder
name(String name)
Sets the localized name of the plugin.PluginStoreItem.Builder
pluginKey(String pluginKey)
Sets the plugin key of this plugin group.PluginStoreItem.Builder
scope(EPluginStoreItemInstallScope scope)
Sets the scope of the plugin, if it is installed.void
shortDescription(String shortDescription)
Sets a the short, plain-text description of the plugin.PluginStoreItem.Builder
status(EPluginStoreItemInstallStatus status)
Sets the install status of the plugin.PluginStoreItem.Builder
tags(List<PluginStoreItemTag> tags)
Sets all tags associated with the plugin.PluginStoreItem.Builder
version(String version)
Sets the name of the most recent compatible version of the plugin.
-
-
-
Method Detail
-
build
public PluginStoreItem build()
Creates a new store item with the current data. Subsequent modifications to this builder will not affect the built instance.- Returns:
- A new store item instance.
-
description
public PluginStoreItem.Builder description(String description)
Sets the localized description of the plugin.- Parameters:
description
- The description of the plugin.- Returns:
- This builder instance for chaining method calls.
-
downloadCount
public PluginStoreItem.Builder downloadCount(long downloadCount)
Sets the total number of downloads of the plugin.- Parameters:
downloadCount
- The number of plugin downloads.- Returns:
- This builder instance for chaining method calls.
-
images
public PluginStoreItem.Builder images(List<GuiImage> images)
Sets the list of image links (e.g. icons or screenshots) for the plugin. Each image link can be accessed via an HTTP GET request.- Parameters:
images
- The links for the images of the plugin.- Returns:
- This builder instance for chaining method calls.
-
installedVersionRange
public PluginStoreItem.Builder installedVersionRange(String installedVersionRange)
Sets the range of the installed versions.- Parameters:
installedVersionRange
- Installed version range of the plugin.- Returns:
- This builder instance for chaining method calls.
-
name
public PluginStoreItem.Builder name(String name)
Sets the localized name of the plugin.- Parameters:
name
- The name of the plugin.- Returns:
- This builder instance for chaining method calls.
-
free
public PluginStoreItem.Builder free(boolean free)
Sets if the plugin is free or not.- Parameters:
free
- if the plugin is freely available.- Returns:
- This builder instance for chaining method calls.
-
pluginKey
public PluginStoreItem.Builder pluginKey(String pluginKey)
Sets the plugin key of this plugin group.- Parameters:
pluginKey
- The key of this plugin group.- Returns:
- This builder instance for chaining method calls.
-
shortDescription
public void shortDescription(String shortDescription)
Sets a the short, plain-text description of the plugin.- Parameters:
shortDescription
- A short, plain-text (non-HTML) description.
-
status
public PluginStoreItem.Builder status(EPluginStoreItemInstallStatus status)
Sets the install status of the plugin.- Parameters:
status
- The install status of the plugin.- Returns:
- This builder instance for chaining method calls.
-
tags
public PluginStoreItem.Builder tags(List<PluginStoreItemTag> tags)
Sets all tags associated with the plugin.- Parameters:
tags
- A list of tags, may be empty.- Returns:
- This builder instance for chaining method calls.
-
version
public PluginStoreItem.Builder version(String version)
Sets the name of the most recent compatible version of the plugin.- Parameters:
version
- Version of the plugin.- Returns:
- This builder instance for chaining method calls.
-
scope
public PluginStoreItem.Builder scope(EPluginStoreItemInstallScope scope)
Sets the scope of the plugin, if it is installed.- Parameters:
scope
- of the installed plugin.- Returns:
- This builder instance for chaining method calls.
-
-