KickJava   Java API By Example, From Geeks To Geeks.

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


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 display-name 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 DisplayNameInterface {
30
31     /**
32      * Sets the display-name element value for particular locale.<br>
33      * If locale=null the method sets the display-name element without xml:lang attribute.<br>
34      * If displayName=null method removes the display-name 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 displayName value for display-name element
38      */

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

46     public void setDisplayName(String JavaDoc displayName);
47     
48     /**
49      * Sets the multiple display-name elements.
50      *
51      * @param displayNames Map of display names in the form of [locale,display-name]
52      */

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

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

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

76     public java.util.Map JavaDoc getAllDisplayNames();
77     
78     /**
79      * Removes the display-name element for particular locale.
80      * If locale=null the method removes the display-name 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 removeDisplayNameForLocale(String JavaDoc locale) throws VersionNotSupportedException;
85     
86     /**
87      * Removes display-name element for default locale.
88      */

89     public void removeDisplayName();
90     
91     /**
92      * Removes all display-name elements from DD element.
93      */

94     public void removeAllDisplayNames();
95 }
96
Popular Tags