<commit_before>/*
 *  Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
 *
 *  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.wso2.carbon.identity.configuration.mgt.core;

import org.wso2.carbon.identity.configuration.mgt.core.exception.ConfigurationManagementException;
import org.wso2.carbon.identity.configuration.mgt.core.model.Attribute;
import org.wso2.carbon.identity.configuration.mgt.core.model.Resource;
import org.wso2.carbon.identity.configuration.mgt.core.model.ResourceAdd;
import org.wso2.carbon.identity.configuration.mgt.core.model.ResourceFile;
import org.wso2.carbon.identity.configuration.mgt.core.model.ResourceType;
import org.wso2.carbon.identity.configuration.mgt.core.model.ResourceTypeAdd;
import org.wso2.carbon.identity.configuration.mgt.core.model.Resources;
import org.wso2.carbon.identity.configuration.mgt.core.search.Condition;

import java.io.InputStream;
import java.util.List;

/**
 * Resource manager service interface.
 */
public interface ConfigurationManager {

    /**
     * This API is used to get resources from all the tenants filtered with the {@link Condition}.
     *
     * @param searchCondition {@link Condition} representing a search filter for resources.
     * @return {@link Resources} object with a collection of resources matching to the given {@link Condition}.
     * @throws ConfigurationManagementException Configuration Management Exception.
     */
    Resources getTenantResources(Condition searchCondition) throws ConfigurationManagementException;

    /**
     * This API is used to get resources from a specific tenant filtered with the {@link Condition}.
     *
     * @param tenantDomain    Tenant domain.
     * @param searchCondition {@link Condition} representing a search filter for resources.
     * @return {@link Resources} object with a collection of resources matching to the given {@link Condition}.
     * @throws ConfigurationManagementException Configuration Management Exception.<commit_msg>Address comments<commit_after>/*
 *  Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
 *
 *  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.wso2.carbon.identity.configuration.mgt.core;

import org.wso2.carbon.identity.application.mgt.listener.AbstractApplicationMgtListener;
import org.wso2.carbon.identity.configuration.mgt.core.exception.ConfigurationManagementException;
import org.wso2.carbon.identity.configuration.mgt.core.model.Attribute;
import org.wso2.carbon.identity.configuration.mgt.core.model.Resource;
import org.wso2.carbon.identity.configuration.mgt.core.model.ResourceAdd;
import org.wso2.carbon.identity.configuration.mgt.core.model.ResourceFile;
import org.wso2.carbon.identity.configuration.mgt.core.model.ResourceType;
import org.wso2.carbon.identity.configuration.mgt.core.model.ResourceTypeAdd;
import org.wso2.carbon.identity.configuration.mgt.core.model.Resources;
import org.wso2.carbon.identity.configuration.mgt.core.search.Condition;

import java.io.InputStream;
import java.util.List;

/**
 * Resource manager service interface.
 */
public interface ConfigurationManager {

    /**
     * This API is used to get resources from all the tenants filtered with the {@link Condition}.
     *
     * @param searchCondition {@link Condition} representing a search filter for resources.
     * @return {@link Resources} object with a collection of resources matching to the given {@link Condition}.
     * @throws ConfigurationManagementException Configuration Management Exception.
     * @deprecated use {@link ConfigurationManager#getTenantResources(String, Condition)} method.
     */
    @Deprecated
    Resources getTenantResources(Condition searchCondition) throws ConfigurationManagementException;

    /**
     * This API is used to get resources from a specific tenant filtered with the {@link Condition}.
     *
     * @param tenantDomain    Tenant domain.
     * @param searchCondition {@link Condition} representing a search filter for resources.
     * @return {@link Resources} object with a collection of resources matching to the given {@link Condition}.
     * @throws ConfigurationManagementException Configuration Management Exception.
{'fraction_non_alphanumeric': 0.0873952779893374, 'fraction_numerical': 0.007806549885757807, 'mean_word_length': 4.365679264555669, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7256361', 'n_tokens_mistral': 1372, 'n_tokens_neox': 1340, 'n_words': 449}