libreccm/ccm-cms/src/main/java/org/librecms/ui/PageTreeNodeModel.java

79 lines
2.2 KiB
Java

/*
* 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 <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class PageTreeNodeModel {
private String categoryName;
private List<PageTreeNodeModel> children;
private boolean pageAssigned;
private Map<String, String> 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<PageTreeNodeModel> getChildren() {
return Collections.unmodifiableList(children);
}
protected void setChildren(final List<PageTreeNodeModel> children) {
this.children = new ArrayList<>(children);
}
public boolean isPageAssigned() {
return pageAssigned;
}
public void setPageAssigned(final boolean pageAssigned) {
this.pageAssigned = pageAssigned;
}
public Map<String, String> getProperties() {
return Collections.unmodifiableMap(properties);
}
public void setProperties(final Map<String, String> properties) {
this.properties = new HashMap<>(properties);
}
}