001/* 002 * Copyright 2015 Anyware Services 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.ametys.plugins.contentstree; 017 018import java.util.Collection; 019 020/** 021 * A bean to represent an element of a tree configuration 022 */ 023public class TreeConfigurationElements 024{ 025 /** The collection of content-types info */ 026 protected Collection<TreeConfigurationContentType> _contentTypesInfos; 027 /** The collection of child nodes */ 028 protected Collection<TreeConfigurationElementsChild> _childNodes; 029 030 /** 031 * Creates a tree configuration 032 * @param contentTypesInfos the association of content types supported and message bus types (content, simple-content...). At least an empty map. 033 * @param childNodes The child nodes of this element. At least an empty collection. 034 */ 035 public TreeConfigurationElements(Collection<TreeConfigurationContentType> contentTypesInfos, Collection<TreeConfigurationElementsChild> childNodes) 036 { 037 _contentTypesInfos = contentTypesInfos; 038 _childNodes = childNodes; 039 } 040 041 /** 042 * Content types infos 043 * @return A non-null collection 044 */ 045 public Collection<TreeConfigurationContentType> getContentTypesConfiguration() 046 { 047 return _contentTypesInfos; 048 } 049 050 /** 051 * Get the list of children for this elements 052 * @return A non null list of children 053 */ 054 public Collection<TreeConfigurationElementsChild> getChildren() 055 { 056 return _childNodes; 057 } 058}