KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > j2ee > websphere6 > optional > WSOptionalDeploymentManagerFactory


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 package org.netbeans.modules.j2ee.websphere6.optional;
20
21 import javax.enterprise.deploy.spi.*;
22
23 import org.openide.WizardDescriptor.*;
24 import org.netbeans.modules.j2ee.deployment.plugins.api.*;
25
26 import org.netbeans.modules.j2ee.websphere6.ui.wizard.*;
27
28 /**
29  * An entry point to the plugin's optional functionality, such as server
30  * start/stop, incremental deployment, custom wizard for instance addition and
31  * the ability to locate the servlet for a jsp page.
32  *
33  * @author Kirill Sorokin
34  */

35 public class WSOptionalDeploymentManagerFactory extends
36         OptionalDeploymentManagerFactory {
37     
38     /**
39      * Returns an object responsible for starting a particular server instance.
40      * The information about the instance is fetched from the supplied
41      * deployment manager.
42      *
43      * @param dm the server's deployment manager
44      *
45      * @return an object for starting/stopping the server
46      */

47     public StartServer getStartServer(DeploymentManager dm) {
48         return new WSStartServer(dm);
49     }
50     
51     /**
52      * Returns an object responsible for performing incremental deployment on
53      * a particular server instance. The instance information should be fetched
54      * from the supplied deployment manager.
55      * We do not support that, thus return null
56      *
57      * @param dm the server's deployment manager
58      *
59      * @return an object for performing the incremental deployment, i.e. null
60      */

61     public IncrementalDeployment getIncrementalDeployment(DeploymentManager dm) {
62         return null;
63     }
64     
65     /**
66      * Returns an object responsible for finding a corresponsing servlet for a
67      * given jsp deployed on a particular server instance. Instance data should
68      * be fetched from the supplied deployment manager.
69      * We do not support that, thus return null
70      *
71      * @param dm the server's deployment manager
72      *
73      * @return an object for finding the servlet, i.e. null
74      */

75     public FindJSPServlet getFindJSPServlet(DeploymentManager dm) {
76         return null;
77     }
78     
79     /**
80      * Returns an instance of the custom wizard for adding a server instance.
81      *
82      * @return a custom wizard
83      */

84     public InstantiatingIterator getAddInstanceIterator() {
85         return new WSInstantiatingIterator();
86     }
87 }
Popular Tags