/* * Copyright (C) 2021 LibreCCM Foundation. * * 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. * * 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., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301 USA */ package org.librecms.ui; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; /** * * @author Jens Pelzetter */ public class PageTreeNodeModel { private String categoryName; private List children; private boolean pageAssigned; private Map properties; public PageTreeNodeModel() { children = new ArrayList<>(); properties = new HashMap<>(); } public String getCategoryName() { return categoryName; } protected void setCategoryName(final String categoryName) { this.categoryName = categoryName; } public List getChildren() { return Collections.unmodifiableList(children); } protected void setChildren(final List children) { this.children = new ArrayList<>(children); } public boolean isPageAssigned() { return pageAssigned; } public void setPageAssigned(final boolean pageAssigned) { this.pageAssigned = pageAssigned; } public Map getProperties() { return Collections.unmodifiableMap(properties); } public void setProperties(final Map properties) { this.properties = new HashMap<>(properties); } }