Interface ISingleElementPrototype<TData,​TElement extends IWorkflowElementEntity>

    • Method Detail

      • getMainCategory

        IElementCategory getMainCategory​(IGetElementPrototypesParams params)
        Parameters:
        params - Parameters with the current client, locale, entity context etc.
        Returns:
        IElementCategory element's main category, which is used for grouping the elements.
        Throws:
        RuntimeException - This method should normally not throw an exception. A runtime exception may be thrown when the node prototypes cannot be created for an unknown reason. When an exception is thrown, no node prototypes are made available for this handler.
      • getPrototypeElement

        TElement getPrototypeElement​(IGetElementPrototypesParams params)
        Parameters:
        params - Parameters with the current client, locale, entity context etc.
        Returns:
        The workflow element that is used as a prototype. The default implementation simply creates a new workflow element with the IWorkflowElementTypeProviding.getType(). Usually there is no reason to override this method.
        Throws:
        RuntimeException - This method should normally not throw an exception. A runtime exception may be thrown when the node prototypes cannot be created for an unknown reason. When an exception is thrown, no node prototypes are made available for this handler.
      • getPrototypeLabel

        String getPrototypeLabel​(IGetElementPrototypesParams params)
        Parameters:
        params - Parameters with the current client, locale, entity context etc.
        Returns:
        The icon for the element prototype, shown in the element drawer panel to the left of the workflow designer. See IElementPrototypeDescriptor.getLabel().
        Throws:
        RuntimeException - This method should normally not throw an exception. A runtime exception may be thrown when the node prototypes cannot be created for an unknown reason. When an exception is thrown, no node prototypes are made available for this handler.
      • getPrototypeModelData

        TData getPrototypeModelData​(String label,
                                    IGuiIcon icon,
                                    IGetElementPrototypesParams params)
        Parameters:
        label - Label of the prototype, as returned by getPrototypeLabel(IGetElementPrototypesParams). Can be used to prefill the properties model with the label.
        icon - Icon of the prototype, as returned by getPrototypeIcon(IGetElementPrototypesParams). Can be used to prefill the properties model with the icon.
        params - Parameters with the current client, locale, entity context etc.
        Returns:
        The properties model for the element prototype. This is the initial configuration when the user adds the prototype to the flowchart (via drag&drop).
        Throws:
        RuntimeException - This method should normally not throw an exception. A runtime exception may be thrown when the node prototypes cannot be created for an unknown reason. When an exception is thrown, no node prototypes are made available for this handler.
      • getPrototypeSearchText

        String getPrototypeSearchText​(IGetElementPrototypesParams params)
        Parameters:
        params - Parameters with the current client, locale, entity context etc.
        Returns:
        The search text for the element prototype, never shown to the user but used for filtering. See IElementPrototypeDescriptor.getSearchText().
        Throws:
        RuntimeException - This method should normally not throw an exception. A runtime exception may be thrown when the node prototypes cannot be created for an unknown reason. When an exception is thrown, no node prototypes are made available for this handler.
      • getPrototypeSortKey

        default String getPrototypeSortKey​(String label,
                                           IGetElementPrototypesParams params)
        Parameters:
        label - The label, as returned by getPrototypeLabel(IGetElementPrototypesParams). Can be used to sort the prototype alphabetically by its name.
        params - Parameters with the current client, locale, entity context etc.
        Returns:
        The sort key for the prototype, used when there are multiple prototypes within the same category. See IElementPrototypeDescriptor.getSortKey().
        Throws:
        RuntimeException - This method should normally not throw an exception. A runtime exception may be thrown when the node prototypes cannot be created for an unknown reason. When an exception is thrown, no node prototypes are made available for this handler.
      • getPrototypeSubLabel

        String getPrototypeSubLabel​(IGetElementPrototypesParams params)
        Parameters:
        params - Parameters with the current client, locale, entity context etc.
        Returns:
        The sub label for the element prototype, shown in the element drawer panel to the left of the workflow designer. See IElementPrototypeDescriptor.getLabel().
        Throws:
        RuntimeException - This method should normally not throw an exception. A runtime exception may be thrown when the node prototypes cannot be created for an unknown reason. When an exception is thrown, no node prototypes are made available for this handler.
      • getPrototypeTitle

        String getPrototypeTitle​(IGetElementPrototypesParams params)
        Parameters:
        params - Parameters with the current client, locale, entity context etc.
        Returns:
        The title for the element prototype, shown in the element drawer panel to the left of the workflow designer. See IElementPrototypeDescriptor.getLabel().
        Throws:
        RuntimeException - This method should normally not throw an exception. A runtime exception may be thrown when the node prototypes cannot be created for an unknown reason. When an exception is thrown, no node prototypes are made available for this handler.
      • getSubCategory

        default IElementCategory getSubCategory​(IGetElementPrototypesParams params)
        Optional sub category. When not set or this returns null, the element is shown under the category miscellaneous.
        Parameters:
        params - Parameters with the current client, locale, entity context etc.
        Returns:
        IElementCategory element's sub category, which is used for grouping the element within the given main group.
        Throws:
        RuntimeException - This method should normally not throw an exception. A runtime exception may be thrown when the node prototypes cannot be created for an unknown reason. When an exception is thrown, no node prototypes are made available for this handler.