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 * Bean for a content type
022 */
023public class TreeConfigurationContentType
024{
025    /** Can be a root node */
026    protected final boolean _canBeRoot;
027    /** The content types ids */
028    protected final Collection<String> _contentTypesIds;
029    /** The message bus type */
030    protected final String _messageBusType;
031    
032    /**
033     * Creates the bean
034     * @param canBeRoot Can be root ?
035     * @param contentTypesIds The content type ids
036     * @param messageBusType The message bus type
037     */
038    public TreeConfigurationContentType(boolean canBeRoot, Collection<String> contentTypesIds, String messageBusType)
039    {
040        _canBeRoot = canBeRoot;
041        _contentTypesIds = contentTypesIds;
042        _messageBusType = messageBusType;
043    }
044
045    /**
046     * Can this content type be root
047     * @return true if this node can be root
048     */
049    public boolean canBeRoot()
050    {
051        return _canBeRoot;
052    }
053    
054    /**
055     * Get the content ids
056     * @return the content ids
057     */
058    public Collection<String> getContentTypesIds()
059    {
060        return _contentTypesIds;
061    }
062    
063    /**
064     * Get the message bus type
065     * @return the message bus type
066     */
067    public String getMessageBusType()
068    {
069        return _messageBusType;
070    }
071}