01: /**
02: * Licensed under the Common Development and Distribution License,
03: * you may not use this file except in compliance with the License.
04: * You may obtain a copy of the License at
05: *
06: * http://www.sun.com/cddl/
07: *
08: * Unless required by applicable law or agreed to in writing, software
09: * distributed under the License is distributed on an "AS IS" BASIS,
10: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
11: * implied. See the License for the specific language governing
12: * permissions and limitations under the License.
13: */package com.sun.facelets;
14:
15: import java.io.IOException;
16:
17: import javax.el.ELException;
18: import javax.faces.FacesException;
19: import javax.faces.component.UIComponent;
20: import javax.faces.context.FacesContext;
21:
22: /**
23: * The parent or root object in a FaceletHandler composition. The Facelet will
24: * take care of populating the passed UIComponent parent in relation to the
25: * create/restore lifecycle of JSF.
26: *
27: * @author Jacob Hookom
28: * @version $Id: Facelet.java,v 1.2 2005/08/24 04:38:58 jhook Exp $
29: */
30: public abstract class Facelet {
31:
32: /**
33: * The passed UIComponent parent will be populated/restored in accordance
34: * with the JSF 1.2 specification.
35: *
36: * @param facesContext
37: * The current FacesContext (Should be the same as
38: * FacesContext.getInstance())
39: * @param parent
40: * The UIComponent to populate in a compositional fashion. In
41: * most cases a Facelet will be base a UIViewRoot.
42: * @throws IOException
43: * @throws FacesException
44: * @throws FaceletException
45: * @throws ELException
46: */
47: public abstract void apply(FacesContext facesContext,
48: UIComponent parent) throws IOException, FacesException,
49: FaceletException, ELException;
50: }
|