001/*
002 * This library is part of OpenCms -
003 * the Open Source Content Management System
004 *
005 * Copyright (c) Alkacon Software GmbH & Co. KG (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.util;
029
030/**
031 * Represents a single HTML converter configuration as defined in the OpenCms configuration file <code>opencms-vfs.xml</code>.<p>
032 *
033 * This is only used to write back the definitions to the configuration file.<p>
034 */
035public class CmsHtmlConverterOption {
036
037    /** The class used for HTML conversion of the configured option. */
038    private String m_className;
039
040    /** Flag indicating if this is an automatically generated default option. */
041    private boolean m_default;
042
043    /** The name of the configured option. */
044    private String m_name;
045
046    /**
047     * Constructor, with parameters.<p>
048     *
049     * @param name the name of the configured option
050     * @param className the class used for HTML conversion of the configured option
051     */
052    public CmsHtmlConverterOption(String name, String className) {
053
054        this(name, className, false);
055    }
056
057    /**
058     * Constructor, with parameters.<p>
059     *
060     * @param name the name of the configured option
061     * @param className the class used for HTML conversion of the configured option
062     * @param isDefault the flag indicating if this is an automatically generated default option
063     */
064    public CmsHtmlConverterOption(String name, String className, boolean isDefault) {
065
066        m_name = name;
067        m_className = className;
068        m_default = isDefault;
069    }
070
071    /**
072     * Returns the class used for HTML conversion of the configured option.<p>
073     *
074     * @return the class used for HTML conversion of the configured option
075     */
076    public String getClassName() {
077
078        return m_className;
079    }
080
081    /**
082     * Returns the name of the configured option.<p>
083     *
084     * @return the name of the configured option
085     */
086    public String getName() {
087
088        return m_name;
089    }
090
091    /**
092     * Returns if the option is an automatically generated default option.<p>
093     *
094     * @return <code>true</code> if the option is an automatically generated default option, otherwise <code>false</code>
095     */
096    public boolean isDefault() {
097
098        return m_default;
099    }
100
101}