KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > api > web > dd > common > RootInterface


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.api.web.dd.common;
21
22 import org.netbeans.modules.schema2beans.BaseBean;
23 /**
24  * Interface representing the root of interfaces bean tree structure.
25  *
26  *<p><b><font color="red"><em>Important note: Do not provide an implementation of this interface unless you are a DD API provider!</em></font></b>
27  *</p>
28  *
29  * @deprecated Use the API for web module deployment descriptor in j2ee/ddapi module.
30  * @author Milan Kuchtiak
31  */

32 public interface RootInterface extends ComponentInterface {
33     /**
34      * Used in {@link #merge} method.<br>
35      * The result of merge operation is the intersection of graphs.
36      */

37     public static final int MERGE_INTERSECT = BaseBean.MERGE_INTERSECT;
38     /**
39      * Used in {@link #merge} method.<br>
40      * The result of merge operation is the union of graphs.
41      */

42     public static final int MERGE_UNION = BaseBean.MERGE_UNION;
43     /**
44      * Used in {@link #merge} method.<br>
45      * The result of merge operation is the first graph updated with the changes in another graph.
46      */

47     public static final int MERGE_UPDATE = BaseBean.MERGE_UPDATE;
48     
49     /**
50      * Writes the deployment descriptor data from deployment descriptor bean graph to file object.<br>
51      * This is more convenient method than {@link org.netbeans.api.web.dd.common.CommonDDBean#write} method.<br>
52      * The locking problems are solved for the user in this method.
53      *
54      * @param fo File Object where to write the content of depl.descriptor holding in bean tree structure
55      */

56     public void write(org.openide.filesystems.FileObject fo) throws java.io.IOException JavaDoc ;
57     
58     /**
59      * Merging two bean tree structures together.<pre>
60      *
61      *There are several ways odf merging :
62      *
63      * Let's define:
64      * G1 the current graph and G2 the new graph we want to merge
65      * E1 the set of element of G1 that don't exist anymore in G2.
66      * E2 the set of new elements of G2 that don't exist in G1.
67      *
68      * Then,
69      * MERGE_UPDATE is G1 - E1 + E2 (G1 becomes G2)
70      * MERGE_UNION is G1 U G2 <=> G1 + E2
71      * MERGE_INTERSECT is G1 n G2 <=> (G1 U G2) - E1 - E2
72      *</pre>
73      * @param bean root of the bean graph that is merged with actual bean graph
74      * @param mode type of merging (INTERSECT, UNION, UPDATE)
75      */

76     public void merge(RootInterface root, int mode);
77 }
78
Popular Tags