Class EndpointHelper


  • public final class EndpointHelper
    extends Object
    • Method Detail

      • labelAsGroupName

        public static String labelAsGroupName​(String label,
                                              boolean consumerOnly,
                                              boolean producerOnly)
        Returns the group name from the given label.

        The group name is a single name deducted from the label. The label can contain multiple names separated by comma. The group is the best guess as a group of those labels, so similar labels can be combined into the same group.

        Parameters:
        label - the label
        consumerOnly - whether the component is consumer only
        producerOnly - whether the component is producer only
        Returns:
        the group name
      • createGroupAndLabelComparator

        public static Comparator<org.apache.camel.tooling.model.BaseOptionModel> createGroupAndLabelComparator()
        A comparator to sort the endpoint/component options according to group and label.
      • createPathComparator

        public static Comparator<org.apache.camel.tooling.model.BaseOptionModel> createPathComparator​(String syntax)
        A comparator to sort the endpoint paths according to syntax.
        Parameters:
        syntax - the endpoint uri syntax
      • createOverallComparator

        public static Comparator<org.apache.camel.tooling.model.BaseOptionModel> createOverallComparator​(String syntax)
        A comparator to sort endpoints options: first paths according to the path comparator, then parameters according to their group and label.
        Parameters:
        syntax - the endpoint uri syntax