001/* 002 * (C) Copyright 2006-2007 Nuxeo SAS <http://nuxeo.com> and others 003 * 004 * All rights reserved. This program and the accompanying materials 005 * are made available under the terms of the Eclipse Public License v1.0 006 * which accompanies this distribution, and is available at 007 * http://www.eclipse.org/legal/epl-v10.html 008 * 009 * Contributors: 010 * Jean-Marc Orliaguet, Chalmers 011 * 012 * $Id$ 013 */ 014 015package org.nuxeo.theme.nodes; 016 017import java.util.List; 018 019public interface Node { 020 021 NodeTypeFamily getNodeTypeFamily(); 022 023 void clearParent(); 024 025 void setParent(Node node) throws NodeException; 026 027 Node getParent(); 028 029 Node addChild(Node node) throws NodeException; 030 031 void removeChild(Node node) throws NodeException; 032 033 List<Node> getChildren(); 034 035 void setChildren(List<Node> children) throws NodeException; 036 037 Integer getOrder(); 038 039 void setOrder(Integer order) throws NodeException; 040 041 void moveTo(Node container, Integer order) throws NodeException; 042 043 boolean isLeaf(); 044 045 void insertAfter(Node node) throws NodeException; 046 047 boolean hasSiblings(); 048 049 Node getNextNode(); 050 051 Node getPreviousNode(); 052 053 boolean hasChildren(); 054 055 boolean isChildOf(Node node); 056 057 void removeDescendants() throws NodeException; 058 059 List<Node> getDescendants(); 060 061 void collectDescendants(List<Node> nodes); 062 063}