001/*
002 * This library is part of OpenCms -
003 * the Open Source Content Management System
004 *
005 * Copyright (C) Alkacon Software (http://www.alkacon.com)
006 *
007 * This library is free software; you can redistribute it and/or
008 * modify it under the terms of the GNU Lesser General Public
009 * License as published by the Free Software Foundation; either
010 * version 2.1 of the License, or (at your option) any later version.
011 *
012 * This library is distributed in the hope that it will be useful,
013 * but WITHOUT ANY WARRANTY; without even the implied warranty of
014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015 * Lesser General Public License for more details.
016 *
017 * For further information about Alkacon Software, please see the
018 * company website: http://www.alkacon.com
019 *
020 * For further information about OpenCms, please see the
021 * project website: http://www.opencms.org
022 *
023 * You should have received a copy of the GNU Lesser General Public
024 * License along with this library; if not, write to the Free Software
025 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
026 */
027
028package org.opencms.ade.configuration;
029
030/**
031 * Interface for a single named configuration object that can either be merged with other configuration
032 * objects or disable a configuration object with the same name.<p>
033 *
034 * @author Georg Westenberger
035 *
036 * @version $Revision: 1.0$
037 *
038 * @since 8.0.1
039 *
040 * @param <X> the configuration object type which can be merged
041 */
042public interface I_CmsConfigurationObject<X extends I_CmsConfigurationObject<X>> {
043
044    /** Default order constant for module configurations. */
045    int DEFAULT_ORDER = 10000;
046
047    /**
048     * The name of the configuration object.<p>
049     *
050     * This name should be unique for each single configuration
051     *
052     * @return the name
053     */
054    String getKey();
055
056    /**
057     * If true, this configuration object will disable an inherited configuration object of the same name.<p>
058     *
059     * @return true if this configuration object is marked as "disabled"
060     */
061    boolean isDisabled();
062
063    /**
064     * Merges this configuration object with a child configuration object.<p>
065     *
066     * @param child the child configuration object
067     *
068     * @return the merged configuration objects
069     */
070    X merge(X child);
071}