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-2007 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 javax.enterprise.deploy.spi.DeploymentManager;
045 import org.openide.WizardDescriptor;
046
047 /**
048 * Factory for optional deployment functionality that a plugin can provide.
049 * Plugins need to register an instance of this class in module layer in folder
050 * <code>J2EE/DeploymentPlugins/{plugin_name}</code>.
051 *
052 * @author Pavel Buzek
053 */
054 public abstract class OptionalDeploymentManagerFactory {
055
056 /**
057 * Create StartServer for given DeploymentManager.
058 * The instance returned by this method will be cached by the j2eeserver.
059 */
060 public abstract StartServer getStartServer(DeploymentManager dm);
061
062 /**
063 * Create IncrementalDeployment for given DeploymentManager.
064 * The instance returned by this method will be cached by the j2eeserver.
065 */
066 public abstract IncrementalDeployment getIncrementalDeployment(
067 DeploymentManager dm);
068
069 /**
070 * Create FindJSPServlet for given DeploymentManager.
071 * The instance returned by this method will be cached by the j2eeserver.
072 */
073 public abstract FindJSPServlet getFindJSPServlet(
074 DeploymentManager dm);
075
076 /**
077 * Create TargetModuleIDResolver for the given DeploymentManager.
078 * The instance returned by this method will be cached by the j2eeserver.
079 */
080 public TargetModuleIDResolver getTargetModuleIDResolver(
081 DeploymentManager dm) {
082 return null;
083 }
084
085 /**
086 * Create the wizard iterator to be used in the Add Server Instance wizard
087 */
088 public WizardDescriptor.InstantiatingIterator getAddInstanceIterator() {
089 return null;
090 }
091
092 /**
093 * Returns <code>true</code> if the common UI (like the wizard in common
094 * add dialog) should be handled by insfrastructure of the j2eeserver.
095 *
096 * @return <code>true</code> if the common UI is required by the plugin
097 * @since 1.38.0
098 */
099 public boolean isCommonUIRequired() {
100 return true;
101 }
102
103 /**
104 * Creates an Ant deployment provider for the specified deployment manager.
105 *
106 * @param dm deployment manager.
107 * @return an instance of the AntDeploymentProvider if Ant deployment
108 * is supported for the specified deployment manager, null otherwise.
109 * @since 1.18
110 */
111 public AntDeploymentProvider getAntDeploymentProvider(
112 DeploymentManager dm) {
113 return null;
114 }
115
116 /**
117 * Creates a <code>DatasourceManager</code> for the given deployment manager
118 * or <code>null</code> if data source management is not supported
119 *
120 * @param dm the deployment manager
121 *
122 * @return a data source manager or <code>null</code> if data source management
123 * is not supported
124 *
125 * @since 1.15
126 */
127 public DatasourceManager getDatasourceManager(DeploymentManager dm) {
128 return null;
129 }
130
131 /**
132 * Creates a JDBC driver deployer for the specified deployment manager.
133 *
134 * @param dm deployment manager.
135 *
136 * @return JDBC driver deployer for the specified deployment manager or null
137 * if JDBC driver deployment is not supported.
138 *
139 * @since 1.24
140 */
141 public JDBCDriverDeployer getJDBCDriverDeployer(DeploymentManager dm) {
142 return null;
143 }
144
145 /**
146 * Creates a <code>MessageDestinationDeployment</code> for the given deployment manager
147 * or <code>null</code> if message destination deployment is not supported
148 *
149 * @param dm the deployment manager
150 *
151 * @return a message destination deployment or <code>null</code>
152 * if message destination deployment is not supported
153 *
154 * @since 1.25
155 */
156 public MessageDestinationDeployment getMessageDestinationDeployment(
157 DeploymentManager dm) {
158 return null;
159 }
160
161 }
|