/*
 * Copyright 2020 Red Hat, Inc. and/or its affiliates.
 *
 * Licensed 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.kie.server.services.optaplanner;

import java.util.Arrays;
import java.util.List;

import org.kie.server.api.model.KieServerConfigItem;
import org.kie.server.api.model.KieServerConfigProvider;

/**
 * Test class for being used by the SolverServiceBaseTest.
 */
public class TestConfigProvider1 implements KieServerConfigProvider {

    public static final String PACKAGE1 = "TestConfigProvider1.PACKAGE1";
    public static final String PACKAGE2 = "TestConfigProvider1.PACKAGE2";
    public static final String PACKAGE3 = "TestConfigProvider1.PACKAGE3";

    @Override
    public List<KieServerConfigItem> getItems() {
        String value1 = PACKAGE1 + "  ,  " + PACKAGE2;
        String value2 = "  " + PACKAGE3 + " ";
        return Arrays.asList(new KieServerConfigItem(SolverServiceBase.SCAN_EXCLUDED_PACKAGES_CONFIG_ITEM,
                                                     value1,
                                                     String.class.getName()),
                             new KieServerConfigItem(SolverServiceBase.SCAN_EXCLUDED_PACKAGES_CONFIG_ITEM,
                                                     value2,
                                                     String.class.getName()));
    }
}
