001/**
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements.  See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License.  You may obtain a copy of the License at
008 *
009 *      http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017package org.apache.camel.spi;
018
019import java.util.List;
020
021import org.apache.camel.ComponentConfiguration;
022
023/**
024 * A helper interface used by the {@link org.apache.camel.ComponentConfiguration#completeEndpointPath(String)} method
025 * to allow endpoint paths to be completed.
026 *
027 * {@link org.apache.camel.Component} implementations should try to implement this API to make your component
028 * behave nicer in command line, IDE and web based tools.
029 */
030public interface EndpointCompleter {
031
032    /**
033     * Given the configuration and completion text, return a list of possible completion values
034     * for a command line, IDE or web based tool.
035     *
036     * @returns the list of completion values if any (rather like bash completion, prefix values can be returned
037     * - such as just the directories in the current path rather than returning every possible file name on a disk).
038     */
039    List<String> completeEndpointPath(ComponentConfiguration configuration, String completionText);
040}