Package org.apache.camel.maven.packaging
Class EndpointHelper
- java.lang.Object
-
- org.apache.camel.maven.packaging.EndpointHelper
-
public final class EndpointHelper extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Comparator<org.apache.camel.tooling.model.BaseOptionModel>
createGroupAndLabelComparator()
A comparator to sort the endpoint/component options according to group and label.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.static Comparator<org.apache.camel.tooling.model.BaseOptionModel>
createPathComparator(String syntax)
A comparator to sort the endpoint paths according to syntax.static String
labelAsGroupName(String label, boolean consumerOnly, boolean producerOnly)
Returns the group name from the given label.
-
-
-
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 labelconsumerOnly
- whether the component is consumer onlyproducerOnly
- 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
-
-