com.sun.jsftemplating.component.factory.tree.TreeAdaptor Maven / Gradle / Ivy
/*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the license at
* https://jsftemplating.dev.java.net/cddl1.html or
* jsftemplating/cddl1.txt.
* See the License for the specific language governing
* permissions and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at jsftemplating/cddl1.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* you own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
*/
package com.sun.jsftemplating.component.factory.tree;
import java.util.List;
import java.util.Map;
import javax.faces.component.UIComponent;
import com.sun.jsftemplating.layout.descriptors.handler.Handler;
/**
* This interface defines the methods required by
* {@link DynamicTreeNodeFactory}. By providing these methods, you are
* able to interface some tree structure with the
* {@link DynamicTreeNodeFactory} so that whole or partial trees can be
* created without having to do any tree conversion work (the work is done
* by the TreeAdaptor
implementation in conjunction with the
* {@link DynamicTreeNodeFactory}).
*
* The TreeAdaptor
implementation must have a public
* static TreeAdaptor getInstance(FacesContext, LayoutComponent,
* UIComponent)
method in order to get access to an instance of the
* TreeAdaptor
instance.
*
* @author Ken Paulsen ([email protected])
*/
public interface TreeAdaptor {
/**
* This method is called shortly after
* getInstance(FacesContext, LayoutComponent, UIComponent). It
* provides a place for post-creation initialization to take occur.
*/
public void init();
/**
* Returns the model object for the top TreeNode
, this
* may contain sub TreeNode
s.
*/
public Object getTreeNodeObject();
/**
* Returns child TreeNode
s for the given
* TreeNode
model Object.
*/
public List