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.gwt.shared.alias;
029
030import com.google.gwt.user.client.rpc.IsSerializable;
031
032/**
033 * A bean which contains the information for creating an alias.<p>
034 */
035public class CmsAliasBean implements IsSerializable {
036
037    /** The alias mode. */
038    private CmsAliasMode m_mode;
039
040    /** The alias site path. */
041    private String m_sitePath;
042
043    /**
044     * Default constructor, used for serialization.<p>
045     */
046    public CmsAliasBean() {
047
048        // do nothing
049    }
050
051    /**
052     * Creates a new alias bean.<p>
053     *
054     * @param sitePath the site path of the alias
055     * @param mode the alias mode
056     */
057    public CmsAliasBean(String sitePath, CmsAliasMode mode) {
058
059        m_sitePath = sitePath;
060        m_mode = mode;
061    }
062
063    /**
064     * Returns the alias mode.<p>
065     *
066     * @return the alias mode
067     */
068    public CmsAliasMode getMode() {
069
070        return m_mode;
071    }
072
073    /**
074     * Returns the site-relative alias path.<p>
075     *
076     * @return the site relative alias path
077     */
078    public String getSitePath() {
079
080        return m_sitePath;
081    }
082
083    /**
084     * Sets the alias mode.<p>
085     *
086     * @param mode the alias mode
087     */
088    public void setMode(CmsAliasMode mode) {
089
090        m_mode = mode;
091    }
092
093    /**
094     * Sets the alias site path.<p>
095     *
096     * @param sitePath the alias site path
097     */
098    public void setSitePath(String sitePath) {
099
100        m_sitePath = sitePath;
101    }
102
103}