KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > api > web > dd > 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.api.web.dd.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  * @deprecated Use the API for web module deployment descriptor in j2ee/ddapi module.
28  * @author Milan Kuchtiak
29  */

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

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

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

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

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

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

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

85     public void removeDisplayNameForLocale(String JavaDoc locale) throws VersionNotSupportedException;
86     
87     /**
88      * Removes display-name element for default locale.
89      */

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

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