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.gwt.shared;
029
030import java.util.Map;
031
032import com.google.gwt.user.client.rpc.IsSerializable;
033
034/**
035 * Client-side bean which holds information about a client variant of a template context.<p>
036 */
037public class CmsClientVariantInfo implements IsSerializable {
038
039    /** The name. */
040    private String m_name;
041
042    /** The nice name. */
043    private String m_niceName;
044
045    /** The parameters. */
046    private Map<String, String> m_parameters;
047
048    /** The screen height. */
049    private int m_screenHeight;
050
051    /** The screen width. */
052    private int m_screenWidth;
053
054    /**
055     * Creates a new instance.<p>
056     *
057     * @param name
058     * @param niceName
059     * @param screenWidth
060     * @param screenHeight
061     * @param parameters
062     */
063    public CmsClientVariantInfo(
064        String name,
065        String niceName,
066        int screenWidth,
067        int screenHeight,
068        Map<String, String> parameters) {
069
070        m_name = name;
071        m_niceName = niceName;
072        m_screenWidth = screenWidth;
073        m_screenHeight = screenHeight;
074        m_parameters = parameters;
075    }
076
077    /**
078     * Default constructor for serialization.<p>
079     */
080    protected CmsClientVariantInfo() {
081
082        // for serialization
083    }
084
085    /**
086     * Gets the internal name.<p>
087     *
088     * @return the internal name
089     */
090    public String getName() {
091
092        return m_name;
093    }
094
095    /**
096     * Gets the nice name.<p>
097     *
098     * @return the nice name
099     */
100    public String getNiceName() {
101
102        return m_niceName;
103    }
104
105    /**
106     * Gets the parameters.<p>
107     *
108     * @return the parameters
109     */
110    public Map<String, String> getParameters() {
111
112        return m_parameters;
113    }
114
115    /**
116     * Gets the screen height.<p>
117     *
118     * @return the screen height
119     */
120    public int getScreenHeight() {
121
122        return m_screenHeight;
123    }
124
125    /**
126     * Gets the screen width.<p>
127     *
128     * @return the screen width
129     */
130    public int getScreenWidth() {
131
132        return m_screenWidth;
133    }
134
135}