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.ade.publish.shared; 029 030import java.util.ArrayList; 031import java.util.List; 032 033import com.google.gwt.user.client.rpc.IsSerializable; 034 035/** 036 * A publish group.<p> 037 * 038 * @since 7.6 039 */ 040public class CmsPublishGroup implements IsSerializable { 041 042 /** Flag which indicates whether the resource group is auto-selectable. */ 043 private boolean m_autoSelectable = true; 044 045 /** The group name.*/ 046 private String m_name; 047 048 /** The group resources.*/ 049 private List<CmsPublishResource> m_resources; 050 051 /** 052 * Creates a new publish group bean.<p> 053 * 054 * @param name the group name 055 * @param resources the resources 056 **/ 057 public CmsPublishGroup(String name, List<CmsPublishResource> resources) { 058 059 m_name = name; 060 m_resources = ((resources == null) 061 ? new ArrayList<CmsPublishResource>() 062 : new ArrayList<CmsPublishResource>(resources)); 063 } 064 065 /** 066 * For serialization.<p> 067 */ 068 protected CmsPublishGroup() { 069 070 // for serialization 071 } 072 073 /** 074 * Returns the name.<p> 075 * 076 * @return the name 077 */ 078 public String getName() { 079 080 return m_name; 081 } 082 083 /** 084 * Returns the resources.<p> 085 * 086 * @return the resources 087 */ 088 public List<CmsPublishResource> getResources() { 089 090 return m_resources; 091 } 092 093 /** 094 * Returns true if the GUI should be able to automatically select this group.<p> 095 * 096 * @return the value of the auto-selectable flag 097 */ 098 public boolean isAutoSelectable() { 099 100 return m_autoSelectable; 101 } 102 103 /** 104 * Sets the auto-selectable flag.<p> 105 * 106 * @param autoSelectable the new flag value 107 */ 108 public void setAutoSelectable(boolean autoSelectable) { 109 110 m_autoSelectable = autoSelectable; 111 } 112}