/*
 * Copyright 2015-2017 Atomist Inc.
 *
 * 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.
 */

import { TreeNode, GraphNode, FormatInfo, PathExpressionEngine } from "@atomist/rug/tree/PathExpression";
import { ProjectContext } from "@atomist/rug/operations/ProjectEditor";
import { FileArtifactBacked } from "./FileArtifactBacked";
import { MutableView } from "./MutableView";
export { Properties };

/**
 * Java properties file
 */
interface Properties extends FileArtifactBacked, MutableView {

    /**
     * Return whether a property key exists in this file or not
     *
     * @param key {string} The key of the property being searched for
     * @returns {boolean}
     */
    containsKey(key: string): boolean;

    /**
     * Return whether a property value exists in this file or not
     *
     * @param value {string} The value being searched for
     * @returns {boolean}
     */
    containsValue(value: string): boolean;

    /**
     * Return the content of this property
     *
     * @param key {string} The name of the simple node
     * @returns {string}
     */
    getValue(key: string): string;

    /**
     * Return a list of the supported keys
     *
     * @returns {any[]}
     */
    keys(): any[];

    /**
     * Set the value of the specified property, creating a property if not present
     *
     * @param key {string} The key of the property being set
     * @param value {string} The value of the property
     */
    setProperty(key: string, value: string): void;

}
