Package de.xima.fc.workflow
Class ElementPrototypeDescriptor<TData,TPayload extends IElementPrototypeData<TData>>
- java.lang.Object
-
- de.xima.fc.workflow.ElementPrototypeDescriptor<TData,TPayload>
-
- Type Parameters:
TData
- Type of the workflow element's properties model.TPayload
- Type of the node or trigger data provided by this prototype.
- All Implemented Interfaces:
IElementPrototypeDescriptor<TData>
,Serializable
- Direct Known Subclasses:
NodePrototypeDescriptor
,TriggerPrototypeDescriptor
public class ElementPrototypeDescriptor<TData,TPayload extends IElementPrototypeData<TData>> extends Object implements IElementPrototypeDescriptor<TData>, Serializable
Default POJO implementation ofIElementPrototypeDescriptor
.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ElementPrototypeDescriptor.ElementPrototypeBuilder<TSelf,TData,TPayload extends IElementPrototypeData<TData>>
Simple builder for configuring an element prototype.
-
Constructor Summary
Constructors Modifier Constructor Description protected
ElementPrototypeDescriptor(ElementPrototypeDescriptor.ElementPrototypeBuilder<?,TData,TPayload> builder)
ElementPrototypeDescriptor(TPayload payload, String label, IGuiIcon icon, String subLabel, String title, String sortKey, IElementCategory mainCategory, IElementCategory subCategory, Set<EElementPrototypeTag> tags, String searchText)
Creates a new POJO with the given data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IGuiIcon
getIcon()
Gets the icon for this element prototype, as shown in the UI.String
getLabel()
Gets the localized name of the prototype item, as shown in the UI.IElementCategory
getMainCategory()
Gets the element's main category, which is used for grouping the elements.TPayload
getPayload()
Gets the data for this element prototype that is used for creating a new workflow element.String
getSearchText()
Gets 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.String
getSortKey()
Returns the sort key for element prototypes that are in the sameIElementPrototypeDescriptor.getSubCategory()
.IElementCategory
getSubCategory()
The optional sub category, which is used for grouping the element within the given main group.String
getSubLabel()
Gets the localized sub label of the prototype item.Set<EElementPrototypeTag>
getTags()
Gets the list of tags for this prototype that may affect when this prototype is visible etc.String
getTitle()
Gets the localized title for the this prototype.
-
-
-
Constructor Detail
-
ElementPrototypeDescriptor
public ElementPrototypeDescriptor(TPayload payload, String label, IGuiIcon icon, String subLabel, String title, String sortKey, IElementCategory mainCategory, IElementCategory subCategory, Set<EElementPrototypeTag> tags, String searchText)
Creates a new POJO with the given data.- Parameters:
payload
- The value returned byIElementPrototypeDescriptor.getPayload()
.label
- The value returned byIElementPrototypeDescriptor.getLabel()
.icon
- The value returned byIElementPrototypeDescriptor.getIcon()
.subLabel
- The value returned byIElementPrototypeDescriptor.getSubLabel()
.title
- The value returned byIElementPrototypeDescriptor.getTitle()
.sortKey
- The value returned byIElementPrototypeDescriptor.getSortKey()
.mainCategory
- The value returned byIElementPrototypeDescriptor.getMainCategory()
.subCategory
- The value returned byIElementPrototypeDescriptor.getSubCategory()
.tags
- The value returned byIElementPrototypeDescriptor.getTags()
.searchText
- The value returned byIElementPrototypeDescriptor.getSearchText()
.
-
ElementPrototypeDescriptor
protected ElementPrototypeDescriptor(ElementPrototypeDescriptor.ElementPrototypeBuilder<?,TData,TPayload> builder)
-
-
Method Detail
-
getIcon
public IGuiIcon getIcon()
Description copied from interface:IElementPrototypeDescriptor
Gets the icon for this element prototype, as shown in the UI.- Specified by:
getIcon
in interfaceIElementPrototypeDescriptor<TData>
- Returns:
- The icon for this element prototype.
-
getLabel
public String getLabel()
Description copied from interface:IElementPrototypeDescriptor
Gets the localized name of the prototype item, as shown in the UI.- Specified by:
getLabel
in interfaceIElementPrototypeDescriptor<TData>
- Returns:
- The localized name of the prototype item.
-
getMainCategory
public IElementCategory getMainCategory()
Description copied from interface:IElementPrototypeDescriptor
Gets the element's main category, which is used for grouping the elements.- Specified by:
getMainCategory
in interfaceIElementPrototypeDescriptor<TData>
- Returns:
- The element's main category.
-
getPayload
public TPayload getPayload()
Description copied from interface:IElementPrototypeDescriptor
Gets the data for this element prototype that is used for creating a new workflow element.- Specified by:
getPayload
in interfaceIElementPrototypeDescriptor<TData>
- Returns:
- The data for this element prototype.
-
getSearchText
public String getSearchText()
Description copied from interface:IElementPrototypeDescriptor
Gets 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.- Specified by:
getSearchText
in interfaceIElementPrototypeDescriptor<TData>
- Returns:
- The search text for this prototype.
-
getSortKey
public String getSortKey()
Description copied from interface:IElementPrototypeDescriptor
Returns the sort key for element prototypes that are in the sameIElementPrototypeDescriptor.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 theirIElementPrototypeDescriptor.getSortKey()
.- Specified by:
getSortKey
in interfaceIElementPrototypeDescriptor<TData>
- Returns:
- The key for sorting items in the same
IElementPrototypeDescriptor.getSubCategory()
.
-
getSubCategory
public IElementCategory getSubCategory()
Description copied from interface:IElementPrototypeDescriptor
The optional sub category, which is used for grouping the element within the given main group.- Specified by:
getSubCategory
in interfaceIElementPrototypeDescriptor<TData>
- Returns:
- The element's sub category.
-
getSubLabel
public String getSubLabel()
Description copied from interface:IElementPrototypeDescriptor
Gets 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.- Specified by:
getSubLabel
in interfaceIElementPrototypeDescriptor<TData>
- Returns:
- The localized sub label of the prototype item.
-
getTags
public Set<EElementPrototypeTag> getTags()
Description copied from interface:IElementPrototypeDescriptor
Gets the list of tags for this prototype that may affect when this prototype is visible etc.- Specified by:
getTags
in interfaceIElementPrototypeDescriptor<TData>
- Returns:
- List of tags for this prototype.
-
getTitle
public String getTitle()
Description copied from interface:IElementPrototypeDescriptor
Gets 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.- Specified by:
getTitle
in interfaceIElementPrototypeDescriptor<TData>
- Returns:
- The localized title for the prototype.
-
-