/*
 *  Copyright (c) 2005-2009, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
 *
 *  WSO2 Inc. licenses this file to you under the Apache License,
 *  Version 2.0 (the "License"); you may not use this file except
 *  in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing,
 *  software distributed under the License is distributed on an
 *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 *  KIND, either express or implied.  See the License for the
 *  specific language governing permissions and limitations
 *  under the License.
 *
 */
package org.wso2.carbon.governance.generic.ui.utils;

import javax.servlet.ServletConfig;
import javax.servlet.http.HttpServletRequest;

/**
 * By implementing this interface, you can get data to be automatically populated for a drop down
 * field.
 */
public interface DropDownDataPopulator {

    /**
     * Method to obtain the list of strings to be displayed in ascending order.
     *
     * @param request The HTTP request that was made.
     * @param config  The HTTP servlet configuration.
     * @return the list of strings.
     */
    public String[] getList(HttpServletRequest request, ServletConfig config);

}

/*
 *  Copyright (c) 2005-2009, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
 *
 *  WSO2 Inc. licenses this file to you under the Apache License,
 *  Version 2.0 (the "License"); you may not use this file except
 *  in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing,
 *  software distributed under the License is distributed on an
 *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 *  KIND, either express or implied.  See the License for the
 *  specific language governing permissions and limitations
 *  under the License.
 *
 */
package org.wso2.carbon.governance.generic.ui.utils;

import org.wso2.carbon.registry.core.Registry;

import javax.servlet.ServletConfig;
import javax.servlet.http.HttpServletRequest;

/**
 * By implementing this interface, you can get data to be automatically populated for a drop down
 * field.
 */
public interface DropDownDataPopulator {

    /**
     * Method to obtain the list of strings to be displayed in ascending order.
     *
     * @param request The HTTP request that was made.
     * @param config  The HTTP servlet configuration.
     * @return the list of strings.
     */
    public String[] getList(HttpServletRequest request, ServletConfig config);

    /**
     * Method to obtain the list of strings to be displayed in ascending order.
     *
     * @param uuid UUID of the resource
     * @param path path of the resource
     * @param registry  Registry instance.
     * @return the list of strings.
     */
    public String[] getList(String uuid, String path, Registry registry);

}

Add publihser getList method into DataPopulator interface