All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opencms.ade.containerpage.shared.CmsContainer Maven / Gradle / Ivy

Go to download

OpenCms is an enterprise-ready, easy to use website content management system based on Java and XML technology. Offering a complete set of features, OpenCms helps content managers worldwide to create and maintain beautiful websites fast and efficiently.

There is a newer version: 18.0
Show newest version
/*
 * This library is part of OpenCms -
 * the Open Source Content Management System
 *
 * Copyright (c) Alkacon Software GmbH (http://www.alkacon.com)
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * For further information about Alkacon Software, please see the
 * company website: http://www.alkacon.com
 *
 * For further information about OpenCms, please see the
 * project website: http://www.opencms.org
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

package org.opencms.ade.containerpage.shared;

import java.util.List;

import com.google.gwt.user.client.rpc.IsSerializable;

/**
 * Container bean.

* * @since 8.0.0 */ public class CmsContainer implements IsSerializable { /** List of the contained elements id's. */ private List m_elements; /** The maximum number of elements. */ private int m_maxElements; /** The container name. */ private String m_name; /** The container type. */ private String m_type; /** The width of the container. */ private int m_width; /** Flag indicating this container is used for detail views. */ private boolean m_detailView; /** * Constructor.

* * @param name the container name, also used as id within a container-page * @param type the container type * @param width the width of the container * @param maxElements the maximum number of elements displayed by this container * @param detailView flag indicating this container is used for detail views * @param elements the container elements id's */ public CmsContainer( String name, String type, int width, int maxElements, boolean detailView, List elements) { m_elements = elements; m_name = name; m_type = type; m_maxElements = maxElements; m_width = width; m_detailView = detailView; } /** * Returns if this container is used for detail views.

* * @return true if this container is used for detail views */ public boolean isDetailView() { return m_detailView; } /** * Hidden default constructor (for GWT serialization).

*/ protected CmsContainer() { // do nothing } /** * Returns the list of the contained elements id's.

* * @return the list of the contained elements id's */ public List getElements() { return m_elements; } /** * Returns the maximum number of elements allowed in this container.

* * @return the maximum number of elements allowed in this container */ public int getMaxElements() { return m_maxElements; } /** * Returns the container name, also used as HTML-id for the container DOM-element. Has to be unique within the template.

* * @return the container name */ public String getName() { return m_name; } /** * Returns the container type. Used to determine the formatter used to render the contained elements.

* * @return the container type */ public String getType() { return m_type; } /** * Returns the container width.

* * @return the container width */ public int getWidth() { return m_width; } /** * Sets the elements contained in this container.

* * @param elements the elements */ public void setElements(List elements) { m_elements = elements; } /** * Sets the maxElements.

* * @param maxElements the maxElements to set */ public void setMaxElements(int maxElements) { m_maxElements = maxElements; } /** * Sets the name.

* * @param name the name to set */ public void setName(String name) { m_name = name; } /** * Sets the type.

* * @param type the type to set */ public void setType(String type) { m_type = type; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy