Source Code Cross Referenced for J2eePlatformImpl.java in  » 6.0-JDK-Core » j2eeserver » org » netbeans » modules » j2ee » deployment » plugins » spi » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » j2eeserver » org.netbeans.modules.j2ee.deployment.plugins.spi 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001        /*
002         * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003         *
004         * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005         *
006         * The contents of this file are subject to the terms of either the GNU
007         * General Public License Version 2 only ("GPL") or the Common
008         * Development and Distribution License("CDDL") (collectively, the
009         * "License"). You may not use this file except in compliance with the
010         * License. You can obtain a copy of the License at
011         * http://www.netbeans.org/cddl-gplv2.html
012         * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013         * specific language governing permissions and limitations under the
014         * License.  When distributing the software, include this License Header
015         * Notice in each file and include the License file at
016         * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
017         * particular file as subject to the "Classpath" exception as provided
018         * by Sun in the GPL Version 2 section of the License file that
019         * accompanied this code. If applicable, add the following below the
020         * License Header, with the fields enclosed by brackets [] replaced by
021         * your own identifying information:
022         * "Portions Copyrighted [year] [name of copyright owner]"
023         *
024         * Contributor(s):
025         *
026         * The Original Software is NetBeans. The Initial Developer of the Original
027         * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
028         * Microsystems, Inc. All Rights Reserved.
029         *
030         * If you wish your version of this file to be governed by only the CDDL
031         * or only the GPL Version 2, indicate your decision by adding
032         * "[Contributor] elects to include this software in this distribution
033         * under the [CDDL or GPL Version 2] license." If you do not indicate a
034         * single choice of license, a recipient has the option to distribute
035         * your version of this file under either the CDDL, the GPL Version 2 or
036         * to extend the choice of license to its licensees as provided above.
037         * However, if you add GPL Version 2 code and therefore, elected the GPL
038         * Version 2 license, then the option applies only if the new code is
039         * made subject to such option by the copyright holder.
040         */
041
042        package org.netbeans.modules.j2ee.deployment.plugins.spi;
043
044        import java.awt.Image;
045        import java.beans.PropertyChangeListener;
046        import java.beans.PropertyChangeSupport;
047        import java.io.File;
048        import java.util.Set;
049        import org.netbeans.api.java.platform.JavaPlatform;
050        import org.netbeans.spi.project.libraries.LibraryImplementation;
051
052        /**
053         * Base SPI interface for J2eePlatform. The J2eePlatform describes the target
054         * environment J2EE applications are build against and subsequently deployed to.
055         * Each server instance defines its own J2EE platform.
056         *
057         * @author Stepan Herold
058         * @since 1.5
059         */
060        public abstract class J2eePlatformImpl {
061
062            /** Display name property */
063            public static final String PROP_DISPLAY_NAME = "displayName"; //NOI18N
064            /** Libraries property */
065            public static final String PROP_LIBRARIES = "libraries"; //NOI18N
066            /** Platform roots property */
067            public static final String PROP_PLATFORM_ROOTS = "platformRoots"; //NOI18N
068
069            private PropertyChangeSupport supp;
070
071            /**
072             * Return platform's libraries.
073             *
074             * @return platform's libraries.
075             */
076            public abstract LibraryImplementation[] getLibraries();
077
078            /**
079             * Return platform's display name.
080             *
081             * @return platform's display name.
082             */
083            public abstract String getDisplayName();
084
085            /**
086             * Return an icon describing the platform. This will be mostly the icon
087             * used for server instance nodes 
088             * 
089             * @return an icon describing the platform
090             * @since 1.6
091             */
092            public abstract Image getIcon();
093
094            /**
095             * Return platform's root directories. This will be mostly server's installation
096             * directory.
097             *
098             * @return platform's root directories.
099             */
100            public abstract File[] getPlatformRoots();
101
102            /**
103             * Return classpath for the specified tool. Use the tool constants declared 
104             * in the {@link org.netbeans.modules.j2ee.deployment.devmodules.api.J2eePlatform}.
105             *
106             * @param  toolName tool name, for example {@link org.netbeans.modules.j2ee.deployment.devmodules.api.J2eePlatform#TOOL_APP_CLIENT_RUNTIME}.
107             * @return classpath for the specified tool.
108             */
109            public abstract File[] getToolClasspathEntries(String toolName);
110
111            /**
112             * Specifies whether a tool of the given name is supported by this platform.
113             * Use the tool constants declared in the {@link org.netbeans.modules.j2ee.deployment.devmodules.api.J2eePlatform}.
114             *
115             * @param  toolName tool name, for example {@link org.netbeans.modules.j2ee.deployment.devmodules.api.J2eePlatform#TOOL_APP_CLIENT_RUNTIME}
116             * .
117             * @return <code>true</code> if platform supports tool of the given name, 
118             *         <code>false</code> otherwise.
119             */
120            public abstract boolean isToolSupported(String toolName);
121
122            /**
123             * Return a list of supported J2EE specification versions. Use J2EE specification 
124             * versions defined in the {@link org.netbeans.modules.j2ee.deployment.devmodules.api.J2eeModule}
125             * class.
126             *
127             * @return list of supported J2EE specification versions.
128             */
129            public abstract Set/*<String>*/getSupportedSpecVersions();
130
131            /**
132             * Return a list of supported J2EE specification versions for
133             * a given module type.
134             *
135             * Implement this method if the server supports different versions
136             * of spec for different types of modules.
137             * If this method is not implemented by the plugin the IDE
138             * will use the non parametrized version of
139             * getSupportedSpecVersions.
140             *
141             * @param moduleType one of the constants defined in 
142             *   {@link org.netbeans.modules.j2ee.deployment.devmodules.api.J2eeModule}
143             * @return list of supported J2EE specification versions.
144             */
145            public Set<String> getSupportedSpecVersions(Object moduleType) {
146                return getSupportedSpecVersions();
147            }
148
149            /**
150             * Return a list of supported J2EE module types. Use module types defined in the 
151             * {@link org.netbeans.modules.j2ee.deployment.devmodules.api.J2eeModule}
152             * class.
153             *
154             * @return list of supported J2EE module types.
155             */
156            public abstract Set/*<Object>*/getSupportedModuleTypes();
157
158            /**
159             * Return a set of J2SE platform versions this J2EE platform can run with.
160             * Versions should be specified as strings i.g. ("1.3", "1.4", etc.)
161             *
162             * @since 1.9
163             */
164            public abstract Set/*<String>*/getSupportedJavaPlatformVersions();
165
166            /**
167             * Return server J2SE platform or null if the platform is unknown, not 
168             * registered in the IDE.
169             *
170             * @return server J2SE platform or null if the platform is unknown, not 
171             *         registered in the IDE.
172             *
173             * @since 1.9
174             */
175            public abstract JavaPlatform getJavaPlatform();
176
177            /**
178             * Register a listener which will be notified when some of the platform's properties
179             * change.
180             * 
181             * @param l listener which should be added.
182             */
183            public final void addPropertyChangeListener(PropertyChangeListener l) {
184                synchronized (this ) {
185                    if (supp == null)
186                        supp = new PropertyChangeSupport(this );
187                }
188                supp.addPropertyChangeListener(l);
189            }
190
191            /**
192             * Remove a listener registered previously.
193             *
194             * @param l listener which should be removed.
195             */
196            public final void removePropertyChangeListener(
197                    PropertyChangeListener l) {
198                if (supp != null)
199                    supp.removePropertyChangeListener(l);
200            }
201
202            /** 
203             * Fire PropertyChange to all registered PropertyChangeListeners.
204             *
205             * @param propName property name.
206             * @param oldValue old value.
207             * @param newValue new value.
208             */
209            public final void firePropertyChange(String propName,
210                    Object oldValue, Object newValue) {
211                if (supp != null)
212                    supp.firePropertyChange(propName, oldValue, newValue);
213            }
214
215            /**
216             * Returns the property value for the specified tool.
217             * <p>
218             * The property value uses Ant property format and therefore may contain 
219             * references to another properties defined either by the client of this API 
220             * or by the tool itself.
221             * <p>
222             * The properties the client may be requited to define are as follows
223             * {@link org.netbeans.modules.j2ee.deployment.devmodules.api.J2eePlatform#CLIENT_PROP_DIST_ARCHIVE}
224             * 
225             * @param toolName tool name, for example {@link org.netbeans.modules.j2ee.deployment.devmodules.api.J2eePlatform#TOOL_APP_CLIENT_RUNTIME}.
226             * @param propertyName tool property name, for example {@link org.netbeans.modules.j2ee.deployment.devmodules.api.J2eePlatform#TOOL_PROP_MAIN_CLASS}.
227             *
228             * @return property value or null, if the property is not defined for the 
229             *         specified tool.
230             *         
231             * @since 1.16
232             */
233            public String getToolProperty(String toolName, String propertyName) {
234                return null;
235            }
236        }
w__w__w__.__j_a_v__a2s__.__c__om | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.