KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > forms > formmodel > ContainerDefinition


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.cocoon.forms.formmodel;
17
18 import java.util.Collection JavaDoc;
19 import java.util.List JavaDoc;
20
21 /**
22  * Interface to be implemented by WidgetDefinitions for Widgets which contain other widgets.
23  *
24  * @version $Id: ContainerDefinition.java 56582 2004-11-04 10:16:22Z sylvain $
25  */

26 public interface ContainerDefinition extends WidgetDefinition {
27
28     /**
29      * Resolve references to widget definition classes
30      */

31     public void resolve(List JavaDoc parents, WidgetDefinition parent) throws Exception JavaDoc;
32
33     /**
34      * Create a widget from a contained widget definition.
35      */

36     public void createWidget(Widget parent, String JavaDoc id);
37
38     /**
39      * Create widgets from the contained widget definitions.
40      */

41     public void createWidgets(Widget parent);
42
43     /**
44      * Adds a (sub) widget definition to this definition.
45      */

46     public void addWidgetDefinition(WidgetDefinition definition) throws Exception JavaDoc, DuplicateIdException;
47
48     /**
49      * Check if this definition contains the named definition.
50      */

51     public boolean hasWidget(String JavaDoc id);
52
53     /**
54      * Gets a (sub) widget definition from this definition.
55      */

56     public WidgetDefinition getWidgetDefinition(String JavaDoc id);
57
58     /**
59      * Gets the collection of (sub) widget definition from this definition.
60      */

61     public Collection JavaDoc getWidgetDefinitions();
62 }
63
Popular Tags