KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > j2ee > sun > ws7 > j2ee > WS70OptionalFactory


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.sun.ws7.j2ee;
21
22 import javax.enterprise.deploy.spi.DeploymentManager JavaDoc;
23
24 import org.netbeans.modules.j2ee.deployment.plugins.api.FindJSPServlet;
25 import org.netbeans.modules.j2ee.deployment.plugins.api.IncrementalDeployment;
26 import org.netbeans.modules.j2ee.deployment.plugins.api.OptionalDeploymentManagerFactory;
27 import org.netbeans.modules.j2ee.deployment.plugins.api.StartServer;
28 import org.netbeans.modules.j2ee.deployment.plugins.api.TargetModuleIDResolver;
29
30 import org.openide.WizardDescriptor;
31 import org.netbeans.modules.j2ee.sun.ws7.ui.WS70ServerUIWizardIterator;
32 import org.netbeans.modules.j2ee.sun.ws7.j2ee.jsp.JSPServletFinder;
33 import org.netbeans.modules.j2ee.sun.ws7.dm.WS70SunDeploymentManager;
34
35
36 /** Factory for optional deployment functionality that a plugin can provide.
37  * Plugins need to register an isntance of this class in module layer in folder
38  * <code>J2EE/Jsr88Plugins/{plugin_name}</code>.
39  *
40  */

41 public class WS70OptionalFactory extends OptionalDeploymentManagerFactory {
42     
43     /** Create StartServer for given DeploymentManager.
44      * The instance returned by this method till be cached by the j2eeserver.
45      */

46     public StartServer getStartServer (DeploymentManager JavaDoc dm) {
47         return new WS70StartServer(dm);
48     }
49     
50     /** Create IncrementalDeployment for given DeploymentManager.
51      * The instance returned by this method till be cached by the j2eeserver.
52      */

53     public IncrementalDeployment getIncrementalDeployment (DeploymentManager JavaDoc dm) {
54         return null; //TBD
55
}
56     
57     
58     /** Create FindJSPServlet for given DeploymentManager.
59      * The instance returned by this method will be cached by the j2eeserver.
60      */

61     public FindJSPServlet getFindJSPServlet (DeploymentManager JavaDoc dm) {
62         // can view Servlet for JSP if server is colocated.
63
if(((WS70SunDeploymentManager)dm).isLocalServer()){
64             return new JSPServletFinder(dm);
65         }else{
66             return null;
67         }
68         
69     }
70     
71     
72     /** Create AutoUndeploySupport for the given DeploymentManager.
73      * The instance returned by this method will be cached by the j2eeserver.
74      */

75     public TargetModuleIDResolver getTargetModuleIDResolver(DeploymentManager JavaDoc dm) {
76                                 // XXX
77
return null;
78     }
79     
80     public WizardDescriptor.InstantiatingIterator getAddInstanceIterator() {
81         return new WS70ServerUIWizardIterator();
82     }
83 }
84
Popular Tags