<commit_before>/*
 *  Copyright (c) 2016, 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.uuf.api;

import org.wso2.carbon.uuf.exception.InvalidTypeException;

import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;

/**
 * Represents a Configuration object of a particular UUF component.
 */
public class Configuration {

    // TODO: 6/8/16 Cache values of 'contextPath', 'theme', 'loginPageUri', 'menu', 'errorPages' configs
    public static final String KEY_CONTEXT_PATH = "contextPath";
    public static final String KEY_THEME = "theme";
    public static final String KEY_LOGIN_PAGE_URI = "loginPageUri";
    public static final String KEY_MENU = "menu";
    public static final String KEY_ERROR_PAGES = "errorPages";

    private final Map<String, Object> map;
    private final Map<String, Object> unmodifiableMap;

    public Configuration() {
        this.map = new HashMap<>();
        this.unmodifiableMap = Collections.unmodifiableMap(this.map);<commit_msg>changed access modifier to private of constants in Configuration class<commit_after>/*
 *  Copyright (c) 2016, 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.uuf.api;

import org.wso2.carbon.uuf.exception.InvalidTypeException;

import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;

/**
 * Represents a Configuration object of a particular UUF component.
 */
public class Configuration {

    // TODO: 6/8/16 Cache values of 'contextPath', 'theme', 'loginPageUri', 'menu', 'errorPages' configs
    private static final String KEY_CONTEXT_PATH = "contextPath";
    private static final String KEY_THEME = "theme";
    private static final String KEY_LOGIN_PAGE_URI = "loginPageUri";
    private static final String KEY_MENU = "menu";
    private static final String KEY_ERROR_PAGES = "errorPages";

    private final Map<String, Object> map;
    private final Map<String, Object> unmodifiableMap;

    public Configuration() {
        this.map = new HashMap<>();
        this.unmodifiableMap = Collections.unmodifiableMap(this.map);
{'fraction_non_alphanumeric': 0.09210526315789473, 'fraction_numerical': 0.009569377990430622, 'mean_word_length': 3.948224852071006, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '4629678', 'n_tokens_mistral': 955, 'n_tokens_neox': 935, 'n_words': 352}