Package de.xima.fc.workflow
Class ElementPrototypeDescriptor.ElementPrototypeBuilder<TSelf,TData,TPayload extends IElementPrototypeData<TData>>
- java.lang.Object
-
- de.xima.fc.workflow.ElementPrototypeDescriptor.ElementPrototypeBuilder<TSelf,TData,TPayload>
-
- Type Parameters:
TSelf
- Type of the builder sub type.TData
- Type of the workflow element's properties model.TPayload
- Type of the node or trigger data provided by this prototype.
- Direct Known Subclasses:
NodePrototypeDescriptor.NodePrototypeBuilder
,TriggerPrototypeDescriptor.TriggerPrototypeBuilder
- Enclosing class:
- ElementPrototypeDescriptor<TData,TPayload extends IElementPrototypeData<TData>>
public abstract static class ElementPrototypeDescriptor.ElementPrototypeBuilder<TSelf,TData,TPayload extends IElementPrototypeData<TData>> extends Object
Simple builder for configuring an element prototype.- Since:
- 8.0.1
- Author:
- XIMA MEDIA GmbH
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ElementPrototypeBuilder(TPayload payload)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract TSelf
getSelf()
TSelf
icon(IGuiIcon icon)
Sets the icon for this element prototype, as shown in the UI.TSelf
label(String label)
Sets the localized name of the prototype item, as shown in the UI.TSelf
mainCategory(IElementCategory mainCategory)
Sets the element's main category, which is used for grouping the elements.TSelf
searchText(String searchText)
Sets the search text that is never visible to the user, but only used when searching for an element, such as via a search input field in the UI.TSelf
sortKey(String sortKey)
Set the sort key for element prototypes that are in the sameElementPrototypeDescriptor.getSubCategory()
.TSelf
subCategory(IElementCategory subCategory)
Set the optional sub category, which is used for grouping the element within the given main group.TSelf
subLabel(String subLabel)
Sets the localized sub label of the prototype item.TSelf
tags(Set<EElementPrototypeTag> tags)
Sets the list of tags for this prototype that may affect when this prototype is visible etc.TSelf
title(String title)
Sets the localized title for the this prototype.
-
-
-
Constructor Detail
-
ElementPrototypeBuilder
protected ElementPrototypeBuilder(TPayload payload)
-
-
Method Detail
-
icon
public TSelf icon(IGuiIcon icon)
Sets the icon for this element prototype, as shown in the UI.- Parameters:
icon
- The icon for this element prototype.- Returns:
- This builder instance for chaining method calls.
-
label
public TSelf label(String label)
Sets the localized name of the prototype item, as shown in the UI.- Parameters:
label
- The localized name of the prototype item.- Returns:
- This builder instance for chaining method calls.
-
mainCategory
public TSelf mainCategory(IElementCategory mainCategory)
Sets the element's main category, which is used for grouping the elements.- Parameters:
mainCategory
- The element's main category.- Returns:
- This builder instance for chaining method calls.
-
searchText
public TSelf searchText(String searchText)
Sets the search text that is never visible to the user, but only used when searching for an element, such as via a search input field in the UI.- Parameters:
searchText
- The search text for this prototype.- Returns:
- This builder instance for chaining method calls.
-
sortKey
public TSelf sortKey(String sortKey)
Set the sort key for element prototypes that are in the sameElementPrototypeDescriptor.getSubCategory()
. Each prototype belongs to a category and is shown in that category (which may be a tab, accordion panel etc.) When there are multiple element prototypes in the same category, they are sorted according to theirElementPrototypeDescriptor.getSortKey()
.- Parameters:
sortKey
- The key for sorting items in the samesubCategory(IElementCategory)
.- Returns:
- This builder instance for chaining method calls.
-
subCategory
public TSelf subCategory(IElementCategory subCategory)
Set the optional sub category, which is used for grouping the element within the given main group.- Parameters:
subCategory
- The element's sub category.- Returns:
- This builder instance for chaining method calls.
-
subLabel
public TSelf subLabel(String subLabel)
Sets the localized sub label of the prototype item. The sub label, when not empty, is shown below thelabel
in a smaller font size and may provide additional details about the item. * @param subLabel- Parameters:
subLabel
- The localized sub label of the prototype item.- Returns:
- This builder instance for chaining method calls.
-
tags
public TSelf tags(Set<EElementPrototypeTag> tags)
Sets the list of tags for this prototype that may affect when this prototype is visible etc.- Parameters:
tags
- List of tags for this prototype.- Returns:
- This builder instance for chaining method calls.
-
title
public TSelf title(String title)
Sets the localized title for the this prototype. The title is the tooltip that shows up when the user hovers over the item with the mouse.- Parameters:
title
- The localized title for the prototype.- Returns:
- This builder instance for chaining method calls.
-
getSelf
protected abstract TSelf getSelf()
-
-