KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > j2ee > dd > api > common > DescriptionInterface


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.modules.j2ee.dd.api.common;
21 /**
22  * Super interface for all DD elements having the description property/properties.
23  *
24  *<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>
25  *</p>
26  *
27  * @author Milan Kuchtiak
28  */

29 public interface DescriptionInterface {
30
31     /**
32      * Sets the description element for particular locale.<br>
33      * If locale=null the method sets the description element without xml:lang attribute.<br>
34      * If description=null method removes the description element for a specified locale.<br>
35      *
36      * @param locale string representing the locale - the value for xml:lang attribute e.g. "fr"
37      * @param description value for description element
38      */

39     public void setDescription(String JavaDoc locale, String JavaDoc description) throws VersionNotSupportedException;
40     
41     /**
42      * Sets the description element without xml:lang attribute.
43      *
44      * @param description value for description element
45      */

46     public void setDescription(String JavaDoc description);
47
48     /**
49      * Sets the multiple description elements.
50      *
51      * @param descriptions Map of descriptions in the form of [locale,description]
52      */

53     public void setAllDescriptions(java.util.Map JavaDoc descriptions) throws VersionNotSupportedException;
54     
55     /**
56      * Returns the description element value for particular locale.<br>
57      * If locale=null method returns description for default locale.
58      *
59      * @param locale string representing the locale - the value of xml:lang attribute e.g. "fr".
60      * @return description element value or null if not specified for given locale
61      */

62     public String JavaDoc getDescription(String JavaDoc locale) throws VersionNotSupportedException;
63
64     /**
65      * Returns the description element value for default locale.
66      *
67      * @return description element value or null if not specified for default locale
68      */

69     public String JavaDoc getDefaultDescription();
70
71     /**
72      * Returns all description elements in the form of <@link java.util.Map>.
73      *
74      * @return map of all descriptions in the form of [locale:description]
75      */

76     public java.util.Map JavaDoc getAllDescriptions();
77     
78     /**
79      * Removes the description element for particular locale.
80      * If locale=null the method removes the description element for default locale.
81      *
82      * @param locale string representing the locale - the value of xml:lang attribute e.g. "fr"
83      */

84     public void removeDescriptionForLocale(String JavaDoc locale) throws VersionNotSupportedException;
85     
86     /**
87      * Removes description element for default locale.
88      */

89     public void removeDescription();
90     
91     /**
92      * Removes all description elements from DD element.
93      */

94     public void removeAllDescriptions();
95
96 }
97
Popular Tags