Class PluginInfo.Builder
- java.lang.Object
-
- org.hansken.plugin.extraction.api.PluginInfo.Builder
-
- Enclosing class:
- PluginInfo
public static final class PluginInfo.Builder extends Object
A builder forplugin information
.Note: all methods throw a
NullPointerException
whennull
is passed to them.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description PluginInfo.Builder
author(Author author)
Set theauthor
.PluginInfo
build()
Create theplugin information
from the properties set on thisbuilder
.PluginInfo.Builder
deferredIterations(int deferredIterations)
Set the number of extraction iterations needed for this deferred plugin.PluginInfo.Builder
description(String description)
Set thedescription
.PluginInfo.Builder
hqlMatcher(String hqlMatcher)
Set the hqlMatcher query in string format.PluginInfo.Builder
id(String domain, String category, String name)
Set the unique id of this plugin, consisting of domain, category and name.PluginInfo.Builder
id(PluginId id)
Set the unique id of this plugin, consisting of domain, category and name.PluginInfo.Builder
license(String license)
Set the name of the license of this plugin.PluginInfo.Builder
maturityLevel(MaturityLevel maturityLevel)
Set thematurity level
.PluginInfo.Builder
name(String name)
Deprecated.Useid(PluginId)
instead.PluginInfo.Builder
pluginVersion(String version)
Set theplugin version
.PluginInfo.Builder
resources(PluginResources resources)
Set the resources of this plugin (optional).PluginInfo.Builder
webpageUrl(String webpageUrl)
Set the url to a webpage that belongs to this plugin.
-
-
-
Method Detail
-
name
@Deprecated public PluginInfo.Builder name(String name)
Deprecated.Useid(PluginId)
instead.Set the name of thisplugin
.- Parameters:
name
- the name- Returns:
this
- Throws:
IllegalArgumentException
- if the name is empty
-
pluginVersion
public PluginInfo.Builder pluginVersion(String version)
Set theplugin version
.- Parameters:
version
- the plugin version- Returns:
this
- Throws:
IllegalArgumentException
- if the version is empty
-
description
public PluginInfo.Builder description(String description)
Set thedescription
.- Parameters:
description
- the description- Returns:
this
- Throws:
IllegalArgumentException
- if the description is empty
-
author
public PluginInfo.Builder author(Author author)
Set theauthor
.- Parameters:
author
- the author- Returns:
this
-
maturityLevel
public PluginInfo.Builder maturityLevel(MaturityLevel maturityLevel)
Set thematurity level
.- Parameters:
maturityLevel
- the maturity level- Returns:
this
-
hqlMatcher
public PluginInfo.Builder hqlMatcher(String hqlMatcher)
Set the hqlMatcher query in string format.- Parameters:
hqlMatcher
- the matcher- Returns:
this
-
webpageUrl
public PluginInfo.Builder webpageUrl(String webpageUrl)
Set the url to a webpage that belongs to this plugin. This can also be a link to a webpage of the git repository of the remote plugin.- Parameters:
webpageUrl
- url to webpage- Returns:
this
-
deferredIterations
public PluginInfo.Builder deferredIterations(int deferredIterations)
Set the number of extraction iterations needed for this deferred plugin. Only relevant for deferred plugins. If this method is not called upon, default number of iterations will be set to 1.- Parameters:
deferredIterations
- number of iterations needed for this plugin. Should be between 1 and 20- Returns:
this
-
id
public PluginInfo.Builder id(String domain, String category, String name)
Set the unique id of this plugin, consisting of domain, category and name.example: "nfi.nl/extract/ocr/detection/plugin".
in this example nfi.nl is the domain, extract is the category, and ocr/detection/plugin is the name.- Parameters:
domain
- the domain of the organisation, for example "nfi.nl"category
- the action group of the plugin, for example `extract`, `carve`, `classify` (read the SDK documentation for more details).name
- the name of the plugin, or in the classic sense, a description detailing the action(s) of the plugin. Note that the name can contain (forward) slashes.- Returns:
this
-
id
public PluginInfo.Builder id(PluginId id)
Set the unique id of this plugin, consisting of domain, category and name.- Parameters:
id
- the unique id of this plugin, consisting of domain, category and name.- Returns:
this
-
license
public PluginInfo.Builder license(String license)
Set the name of the license of this plugin.- Parameters:
license
- name of the license of the plugin- Returns:
this
-
resources
public PluginInfo.Builder resources(PluginResources resources)
Set the resources of this plugin (optional).- Parameters:
resources
- the resources of this plugin- Returns:
this
-
build
public PluginInfo build()
Create theplugin information
from the properties set on thisbuilder
.- Returns:
- the created plugin information
-
-