This commit was manufactured by cvs2svn to create tag 'v20041213_0022'.
diff --git a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/Util.java b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/Util.java
index 55b6838..81c313a 100644
--- a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/Util.java
+++ b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/internal/Util.java
@@ -16,7 +16,7 @@
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jdt.core.*;
-import org.eclipse.jst.server.core.internal.Trace;
+import org.eclipse.wst.server.core.internal.Trace;
/**
*
*/
@@ -91,7 +91,7 @@
}
return null;
} catch (Exception e) {
- Trace.trace(Trace.WARNING, "Could not find servlet class", e);
+ Trace.trace("Could not find servlet class", e);
return null;
}
}
diff --git a/plugins/org.eclipse.jst.server.generic.core/.classpath b/plugins/org.eclipse.jst.server.generic.core/.classpath
deleted file mode 100644
index 065ac06..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/plugins/org.eclipse.jst.server.generic.core/.cvsignore b/plugins/org.eclipse.jst.server.generic.core/.cvsignore
deleted file mode 100644
index 07d3079..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/.cvsignore
+++ /dev/null
@@ -1,6 +0,0 @@
-bin
-build.xml
-genericserver.jar
-org.eclipse.jst.server.generic.core_1.0.0.jar
-temp.folder
-*.settings
diff --git a/plugins/org.eclipse.jst.server.generic.core/.project b/plugins/org.eclipse.jst.server.generic.core/.project
deleted file mode 100644
index fe7ee06..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jst.server.generic.core</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/plugins/org.eclipse.jst.server.generic.core/build.properties b/plugins/org.eclipse.jst.server.generic.core/build.properties
deleted file mode 100644
index b68a22c..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/build.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-source.genericserver.jar = src/
-output.genericserver.jar = bin/
-bin.includes = plugin.xml,\
- genericserver.jar,\
- servers/,\
- plugin.properties,\
- xsd/ServerTypeDefinitionSchema.xsd
-src.includes = servers/,\
- src/,\
- plugin.xml,\
- plugin.properties,\
- xsd/
diff --git a/plugins/org.eclipse.jst.server.generic.core/plugin.properties b/plugins/org.eclipse.jst.server.generic.core/plugin.properties
deleted file mode 100644
index 7c92580..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/plugin.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-pluginName= Generic Server Plugin
-providerName=Eteration.com
-pluginDescription=Provides generic server tooling with easy to develop meta data configuration files
-
-runtimeTypeName=Generic Server Runtime
-runtimeTypeDescription=This is the Lomboz type runtime support
-
-serverTypeName=Generic server support
-serverTypeDescription=Lomboz type generic server
-launchConfigurationTypeName=Generic server launch configuration type
diff --git a/plugins/org.eclipse.jst.server.generic.core/plugin.xml b/plugins/org.eclipse.jst.server.generic.core/plugin.xml
deleted file mode 100644
index 5fdb36c..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/plugin.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.jst.server.generic.core"
- name="%pluginName"
- version="1.0.0"
- provider-name="%providerName"
- class="org.eclipse.jst.server.generic.core.CorePlugin"
- description="%pluginDescription">
-
- <runtime>
- <library name="genericserver.jar">
- <export name="*"/>
- </library>
- </runtime>
-
- <requires>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.debug.core"/>
- <import plugin="org.eclipse.jdt.core"/>
- <import plugin="org.eclipse.jdt.launching"/>
- <import plugin="org.eclipse.wst.server.core"/>
- <import plugin="org.eclipse.jst.server.core"/>
- <import plugin="org.eclipse.debug.ui"/>
- <import plugin="org.eclipse.ant.core"/>
- <import plugin="org.eclipse.ant.ui"/>
- <import plugin="org.eclipse.emf.common" export="true"/>
- <import plugin="org.eclipse.emf.ecore"/>
- <import plugin="org.eclipse.emf.ecore.xmi"/>
- </requires>
-
- <extension point="org.eclipse.wst.server.core.runtimeTargetHandlers">
- <runtimeTargetHandler
- id="org.eclipse.jst.server.generic.runtimeTarget"
- runtimeTypeIds="org.eclipse.jst.server.generic.runtime"
- class="org.eclipse.jst.server.generic.internal.core.GenericServerRuntimeTargetHandler"/>
- </extension>
-
- <extension point="org.eclipse.wst.server.core.runtimeTypes">
- <runtimeType
- id="org.eclipse.jst.server.generic.runtime"
- name="%runtimeTypeName"
- description="%runtimeTypeDescription"
- vendor="All"
- version="0"
- order="100"
- class="org.eclipse.jst.server.generic.internal.core.GenericServerRuntime"
- >
- <moduleType
- types="j2ee.web"
- versions="1.2, 1.3, 1.4"/>
- </runtimeType>
- </extension>
-
-<extension point="org.eclipse.wst.server.core.serverTypes">
- <serverType
- runtime="true"
- class="org.eclipse.jst.server.generic.internal.core.GenericServer"
- order="100"
- id="org.eclipse.jst.server.generic"
- initialState="stopped"
- supportsRemoteHosts="false"
- runtimeTypeId="org.eclipse.jst.server.generic.runtime"
- description="%serverTypeDescription"
- launchConfigId="org.eclipse.jst.server.generic.core.launchConfigurationType"
- behaviourClass="org.eclipse.jst.server.generic.internal.core.GenericServerBehaviour"
- name="%serverTypeName"
- hasConfiguration="false"
- launchModes="run,debug">
-
- </serverType>
- </extension>
-
- <extension point="org.eclipse.debug.core.launchConfigurationTypes">
- <launchConfigurationType
- id="org.eclipse.jst.server.generic.core.launchConfigurationType"
- name="%launchConfigurationTypeName"
- delegate="org.eclipse.jst.server.generic.internal.core.GenericServerLaunchConfigurationDelegate"
- modes="run, debug"
- sourceLocatorId="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"
- sourcePathComputerId="org.eclipse.jst.server.generic.core.sourcePathComputer"/>
- </extension>
-
- <extension point="org.eclipse.debug.core.sourcePathComputers">
- <sourcePathComputer
- id="org.eclipse.jst.server.generic.core.sourcePathComputer"
- class="org.eclipse.jst.server.generic.internal.core.GenericServerSourcePathComputerDelegate"/>
- </extension>
-
- <extension point="org.eclipse.wst.server.core.launchableAdapters">
- <launchableAdapter
- class="org.eclipse.jst.server.generic.internal.core.GenericServerLaunchableAdapterDelegate"
- id="org.eclipse.jst.server.generic.web"/>
- </extension>
-</plugin>
diff --git a/plugins/org.eclipse.jst.server.generic.core/servers/jboss323.server b/plugins/org.eclipse.jst.server.generic.core/servers/jboss323.server
deleted file mode 100644
index 9b55281..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/servers/jboss323.server
+++ /dev/null
@@ -1,123 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<tns:ServerRuntime
- xmlns:tns="http://eclipse.org/jst/server/generic/ServerTypeDefinition"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://eclipse.org/jst/server/generic/ServerTypeDefinition ServerTypeDefinitionSchema.xsd "
- name="JBOSS 3.2.3" version="v3.2.3">
-<property id="serverRootDirectory"
- label="Application Server Directory:"
- type="directory"
- context="runtime"
- default="/your_server_root/appservers/jboss-3.2.3" />
-<property id="serverAddress"
- label="Address:"
- type="string"
- context="server"
- default="127.0.0.1" />
-<property id="port"
- label="Port:"
- type="string"
- context="server"
- default="8080" />
-<property id="serverConfig"
- label="Server Configuration (minimal/default/all):"
- type="string"
- context="server"
- default="default" />
-<property id="classPath"
- label="Classpath Variable:"
- type="directory"
- context="runtime"
- default="/your_server_root/appservers/jboss-3.2.3" />
-
- <port>
- <no>${port}</no>
- <name>Http</name>
- <protocol>http</protocol>
- </port>
-
- <module>
- <type>j2ee.web</type>
- <publishDir>${serverRootDirectory}/server/${serverConfig}/deploy</publishDir>
- <publisherReference>jboss.web</publisherReference>
- </module>
-
-
- <project>
- <classpathReference>jboss.project</classpathReference>
- </project>
-
- <start>
- <class>org.jboss.Main</class>
- <workingDirectory>${serverRootDirectory}/bin</workingDirectory>
- <programArguments>-c ${serverConfig}</programArguments>
- <vmParameters></vmParameters>
- <classpathReference>jboss</classpathReference>
- </start>
-
- <stop>
- <class>org.jboss.Shutdown</class>
- <workingDirectory>${serverRootDirectory}/bin</workingDirectory>
- <programArguments>-S</programArguments>
- <vmParameters></vmParameters>
- <classpathReference>jboss</classpathReference>
- </stop>
- <publisher id="jboss.web">
- <publish>
- <task>
- <![CDATA[
-
- <project name="deployextension" default="deploy" basedir=".">
- <target name="deploy">
- <jar destfile="${module.name}.war">
- <zipfileset dir="${module.dir}">
- <include name="**/*.*"/>
- <exclude name="**/*.war"/>
- </zipfileset>
- </jar>
- <move file="${module.name}.war" todir="${server.publish.dir}"/>
- </target>
- </project>
-
- ]]>
- </task>
- <classpathReference>jboss</classpathReference>
- </publish>
- <unpublish>
- <task>
- <![CDATA[<project name="deployextension" default="deploy" basedir=".">
- <target name="deploy">
- <delete file="${server.publish.dir}/${module.name}.war"/>
- </target>
- </project>]]>
- </task>
- <classpathReference>jboss</classpathReference>
- </unpublish>
- </publisher>
-
- <classpath id="jboss" isLibrary="true">
- <archive path="${classPath}/bin/run.jar" />
- <archive path="${classPath}/bin/shutdown.jar" />
- <archive path="${classPath}/client/jboss-j2ee.jar" />
- <archive path="${classPath}/server/${serverConfig}/lib/javax.servlet.jar" />
- <archive path="${classPath}/lib/jboss-boot.jar" />
- <archive path="${classPath}/lib/jboss-system.jar" />
- <archive path="${classPath}/lib/concurrent.jar" />
- <archive path="${classPath}/server/${serverConfig}/lib/jboss.jar" />
- <archive path="${classPath}/server/${serverConfig}/lib/jnpserver.jar" />
- <archive path="${classPath}/server/${serverConfig}/lib/jpl-pattern.jar" />
- <archive path="${classPath}/server/${serverConfig}/lib/jpl-util.jar" />
- <archive path="${classPath}/server/${serverConfig}/lib/jboss-transaction.jar" />
- <archive path="${classPath}/server/${serverConfig}/lib/bcel.jar" />
- <archive path="${classPath}/lib/jdom.jar" />
- <archive path="${classPath}/lib/xercesImpl.jar" />
- <archive path="${classPath}/lib/xml-apis.jar" />
- <archive path="${classPath}/lib/gnu-regexp.jar" />
- <archive path="${classPath}/lib/getopt.jar" />
- </classpath>
-
- <classpath id="jboss.project" isLibrary="false">
- <archive path="${classPath}/client/jboss-j2ee.jar" />
- </classpath>
-
-</tns:ServerRuntime>
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.generic.core/servers/jonas.server b/plugins/org.eclipse.jst.server.generic.core/servers/jonas.server
deleted file mode 100644
index 45994e2..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/servers/jonas.server
+++ /dev/null
@@ -1,118 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<tns:ServerRuntime
- xmlns:tns="http://eclipse.org/jst/server/generic/ServerTypeDefinition"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://eclipse.org/jst/server/generic/ServerTypeDefinition ServerTypeDefinitionSchema.xsd "
- name="JonAS 4.1.4" version="v4.1.4">
- <property id="jonasRoot"
- label="JonAS Installation Directory:"
- type="directory"
- context="runtime"
- default="/your_server_root/JOnAS-4.1.4" />
- <property id="jonasBase"
- label="JonAS Configuration Directory:"
- type="directory"
- context="runtime"
- default="/your_server_root/JOnAS-4.1.4" />
- <property id="serverAddress"
- label="Address:"
- type="string"
- context="server"
- default="127.0.0.1" />
- <property id="port"
- label="Port:"
- type="string"
- context="server"
- default="9000" />
- <property id="protocols"
- label="Ejb Protocols:"
- type="string"
- context="server"
- default="jrmp" />
- <property id="mappernames"
- label="Mapper names:"
- type="string"
- context="server"
- default="" />
- <property id="classPath"
- label="Classpath Variable:"
- type="directory"
- context="runtime"
- default="/your_server_root/JOnAS-4.1.4" />
-
- <port>
- <no>${port}</no>
- <name>Http</name>
- <protocol>http</protocol>
- </port>
-
- <module>
- <type>j2ee.web</type>
- <publishDir>${jonasBase}/webapps/autoload</publishDir>
- <publisherReference>jonas.web</publisherReference>
- </module>
-
-
- <project>
- <classpathReference>jonas.project</classpathReference>
- </project>
-
- <start>
- <class>org.objectweb.jonas.server.Bootstrap</class>
- <workingDirectory>${jonasRoot}</workingDirectory>
- <programArguments>org.objectweb.jonas.server.Server</programArguments>
- <vmParameters>-Dinstall.root=${jonasRoot} -Djonas.base=${jonasBase} -Djava.security.policy=${jonasRoot}/conf/java.policy -Djonas.classpath= -Djonas.default.classloader=true -Djavax.rmi.CORBA.PortableRemoteObjectClass=org.objectweb.carol.rmi.multi.MultiPRODelegate -Djava.naming.factory.initial=org.objectweb.carol.jndi.spi.MultiOrbInitialContextFactory -Djava.security.auth.login.config=${jonasRoot}/conf/jaas.config -Djava.endorsed.dirs=${jonasRoot}/lib/endorsed -Djava.rmi.server.RMIClassLoaderSpi=org.objectweb.jonas.server.RemoteClassLoaderSpi</vmParameters>
- <classpathReference>jonas</classpathReference>
- </start>
-
- <stop>
- <class>org.objectweb.jonas.server.Bootstrap</class>
- <workingDirectory>${jonasRoot}</workingDirectory>
- <programArguments>org.objectweb.jonas.adm.JonasAdmin -s</programArguments>
- <vmParameters>-Dinstall.root=${jonasRoot} -Djonas.base=${jonasBase} -Djava.security.policy=${jonasRoot}/conf/java.policy -Djonas.classpath= -Djonas.default.classloader=true -Djavax.rmi.CORBA.PortableRemoteObjectClass=org.objectweb.carol.rmi.multi.MultiPRODelegate -Djava.naming.factory.initial=org.objectweb.carol.jndi.spi.MultiOrbInitialContextFactory -Djava.security.auth.login.config=${jonasRoot}/conf/jaas.config -Djava.endorsed.dirs=${jonasRoot}/lib/endorsed -Djava.rmi.server.RMIClassLoaderSpi=org.objectweb.jonas.server.RemoteClassLoaderSpi</vmParameters>
- <classpathReference>jonas</classpathReference>
- </stop>
- <publisher id="jonas.web">
- <publish>
- <task><![CDATA[
-
- <project name="deployextension" default="deploy" basedir=".">
- <target name="deploy">
- <jar destfile="${module.name}.war">
- <zipfileset dir="${module.dir}">
- <include name="**/*.*"/>
- <exclude name="**/*.war"/>
- </zipfileset>
- </jar>
- <move file="${module.name}.war" todir="${server.publish.dir}"/>
- </target>
- </project>
-
- ]]></task>
- <classpathReference>jonas</classpathReference>
- </publish>
- <unpublish>
- <task>
- <![CDATA[<project name="deployextension" default="deploy" basedir=".">
- <target name="deploy">
- <delete file="${server.publish.dir}/${module.name}.war"/>
- </target>
- </project>]]>
- </task>
- <classpathReference>weblogic.admin</classpathReference>
- </unpublish>
- </publisher>
-
- <classpath id="jonas" isLibrary="true">
- <archive path="${classPath}/lib/common/ow_jonas_bootstrap.jar" />
- <archive path="${classPath}/conf" />
- </classpath>
-
- <classpath id="jonas.project" isLibrary="false">
- <archive path="${classPath}/lib/common/ow_jonas_bootstrap.jar" />
- <archive path="${classPath}/lib/commons/j2ee/ejb-2_1-api.jar" />
- <archive path="${classPath}/lib/commons/j2ee/servlet-2_4.jar" />
- <archive path="${classPath}/lib/commons/j2ee/jms.jar" />
- </classpath>
-
-</tns:ServerRuntime>
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.generic.core/servers/weblogic81.server b/plugins/org.eclipse.jst.server.generic.core/servers/weblogic81.server
deleted file mode 100644
index fe3d846..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/servers/weblogic81.server
+++ /dev/null
@@ -1,149 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<tns:ServerRuntime
- xmlns:tns="http://eclipse.org/jst/server/generic/ServerTypeDefinition"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://eclipse.org/jst/server/generic/ServerTypeDefinition ServerTypeDefinitionSchema.xsd "
- name="BEA WebLogic Server v8.1" version="v8.1">
-
-
- <property id="beaHome"
- label="BEA Home Directory:"
- type="directory"
- context="runtime"
- default="C:/bea" />
- <property id="serverRootDirectory"
- label="Application Server Directory:"
- type="directory"
- context="runtime"
- default="C:/bea/weblogic81" />
- <property id="domainName"
- label="Admin Domain Name:"
- type="string"
- context="server"
- default="mydomain" />
- <property id="domainDirectory"
- label="Administration Domain Directory:"
- type="directory"
- context="server"
- default="C:/bea/user_projects/domains/mydomain" />
- <property id="serverName"
- label="Server Name:"
- type="string"
- context="server"
- default="myserver" />
- <property id="userName"
- label="User Name:"
- type="string"
- context="server"
- default="system" />
- <property id="password"
- label="Password:"
- type="string"
- context="server"
- default="weblogic" />
- <property id="productionMode"
- label="Production Mode:"
- type="boolean"
- context="server"
- default="false" />
- <property id="serverAddress"
- label="Address:"
- type="string"
- context="server"
- default="127.0.0.1" />
- <property id="port"
- label="Port:"
- type="string"
- context="server"
- default="7001" />
- <property id="classPath"
- label="Classpath Variable:"
- type="directory"
- context="runtime"
- default="C:/bea/weblogic81/server/lib" />
-
-
-
- <port>
- <no>${port}</no>
- <name>Http</name>
- <protocol>http</protocol>
- </port>
-
- <module>
- <type>j2ee.web</type>
- <publishDir>${domainDirectory}/applications</publishDir>
- <publisherReference>weblogic.web</publisherReference>
- </module>
-
-
- <project>
- <classpathReference>weblogic</classpathReference>
- </project>
-
- <start>
- <class>weblogic.Server</class>
- <workingDirectory>${domainDirectory}</workingDirectory>
- <programArguments></programArguments>
- <vmParameters>
- -Xms32m -Xmx200m -XX:MaxPermSize=128m
- -Dweblogic.Name=${serverName} -Dbea.home="${beaHome}"
- -Dweblogic.management.username=${userName}
- -Dweblogic.management.password=${password}
- -Dweblogic.ProductionModeEnabled=${productionMode}
- -Djava.security.policy=="${serverRootDirectory}/server/lib/weblogic.policy"
- </vmParameters>
- <classpathReference>weblogic</classpathReference>
- </start>
-
- <stop>
- <class>weblogic.Admin</class>
- <workingDirectory>${domainDirectory}</workingDirectory>
- <programArguments>
- -url t3://${serverAddress}:${port} -username ${userName}
- -password ${password} SHUTDOWN
- </programArguments>
- <vmParameters></vmParameters>
- <classpathReference>weblogic.admin</classpathReference>
- </stop>
- <publisher id="weblogic.web">
- <publish>
- <task>
- <![CDATA[<project name="deployextension" default="deploy" basedir=".">
- <target name="deploy">
- <jar destfile="${module.name}.war">
- <zipfileset dir="${module.dir}">
- <include name="**/*.*"/>
- <exclude name="**/jsp_servlet/*.class"/>
- <exclude name="**/*.war"/>
- </zipfileset>
- </jar>
- <move file="${module.name}.war" todir="${server.publish.dir}"/>
- </target>
- </project>]]>
- </task>
- <classpathReference>weblogic.admin</classpathReference>
- </publish>
- <unpublish>
- <task>
- <![CDATA[<project name="deployextension" default="deploy" basedir=".">
- <target name="deploy">
- <delete file="${server.publish.dir}/${module.name}.war"/>
- </target>
- </project>]]>
- </task>
- <classpathReference>weblogic.admin</classpathReference>
- </unpublish>
- </publisher>
-
- <classpath id="weblogic" isLibrary="true">
- <archive path="${classPath}/weblogic.jar" />
- <archive path="${classPath}/ojdbc14.jar" />
- <archive path="${classPath}/webservices.jar" />
- </classpath>
-
- <classpath id="weblogic.admin" isLibrary="false">
- <archive path="${classPath}/weblogic.jar" />
- </classpath>
-
-</tns:ServerRuntime>
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/CorePlugin.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/CorePlugin.java
deleted file mode 100644
index aeda021..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/CorePlugin.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Gorkem Ercan - initial API and implementation
- * Naci M. Dai
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-package org.eclipse.jst.server.generic.core;
-
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jst.server.generic.internal.core.ServerTypeDefinitionManager;
-import org.eclipse.ui.plugin.*;
-import org.osgi.framework.BundleContext;
-import java.io.IOException;
-import java.net.URL;
-import java.util.*;
-
-/**
- * The main plugin class to be used in the desktop.
- *
- * @author Gorkem Ercan
- */
-public class CorePlugin extends AbstractUIPlugin {
-
- public static final String PLUGIN_ID = "org.eclipse.jst.server.generic.core";
-
- //The shared instance.
- private static CorePlugin plugin;
- //Resource bundle.
- private ResourceBundle resourceBundle;
- private ServerTypeDefinitionManager fServerTypeDefinitionManager;
- /**
- * The constructor.
- */
- public CorePlugin() {
- super();
- plugin = this;
- try {
- resourceBundle = ResourceBundle.getBundle("org.eclipse.jst.server.generic.core.CorePluginResources");
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- }
-
- /**
- * Returns the shared instance.
- */
- public static CorePlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns the string from the plugin's resource bundle,
- * or 'key' if not found.
- */
- public static String getResourceString(String key) {
- ResourceBundle bundle = CorePlugin.getDefault().getResourceBundle();
- try {
- return (bundle != null) ? bundle.getString(key) : key;
- } catch (MissingResourceException e) {
- return key;
- }
- }
-
- /**
- * Returns the plugin's resource bundle,
- */
- public ResourceBundle getResourceBundle() {
- return resourceBundle;
- }
- /**
- *
- * @return
- */
- public ServerTypeDefinitionManager getServerTypeDefinitionManager()
- {
- if(fServerTypeDefinitionManager==null)
- fServerTypeDefinitionManager = new ServerTypeDefinitionManager(getInstallUrl());
- return fServerTypeDefinitionManager;
- }
-
- private URL getInstallUrl()
- {
- try {
- return Platform.resolve(this.getBundle().getEntry("/"));
- } catch (IOException e) {
- return null;
- }
- }
-
-
-}
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/GenericServerCoreMessages.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/GenericServerCoreMessages.java
deleted file mode 100644
index 046187a..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/GenericServerCoreMessages.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package org.eclipse.jst.server.generic.core;
-
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/**
- * Helper class to get messages
- *
- * @author Gorkem Ercan
- */
-public class GenericServerCoreMessages {
-
- private static final String RESOURCE_BUNDLE= "org.eclipse.jst.server.generic.core.GenericServerCoreMessages";//$NON-NLS-1$
-
- private static ResourceBundle fResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);
-
- private GenericServerCoreMessages() {
- }
-
- /**
- * Return string from the resource bundle.
- *
- * @param key the string used to get the bundle value, must not be <code>null</code>
- * @return the string from the resource bundle
- */
- public static String getString(String key) {
- try {
- return fResourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return "!" + key + "!";
- }
- }
-
- /**
- * Gets a string from the resource bundle that is
- * formatted it with the given argument.
- *
- * @param key the string used to get the bundle value, must not be null
- * @param arg the argument used to format the string
- * @return the formatted string
- */
- public static String getFormattedString(String key, Object[] arg) {
- String format= null;
- try {
- format= fResourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return "!" + key + "!";
- }
- if (arg == null)
- arg= new Object[0];
- return MessageFormat.format(format, arg);
- }
-
- /**
- * Returns a resource bundle.
- *
- * @return the resource bundle
- */
- public static ResourceBundle getResourceBundle() {
- return fResourceBundle;
- }
-}
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/GenericServerCoreMessages.properties b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/GenericServerCoreMessages.properties
deleted file mode 100644
index 0c696d7..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/GenericServerCoreMessages.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-errorName=Invalid name.
-errorJRE=Invalid JRE.
-errorNoServerType=No server type definition
-errorDuplicateRuntimeName=Name is already in use
-errorMissingClasspathEntry=Missing classpath entry {0}
-errorPortInUse=Server port In Use {0}-{1}
-cancelNoPublish=Nothing to publish
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/AntPublisher.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/AntPublisher.java
deleted file mode 100644
index c175616..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/AntPublisher.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Naci M. Dai - initial API and implementation
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-package org.eclipse.jst.server.generic.internal.core;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import org.eclipse.ant.core.AntRunner;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jst.server.generic.core.CorePlugin;
-import org.eclipse.jst.server.generic.servertype.definition.Module;
-import org.eclipse.jst.server.generic.servertype.definition.PublishType;
-import org.eclipse.jst.server.generic.servertype.definition.Publisher;
-import org.eclipse.jst.server.generic.servertype.definition.ServerRuntime;
-import org.eclipse.jst.server.j2ee.IWebModule;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IModuleArtifact;
-/**
- * Ant based publisher.
- *
- * @author Gorkem Ercan
- */
-
-public class AntPublisher{
-
- /**
- * @param parents
- * @param module
- * @param serverDefinition
- */
- private List parents;
- private IModule module;
- private ServerRuntime serverTypeDefinition;
-
- public AntPublisher(List parents, IModule module, ServerRuntime serverDefinition) {
- this.parents = parents;
- this.module = module;
- this.serverTypeDefinition = serverDefinition;
- }
- /* (non-Javadoc)
- * @see org.eclipse.wtp.server.core.model.IPublisher#publish(org.eclipse.wtp.server.core.resources.IModuleResource[], org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus[] publish(IModuleArtifact[] resource,
- IProgressMonitor monitor) throws CoreException {
- Module sModule = serverTypeDefinition.getModule("j2ee.web");
- Publisher publisher = serverTypeDefinition.getPublisher(sModule.getPublisherReference());
- String deployAnt = ((PublishType)publisher.getPublish().get(0)).getTask();
- deployAnt = serverTypeDefinition.getResolver().resolveProperties(deployAnt);
-
- if(deployAnt == null || deployAnt.length()<1)
- return new IStatus[]{new Status(IStatus.ERROR,CorePlugin.PLUGIN_ID,0,"AntBuildFileDoesNotExist",null)};
-
-
- IPath file = CorePlugin.getDefault().getStateLocation().append("tempAnt.xml");
- try {
- createNewFile(file.toFile(),deployAnt.getBytes());
- } catch (IOException e) {
- return null;
- }
-
- runAnt(file.toString(),new String[]{"deploy"},getPublishProperties(resource),monitor);
-
- file.toFile().delete();
- return null;
- }
- private Map getPublishProperties(IModuleArtifact[] resource)
- {
- Module module = serverTypeDefinition.getModule("j2ee.web");
-
- Map props = new HashMap();
- String modDir = module.getPublishDir();
- modDir = serverTypeDefinition.getResolver().resolveProperties(modDir);
-
- IWebModule webModule = (IWebModule)this.module.getAdapter(IWebModule.class);
- String moduleName = this.guessModuleName(webModule);
- props.put("module.name",moduleName);
- props.put("module.dir",webModule.getLocation().toString());
- props.put("server.publish.dir",modDir);
- return props;
-
-
- }
- /**
- * @param module2
- * @param webModule
- * @return
- */
- private String guessModuleName(IWebModule webModule) {
- String moduleName = this.module.getName();
- //Default to project name but not a good guess
- //may have blanks etc.
-
- // A better choice is to use the context root
- // For wars most appservers use the module name
- // as the context root
- String contextRoot = webModule.getContextRoot();
- if(contextRoot.charAt(0) == '/')
- moduleName = contextRoot.substring(1);
- return moduleName;
- }
- private void runAnt(String buildFile,String[] targets,Map properties ,IProgressMonitor monitor)throws CoreException
- {
- AntRunner runner = new AntRunner();
- runner.setBuildFileLocation(buildFile);
- runner.setExecutionTargets(targets);
- runner.addUserProperties(properties);
- runner.run(monitor);
- }
-
-
-
-
- public boolean createNewFile(File f,byte[] content) throws IOException {
- if (f != null) {
- if (f.exists()) {
- return false;
- }
- FileOutputStream fos = null;
- try {
- fos = new FileOutputStream(f);
- fos.write(content);
- } finally {
- if (fos != null) {
- fos.close();
- }
- }
- return true;
- }
- return false;
- }
-
-
-
-}
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/GenericServer.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/GenericServer.java
deleted file mode 100644
index 40b4416..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/GenericServer.java
+++ /dev/null
@@ -1,278 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Gorkem Ercan - initial API and implementation
- * Naci M. Dai
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-package org.eclipse.jst.server.generic.internal.core;
-
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jst.server.generic.core.CorePlugin;
-import org.eclipse.jst.server.generic.core.GenericServerCoreMessages;
-import org.eclipse.jst.server.generic.servertype.definition.Module;
-import org.eclipse.jst.server.generic.servertype.definition.Port;
-import org.eclipse.jst.server.generic.servertype.definition.ServerRuntime;
-import org.eclipse.jst.server.j2ee.IWebModule;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.ServerCore;
-import org.eclipse.wst.server.core.ServerUtil;
-import org.eclipse.wst.server.core.model.IURLProvider;
-import org.eclipse.wst.server.core.model.RuntimeDelegate;
-import org.eclipse.wst.server.core.model.ServerDelegate;
-import org.eclipse.wst.server.core.util.ServerPort;
-
-/**
- * Generic XML based server implementation.
- *
- * @author Gorkem Ercan
- */
-public class GenericServer extends ServerDelegate implements IURLProvider {
-
- private static final String ATTR_GENERIC_SERVER_MODULES = "Generic_Server_Modules_List";
- private ServerRuntime fServerDefinition;
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.server.core.model.IServerDelegate#publishStart(org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus publishStart(IProgressMonitor monitor) {
- if(getModules().length<1)
- return new Status(IStatus.CANCEL,CorePlugin.PLUGIN_ID,0,GenericServerCoreMessages.getString("cancelNoPublish"),null);
- return new Status(IStatus.OK, CorePlugin.PLUGIN_ID, 0, "PublishingStarted", null);
- }
-
-
- public IStatus canModifyModules(IModule[] add, IModule[] remove) {
- Iterator iterator = getServerDefinition().getModule().iterator();
-
- while(iterator.hasNext()) {
- Module module = (Module)iterator.next();
- if("j2ee.web".equals(module.getType()))
- return new Status(IStatus.OK, CorePlugin.PLUGIN_ID, 0, "CanModifyModules", null);
- }
- return new Status(IStatus.ERROR, CorePlugin.PLUGIN_ID, 0, GenericServerCoreMessages.getString("moduleNotCompatible"), null);
- }
-
- private String createModuleId(IModule module)
- {
- return module.getProject().getName()+":"+module.getId();
- }
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.ServerDelegate#modifyModules(org.eclipse.wst.server.core.IModule[], org.eclipse.wst.server.core.IModule[], org.eclipse.core.runtime.IProgressMonitor)
- */
- public void modifyModules(IModule[] add, IModule[] remove, IProgressMonitor monitor) throws CoreException {
-
- List modules = this.getAttribute(ATTR_GENERIC_SERVER_MODULES,(List)null);
-
- if(add!=null&& add.length>0)
- {
- if(modules==null) {
- modules=new ArrayList(add.length);
- }
- for (int i = 0; i < add.length; i++) {
- String modlId = createModuleId(add[i]);
- if(modules.contains(modlId)==false)
- modules.add(modlId);
- }
- }
- if(remove!=null && remove.length>0 && modules!=null)
- {
- for (int i = 0; i < remove.length; i++) {
- modules.remove(createModuleId(remove[i]));
- }
- }
- if(modules!=null)
- setAttribute(ATTR_GENERIC_SERVER_MODULES,modules);
-
- }
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.server.core.model.IServerDelegate#getModules()
- */
- public org.eclipse.wst.server.core.IModule[] getModules() {
- List modules = getAttribute(ATTR_GENERIC_SERVER_MODULES,(List)null);
- List imodules = new ArrayList();
- Iterator iterator = modules.iterator();
- while(iterator.hasNext())
- {
- String moduleId = (String)iterator.next();
- int sep = moduleId.indexOf(":");
- IProject project =ResourcesPlugin.getWorkspace().getRoot().getProject(moduleId.substring(0,sep));
- IModule[] ms = ServerUtil.getModules(project);
- for (int i = 0; i < ms.length; i++) {
- if(ms[i].getId().equals(moduleId.substring(sep+1)));
- imodules.add(ms[i]);
- }
-
- }
- if(modules!= null)
- return (IModule[])imodules.toArray(new IModule[imodules.size()]);
- return new IModule[0];
- }
-
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.server.core.model.IServerDelegate#getChildModules(org.eclipse.wst.server.core.model.IModule)
- */
- public IModule[] getChildModules(IModule module) {
- // TODO Auto-generated method stub
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.server.core.model.IServerDelegate#getParentModules(org.eclipse.wst.server.core.model.IModule)
- */
- public IModule[] getParentModules(IModule module) throws CoreException {
- //FIXME This is valid for only web modules. A generic server should support any
- // kind of j2ee module. Fix this after the server architectures are determined.
- IWebModule webModule = (IWebModule)module.getAdapter(IWebModule.class);
- if (webModule!=null) {
- IStatus status = canModifyModules(new IModule[] { module }, null);
- if (status == null || !status.isOK())
- throw new CoreException(status);
- return new IModule[] { module };
- }
- return null;
-
- }
-
- /**
- * @return
- */
- private Map getServerInstanceProperties() {
- Map runtimeProperties =getRuntimeDelegate().getAttribute(
- GenericServerRuntime.SERVER_INSTANCE_PROPERTIES, new HashMap());
- Map serverProperties = getAttribute(GenericServerRuntime.SERVER_INSTANCE_PROPERTIES,new HashMap(1));
- Map instanceProperties = new HashMap(runtimeProperties.size()+serverProperties.size());
- instanceProperties.putAll(runtimeProperties);
- instanceProperties.putAll(serverProperties);
- return instanceProperties;
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.server.core.model.IMonitorableServer#getServerPorts()
- */
- public org.eclipse.wst.server.core.IServerPort[] getServerPorts() {
- List ports = new ArrayList();
- Iterator pIter = this.getServerDefinition().getPort().iterator();
- while (pIter.hasNext()) {
- Port element = (Port) pIter.next();
- int port = Integer.parseInt(getServerDefinition().getResolver().resolveProperties(element.getNo()));
- ports.add(new ServerPort("server", element.getName(), port, element.getProtocol()));
- }
-
- return (org.eclipse.wst.server.core.IServerPort[])ports.toArray(new org.eclipse.wst.server.core.IServerPort[ports.size()]);
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.wtp.server.core.model.IURLProvider#getModuleRootURL(org.eclipse.wtp.server.core.model.IModule)
- */
- public URL getModuleRootURL(IModule module) {
-
- try {
- if (module == null || !(module instanceof IWebModule))
- return null;
-
- String url = "http://localhost";
- int port = 0;
-
- port = getHttpPort();
- port = ServerCore.getServerMonitorManager().getMonitoredPort(getServer(), port, "web");
- if (port != 80)
- url += ":" + port;
-
- url += "/"+module.getName();
-
- if (!url.endsWith("/"))
- url += "/";
-
- return new URL(url);
- } catch (Exception e) {
- Trace.trace("Could not get root URL", e);
- return null;
- }
-
- }
-
- /**
- * @return
- */
- private int getHttpPort() {
- int port=-1;
- Iterator pIter = this.getServerDefinition().getPort().iterator();
- while (pIter.hasNext()) {
- Port aPort = (Port) pIter.next();
- if(port== -1)
- port = Integer.parseInt(getServerDefinition().getResolver().resolveProperties(aPort.getNo()));
- else if( "http".equals(aPort.getProtocol() ) )
- port = Integer.parseInt(aPort.getNo());
- }
- if( port == -1)
- port = 8080;
- return port;
- }
-
- public ServerRuntime getServerDefinition() {
- if (fServerDefinition == null)
- fServerDefinition = CorePlugin.getDefault()
- .getServerTypeDefinitionManager()
- .getServerRuntimeDefinition(getRuntimeDelegate().getAttribute(
- GenericServerRuntime.SERVER_DEFINITION_ID,
- ""), getServerInstanceProperties());
- return fServerDefinition;
- }
-
- private RuntimeDelegate getRuntimeDelegate()
- {
- return (RuntimeDelegate)getServer().getRuntime().getAdapter(RuntimeDelegate.class);
- }
-
-
-
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/GenericServerBehaviour.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/GenericServerBehaviour.java
deleted file mode 100644
index 1ae6150..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/GenericServerBehaviour.java
+++ /dev/null
@@ -1,384 +0,0 @@
-package org.eclipse.jst.server.generic.internal.core;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IDebugEventSetListener;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
-import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
-import org.eclipse.jdt.launching.IVMInstall;
-import org.eclipse.jdt.launching.JavaRuntime;
-import org.eclipse.jst.server.generic.core.CorePlugin;
-import org.eclipse.jst.server.generic.core.GenericServerCoreMessages;
-import org.eclipse.jst.server.generic.servertype.definition.ArchiveType;
-import org.eclipse.jst.server.generic.servertype.definition.Classpath;
-import org.eclipse.jst.server.generic.servertype.definition.ServerRuntime;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.IServerPort;
-import org.eclipse.wst.server.core.model.RuntimeDelegate;
-import org.eclipse.wst.server.core.model.ServerBehaviourDelegate;
-import org.eclipse.wst.server.core.model.ServerDelegate;
-import org.eclipse.wst.server.core.util.PingThread;
-import org.eclipse.wst.server.core.util.SocketUtil;
-
-/**
- * Server behaviour delegate implementation for generic server.
- *
- * @author Gorkem Ercan
- */
-public class GenericServerBehaviour extends ServerBehaviourDelegate {
-
- private static final String ATTR_STOP = "stop-server";
-
- // the thread used to ping the server to check for startup
- protected transient PingThread ping = null;
- protected transient IDebugEventSetListener processListener;
- protected transient IProcess process;
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.ServerBehaviourDelegate#publishServer(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void publishServer(IProgressMonitor monitor) throws CoreException {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.ServerBehaviourDelegate#publishModule(org.eclipse.wst.server.core.IModule[], org.eclipse.wst.server.core.IModule, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void publishModule(IModule[] parents, IModule module,
- IProgressMonitor monitor) throws CoreException {
- AntPublisher publisher = new AntPublisher(null,module,getServerDefinition());
- publisher.publish(null,monitor);
- setModulePublishState(module,IServer.PUBLISH_STATE_NONE);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.ServerBehaviourDelegate#setLaunchDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
- */
- public void setLaunchDefaults(ILaunchConfigurationWorkingCopy workingCopy) {
-
- workingCopy.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME,
- getStartClassName());
-
- GenericServerRuntime runtime = (GenericServerRuntime) getRuntimeDelegate();
-
- IVMInstall vmInstall = runtime.getVMInstall();
- workingCopy.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE, runtime
- .getVMInstallTypeId());
- workingCopy.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_NAME,
- vmInstall.getName());
-
- setupLaunchClasspath(workingCopy, vmInstall, getStartClasspath());
-
-
- workingCopy.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY,
- getWorkingDirectory());
- workingCopy.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS,
- getProgramArguments());
- workingCopy.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS,
- getVmArguments());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.ServerBehaviourDelegate#stop(boolean)
- */
-
-
- public void stop(boolean force) {
- if (force) {
- terminate();
- return;
- }
-
- int state = getServer().getServerState();
- if (state == IServer.STATE_STOPPED)
- return;
- else if (state == IServer.STATE_STARTING || state == IServer.STATE_STOPPING) {
- terminate();
- return;
- }
-
- try {
- Trace.trace(Trace.FINEST, "Stopping Server");
- if (state != IServer.STATE_STOPPED)
- setServerState(IServer.STATE_STOPPING);
- ILaunchManager mgr = DebugPlugin.getDefault().getLaunchManager();
-
- ILaunchConfigurationType type =
- mgr.getLaunchConfigurationType(
- IJavaLaunchConfigurationConstants.ID_JAVA_APPLICATION);
-
- String launchName = "GenericServerStopper";
- String uniqueLaunchName =
- mgr.generateUniqueLaunchConfigurationNameFrom(launchName);
- ILaunchConfiguration conf = null;
-
- ILaunchConfiguration[] lch = mgr.getLaunchConfigurations(type);
- for (int i = 0; i < lch.length; i++) {
- if (launchName.equals(lch[i].getName())) {
- conf = lch[i];
- break;
- }
- }
-
- ILaunchConfigurationWorkingCopy wc = null;
- if (conf != null) {
- wc = conf.getWorkingCopy();
- } else {
- wc = type.newInstance(null, uniqueLaunchName);
- }
- //To stop from appearing in history lists
- wc.setAttribute(IDebugUIConstants.ATTR_PRIVATE, true);
-
- wc.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME,
- getServerDefinition().getResolver().resolveProperties(this.getServerDefinition().getStop().getClass_()));
-
- GenericServerRuntime runtime = (GenericServerRuntime) getRuntimeDelegate();
-
- IVMInstall vmInstall = runtime.getVMInstall();
- wc.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE, runtime
- .getVMInstallTypeId());
- wc.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_NAME,
- vmInstall.getName());
-
- setupLaunchClasspath(wc, vmInstall, getStopClasspath());
-
- wc.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY,
- getServerDefinition().getResolver().resolveProperties(getServerDefinition().getStop().getWorkingDirectory()));
- wc.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS,
- getServerDefinition().getResolver().resolveProperties(getServerDefinition().getStop().getProgramArguments()));
- wc.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS,
- getServerDefinition().getResolver().resolveProperties(getServerDefinition().getStop().getVmParameters()));
- wc.setAttribute(ATTR_STOP, "true");
- wc.launch(ILaunchManager.RUN_MODE, new NullProgressMonitor());
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error stopping Server", e);
- }
-
-
- }
-
- public String getStartClassName() {
- return getServerDefinition().getResolver().resolveProperties(getServerDefinition().getStart().getClass_());
- }
-
- public ServerRuntime getServerDefinition() {
- GenericServer server = (GenericServer)getServer().getAdapter(ServerDelegate.class);
- return server.getServerDefinition();
- }
-
- private RuntimeDelegate getRuntimeDelegate()
- {
- return (RuntimeDelegate)getServer().getRuntime().getAdapter(RuntimeDelegate.class);
- }
-
-
-
- private List getStartClasspath() {
- String cpRef = getServerDefinition().getStart().getClasspathReference();
- return serverClasspath(cpRef);
- }
-
- /**
- * @param cpRef
- * @return
- */
- private List serverClasspath(String cpRef) {
- Classpath classpath = getServerDefinition().getClasspath(cpRef);
-
- List mementoList = new ArrayList(classpath.getArchive().size());
- Iterator iterator= classpath.getArchive().iterator();
- while(iterator.hasNext())
- {
- ArchiveType archive = (ArchiveType)iterator.next();
- String cpath = getServerDefinition().getResolver().resolveProperties(archive.getPath());
- try {
- mementoList.add(JavaRuntime.newArchiveRuntimeClasspathEntry(
- new Path(cpath)).getMemento());
- } catch (CoreException e) {
- //ignored
- }
- }
- return mementoList;
- }
-
- /**
- * @param wc
- * @param vmInstall
- */
- private void setupLaunchClasspath(ILaunchConfigurationWorkingCopy wc, IVMInstall vmInstall, List cp) {
- // add tools.jar to the path
- if (vmInstall != null) {
- try {
- cp.add(JavaRuntime
- .newRuntimeContainerClasspathEntry(
- new Path(JavaRuntime.JRE_CONTAINER)
- .append(
- "org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType")
- .append(vmInstall.getName()),
- IRuntimeClasspathEntry.BOOTSTRAP_CLASSES)
- .getMemento());
- } catch (Exception e) {
- }
-
- IPath jrePath = new Path(vmInstall.getInstallLocation()
- .getAbsolutePath());
- if (jrePath != null) {
- IPath toolsPath = jrePath.append("lib").append("tools.jar");
- if (toolsPath.toFile().exists()) {
- try {
- cp.add(JavaRuntime.newArchiveRuntimeClasspathEntry(
- toolsPath).getMemento());
- } catch (CoreException e1) {
-
- }
- }
- }
- }
-
- wc.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_CLASSPATH, cp);
- wc.setAttribute(
- IJavaLaunchConfigurationConstants.ATTR_DEFAULT_CLASSPATH,
- false);
- }
-
- private String getWorkingDirectory() {
- return getServerDefinition().getResolver().resolveProperties(getServerDefinition().getStart().getWorkingDirectory());
- }
-
- private String getProgramArguments() {
- return getServerDefinition().getResolver().resolveProperties(getServerDefinition().getStart().getProgramArguments());
- }
-
- private String getVmArguments() {
- return getServerDefinition().getResolver().resolveProperties(getServerDefinition().getStart().getVmParameters());
- }
-
- /**
- * Setup for starting the server.
- *
- * @param launch ILaunch
- * @param launchMode String
- * @param monitor IProgressMonitor
- */
- public void setupLaunch(ILaunch launch, String launchMode, IProgressMonitor monitor) throws CoreException {
- if ("true".equals(launch.getLaunchConfiguration().getAttribute(ATTR_STOP, "false")))
- return;
- // IStatus status = getRuntime().validate();
- // if (status != null && !status.isOK())
- // throw new CoreException(status);
-
-
- IServerPort[] ports = getServer().getServerPorts();
- IServerPort sp = null;
- for(int i=0;i<ports.length;i++){
- sp= ports[i];
- if (SocketUtil.isPortInUse(ports[i].getPort(), 5))
- throw new CoreException(new Status(IStatus.ERROR, CorePlugin.PLUGIN_ID, 0, GenericServerCoreMessages.getFormattedString("errorPortInUse",new String[] {Integer.toString(sp.getPort()),sp.getName()}),null));
- }
-
- setServerState(IServer.STATE_STARTING);
-
- // ping server to check for startup
- try {
- String url = "http://localhost";
- int port = sp.getPort();
- if (port != 80)
- url += ":" + port;
- ping = new PingThread(getServer(),this, url, 50);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Can't ping for server startup.");
- }
- }
-
- public void setProcess(final IProcess newProcess) {
- if (process != null)
- return;
-
- process = newProcess;
- processListener = new IDebugEventSetListener() {
- public void handleDebugEvents(DebugEvent[] events) {
- if (events != null) {
- int size = events.length;
- for (int i = 0; i < size; i++) {
- if (process.equals(events[i].getSource()) && events[i].getKind() == DebugEvent.TERMINATE) {
- DebugPlugin.getDefault().removeDebugEventListener(this);
- stopImpl();
- }
- }
- }
- }
- };
- DebugPlugin.getDefault().addDebugEventListener(processListener);
- }
-
- protected void stopImpl() {
- if (ping != null) {
- ping.stopPinging();
- ping = null;
- }
- if (process != null) {
- process = null;
- DebugPlugin.getDefault().removeDebugEventListener(processListener);
- processListener = null;
- }
- setServerState(IServer.STATE_STOPPED);
- }
-
- /**
- * Terminates the server.
- */
- public void terminate() {
- if (getServer().getServerState() == IServer.STATE_STOPPED)
- return;
-
- try {
- setServerState(IServer.STATE_STOPPING);
- Trace.trace(Trace.FINEST, "Killing the Server process");
- if (process != null && !process.isTerminated()) {
- process.terminate();
- stopImpl();
- }
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error killing the process", e);
- }
- }
-
- private List getStopClasspath() {
- String cpRef = getServerDefinition().getStop().getClasspathReference();
- return serverClasspath(cpRef);
- }
-
-
-}
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/GenericServerLaunchConfigurationDelegate.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/GenericServerLaunchConfigurationDelegate.java
deleted file mode 100644
index c2c4727..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/GenericServerLaunchConfigurationDelegate.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Gorkem Ercan - initial API and implementation
- * Naci M. Dai
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-package org.eclipse.jst.server.generic.internal.core;
-
-import java.io.File;
-import java.util.Map;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate;
-import org.eclipse.jdt.launching.ExecutionArguments;
-import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
-import org.eclipse.jdt.launching.IVMInstall;
-import org.eclipse.jdt.launching.IVMRunner;
-import org.eclipse.jdt.launching.VMRunnerConfiguration;
-import org.eclipse.jst.server.generic.core.CorePlugin;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.ServerCore;
-import org.eclipse.wst.server.core.model.ServerBehaviourDelegate;
-/**
- * ServerLaunchConfiguration for the generic server.
- *
- * @author Gorkem Ercan
- */
-public class GenericServerLaunchConfigurationDelegate extends AbstractJavaLaunchConfigurationDelegate {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate#launch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String, org.eclipse.debug.core.ILaunch, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void launch(ILaunchConfiguration configuration, String mode,
- ILaunch launch, IProgressMonitor monitor) throws CoreException {
-
- String serverId = configuration.getAttribute(IServer.ATTR_SERVER_ID, (String) null);
-
- IServer server = ServerCore.findServer(serverId);
- if (server == null)
- {
- abort("Server "+serverId+" does not exist", null, IJavaLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
- }
-
- GenericServerBehaviour genericServer = (GenericServerBehaviour)server.getAdapter(ServerBehaviourDelegate.class);
- genericServer.setupLaunch(launch, mode, monitor);
-
- String mainTypeName = genericServer.getStartClassName();
-
- IVMInstall vm = verifyVMInstall(configuration);
-
- IVMRunner runner = vm.getVMRunner(mode);
-
- File workingDir = verifyWorkingDirectory(configuration);
- String workingDirName = null;
- if (workingDir != null)
- workingDirName = workingDir.getAbsolutePath();
-
- // Program & VM args
- String pgmArgs = getProgramArguments(configuration);
- String vmArgs = getVMArguments(configuration);
-
- ExecutionArguments execArgs = new ExecutionArguments(vmArgs, pgmArgs);
-
- // VM-specific attributes
- Map vmAttributesMap = getVMSpecificAttributesMap(configuration);
-
- // Classpath
- String[] classpath = getClasspath(configuration);
-
- // Create VM config
- VMRunnerConfiguration runConfig = new VMRunnerConfiguration(mainTypeName, classpath);
- runConfig.setProgramArguments(execArgs.getProgramArgumentsArray());
- runConfig.setVMArguments(execArgs.getVMArgumentsArray());
- runConfig.setWorkingDirectory(workingDirName);
- runConfig.setVMSpecificAttributesMap(vmAttributesMap);
-
- // Bootpath
- String[] bootpath = getBootpath(configuration);
- if (bootpath != null && bootpath.length > 0)
- runConfig.setBootClassPath(bootpath);
-
- setDefaultSourceLocator(launch, configuration);
-
- // Launch the configuration
- runner.run(runConfig, launch, monitor);
- genericServer.setProcess(launch.getProcesses()[0]);
-
- }
-
- /**
- * Throws a core exception with the given message and optional
- * exception. The exception's status code will indicate an error.
- *
- * @param message error message
- * @param exception cause of the error, or <code>null</code>
- * @exception CoreException with the given message and underlying
- * exception
- */
- protected void abort(String message, Throwable exception, int code) throws CoreException {
- throw new CoreException(new Status(IStatus.ERROR, CorePlugin.getDefault().getBundle().getSymbolicName(), code, message, exception));
- }
-
-}
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/GenericServerLaunchableAdapterDelegate.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/GenericServerLaunchableAdapterDelegate.java
deleted file mode 100644
index bd80970..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/GenericServerLaunchableAdapterDelegate.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Gorkem Ercan - initial API and implementation
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-package org.eclipse.jst.server.generic.internal.core;
-
-import java.net.URL;
-
-import org.eclipse.wst.server.core.ILaunchable;
-import org.eclipse.wst.server.core.IModuleArtifact;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.model.*;
-import org.eclipse.wst.server.core.util.HttpLaunchable;
-import org.eclipse.jst.server.j2ee.IWebModule;
-import org.eclipse.jst.server.j2ee.Servlet;
-import org.eclipse.jst.server.j2ee.WebResource;
-/**
- * Web Launchable adapter delegate
- * @author Gorkem Ercan
- */
-public class GenericServerLaunchableAdapterDelegate extends LaunchableAdapterDelegate {
- /*
- * @see ILaunchableAdapterDelegate#getLaunchable(IServer, IModuleObject)
- */
- public ILaunchable getLaunchable(IServer server, IModuleArtifact moduleObject) {
-
- ServerDelegate delegate = (ServerDelegate)server.getAdapter(ServerDelegate.class);
- if (!(delegate instanceof GenericServer))
- return null;
- if (!(moduleObject instanceof Servlet) &&
- !(moduleObject instanceof WebResource))
- return null;
- if (moduleObject.getModule().getAdapter(IWebModule.class) == null)
- return null;
-
- try {
- URL url = ((IURLProvider) delegate).getModuleRootURL(moduleObject.getModule());
-
- Trace.trace("root: " + url);
-
- if (moduleObject instanceof Servlet) {
- Servlet servlet = (Servlet) moduleObject;
- if (servlet.getAlias() != null) {
- String path = servlet.getAlias();
- if (path.startsWith("/"))
- path = path.substring(1);
- url = new URL(url, path);
- } else
- url = new URL(url, "servlet/" + servlet.getServletClassName());
- } else if (moduleObject instanceof WebResource) {
- WebResource resource = (WebResource) moduleObject;
- String path = resource.getPath().toString();
- Trace.trace("path: " + path);
- if (path != null && path.startsWith("/") && path.length() > 0)
- path = path.substring(1);
- if (path != null && path.length() > 0)
- url = new URL(url, path);
- }
- return new HttpLaunchable(url);
- } catch (Exception e) {
- Trace.trace("Error getting URL for " + moduleObject, e);
- return null;
- }
- }
-}
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/GenericServerRuntime.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/GenericServerRuntime.java
deleted file mode 100644
index d059037..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/GenericServerRuntime.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Gorkem Ercan - initial API and implementation
- * Naci M. Dai
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-package org.eclipse.jst.server.generic.internal.core;
-
-import java.io.File;
-import java.util.Iterator;
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jdt.launching.IVMInstall;
-import org.eclipse.jdt.launching.JavaRuntime;
-import org.eclipse.jst.server.core.IGenericRuntime;
-import org.eclipse.jst.server.generic.core.CorePlugin;
-import org.eclipse.jst.server.generic.core.GenericServerCoreMessages;
-import org.eclipse.jst.server.generic.servertype.definition.ArchiveType;
-import org.eclipse.jst.server.generic.servertype.definition.Classpath;
-import org.eclipse.jst.server.generic.servertype.definition.ServerRuntime;
-import org.eclipse.wst.server.core.model.RuntimeDelegate;
-/**
- * Generic server runtime support.
- *
- * @author Gorkem Ercan
- */
-public class GenericServerRuntime extends RuntimeDelegate implements IGenericRuntime
-{
-
- public static final String SERVER_DEFINITION_ID = "server_definition_id";
- public static final String SERVER_INSTANCE_PROPERTIES = "generic_server_instance_properties";
- /* (non-Javadoc)
- * @see org.eclipse.jst.server.core.IGenericRuntime#getVMInstallTypeId()
- */
- public String getVMInstallTypeId() {
- return JavaRuntime.getDefaultVMInstall().getVMInstallType().getId();
- // TODO configurable.
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jst.server.core.IGenericRuntime#getVMInstallId()
- */
- public String getVMInstallId() {
- return JavaRuntime.getDefaultVMInstall().getId();
- // TODO configurable.
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jst.server.core.IGenericRuntime#getVMInstall()
- */
- public IVMInstall getVMInstall() {
- return JavaRuntime.getDefaultVMInstall();
- // TODO configurable
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jst.server.core.IGenericRuntime#validate()
- */
- public IStatus validate() {
- if (getVMInstall() == null)
- return new Status(IStatus.ERROR, CorePlugin.PLUGIN_ID, 0, GenericServerCoreMessages.getString("errorJRE"), null);
-
- ServerRuntime serverTypeDefinition = getServerTypeDefinition();
- if(serverTypeDefinition == null)
- return new Status(IStatus.ERROR, CorePlugin.PLUGIN_ID, 0, GenericServerCoreMessages.getString("errorNoServerType"), null);
- if(serverTypeDefinition.getClasspath()== null || serverTypeDefinition.getClasspath().size()<1)
- return new Status(IStatus.ERROR, CorePlugin.PLUGIN_ID, 0 ,GenericServerCoreMessages.getString("errorNoClasspath"),null);
- Iterator cpList = serverTypeDefinition.getClasspath().iterator();
- while (cpList.hasNext()) {
- Classpath cpth = (Classpath) cpList.next();
- if(cpth.getArchive()== null || cpth.getArchive().size()<1)
- return new Status(IStatus.ERROR, CorePlugin.PLUGIN_ID, 0 ,GenericServerCoreMessages.getString("errorNoClasspath"),null);
- Iterator archIter = cpth.getArchive().iterator();
- while (archIter.hasNext()) {
- ArchiveType arch = (ArchiveType) archIter.next();
- String arcPath = serverTypeDefinition.getResolver().resolveProperties(arch.getPath());
- File f = new File(arcPath);
- if(f.exists()==false)
- return new Status(IStatus.ERROR, CorePlugin.PLUGIN_ID, 0 ,GenericServerCoreMessages.getFormattedString("errorMissingClasspathEntry",new String[]{f.getPath()} ),null);
- }
-
- }
- return new Status(IStatus.OK, CorePlugin.PLUGIN_ID, 0, "", null);
- }
- /**
- * Returns the ServerTypeDefinition for this runtime.
- * Populated with the user properties if exists.
- *
- * @return populated ServerTypeDefinition
- */
- public ServerRuntime getServerTypeDefinition()
- {
- String id= getAttribute(SERVER_DEFINITION_ID,(String)null);
- Map properties = getAttribute(SERVER_INSTANCE_PROPERTIES,(Map)null);
- if(id==null)
- return null;
- return CorePlugin.getDefault().getServerTypeDefinitionManager().getServerRuntimeDefinition(id,properties);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/GenericServerRuntimeTargetHandler.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/GenericServerRuntimeTargetHandler.java
deleted file mode 100644
index 6c5684e..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/GenericServerRuntimeTargetHandler.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Gorkem Ercan - initial API and implementation
- * Naci M. Dai
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-package org.eclipse.jst.server.generic.internal.core;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.launching.IVMInstall;
-import org.eclipse.jdt.launching.JavaRuntime;
-import org.eclipse.jst.server.core.ClasspathRuntimeTargetHandler;
-import org.eclipse.jst.server.generic.servertype.definition.ServerRuntime;
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.model.RuntimeDelegate;
-/**
- * Provides the Classpath containers to be added into project classpaths.
- *
- * @author Gorkem Ercan
- */
-public class GenericServerRuntimeTargetHandler extends
- ClasspathRuntimeTargetHandler {
-
- /* (non-Javadoc)
- * @see ClasspathRuntimeTargetHandler#getId()
- */
- public String getId() {
- return "org.eclipse.jst.server.generic.runtimeTarget";
- }
-
- /* (non-Javadoc)
- * @see ClasspathRuntimeTargetHandler#getClasspathContainerLabel(IRuntime, java.lang.String)
- */
- public String getClasspathContainerLabel(IRuntime runtime, String id) {
- ServerRuntime definition= ServerTypeDefinitionUtil.getServerTypeDefinition(runtime);
- return definition.getName();
- }
-
- /* (non-Javadoc)
- * @see ClasspathRuntimeTargetHandler#resolveClasspathContainer(IRuntime, java.lang.String)
- */
- public IClasspathEntry[] resolveClasspathContainer(IRuntime runtime,
- String id)
- {
- return ServerTypeDefinitionUtil.getServerClassPathEntry(runtime);
- }
-
- public String[] getClasspathEntryIds(IRuntime runtime) {
- // Values do not realy have any use but the number of entries give the number of
- // containers you have.
- return new String[1];
- }
-
- public IClasspathEntry[] getDelegateClasspathEntries(IRuntime runtime, IProgressMonitor monitor) {
- GenericServerRuntime genericRuntime = (GenericServerRuntime)runtime.getAdapter(RuntimeDelegate.class);
- IVMInstall vmInstall = genericRuntime.getVMInstall();
- if (vmInstall != null) {
- String name = vmInstall.getName();
- return new IClasspathEntry[] { JavaCore.newContainerEntry(new Path(JavaRuntime.JRE_CONTAINER).append("org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType").append(name)) };
- }
- return null;
- }
-}
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/GenericServerSourcePathComputerDelegate.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/GenericServerSourcePathComputerDelegate.java
deleted file mode 100644
index feb058e..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/GenericServerSourcePathComputerDelegate.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Gorkem Ercan - initial API and implementation
- * Naci M. Dai
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-package org.eclipse.jst.server.generic.internal.core;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.sourcelookup.ISourceContainer;
-import org.eclipse.debug.core.sourcelookup.ISourcePathComputerDelegate;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.internal.launching.JavaSourceLookupUtil;
-import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
-import org.eclipse.jdt.launching.JavaRuntime;
-/**
- * SourcePathComputer for the GenericLaunchConfiguration.
- *
- * @author Gorkem Ercan
- */
-public class GenericServerSourcePathComputerDelegate implements ISourcePathComputerDelegate {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.sourcelookup.ISourcePathComputerDelegate#computeSourceContainers(org.eclipse.debug.core.ILaunchConfiguration, org.eclipse.core.runtime.IProgressMonitor)
- */
- public ISourceContainer[] computeSourceContainers(ILaunchConfiguration configuration, IProgressMonitor monitor) throws CoreException {
-
- IRuntimeClasspathEntry[] unresolvedEntries = JavaRuntime.computeUnresolvedSourceLookupPath(configuration);
- // FIXME have only the projects of registered modules.
- IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- List javaProjectList = new ArrayList();
- for(int i = 0; i<projects.length;i++)
- {
- if(projects[i].hasNature(JavaCore.NATURE_ID))
- {
- IJavaProject javaProject = (IJavaProject) projects[i].getNature(JavaCore.NATURE_ID);
- javaProjectList.add(javaProject);
- }
- }
- IRuntimeClasspathEntry[] projectEntries = new IRuntimeClasspathEntry[javaProjectList.size()];
- for (int i = 0; i < javaProjectList.size(); i++) {
- projectEntries[i] = JavaRuntime.newProjectRuntimeClasspathEntry((IJavaProject)javaProjectList.get(i));
- }
- IRuntimeClasspathEntry[] entries = new IRuntimeClasspathEntry[projectEntries.length+unresolvedEntries.length];
- System.arraycopy(unresolvedEntries,0,entries,0,unresolvedEntries.length);
- System.arraycopy(projectEntries,0,entries,unresolvedEntries.length,projectEntries.length);
-
- IRuntimeClasspathEntry[] resolved = JavaRuntime.resolveSourceLookupPath(entries, configuration);
- return JavaSourceLookupUtil.translate(resolved, true);
- }}
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/ServerTypeDefinitionManager.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/ServerTypeDefinitionManager.java
deleted file mode 100644
index 1c52ad2..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/ServerTypeDefinitionManager.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Gorkem Ercan - initial API and implementation
- * Naci M. Dai
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-package org.eclipse.jst.server.generic.internal.core;
-
-import java.net.URL;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.jst.server.generic.internal.xml.XMLUtils;
-import org.eclipse.jst.server.generic.servertype.definition.ServerRuntime;
-/**
- * Manages the retrieaval of ServerTypeDefinitions.
- *
- * @author Gorkem Ercan
- */
-
-public class ServerTypeDefinitionManager
-{
- private XMLUtils fXmlUtils;
-
- public ServerTypeDefinitionManager(URL serverDefinitionURL)
- {
- super();
- fXmlUtils = new XMLUtils(serverDefinitionURL);
- }
-
-
- public ServerRuntime getServerRuntimeDefinition(String id, Map properties)
- {
- ServerRuntime definition = fXmlUtils.getServerTypeDefinitionNamed(id);
- definition.setPropertyValues(properties);
- return definition;
- }
-
- public ServerRuntime[] getServerTypeDefinitions()
- {
- List definitionList = fXmlUtils.getServerTypeDefinitions();
- return (ServerRuntime[])definitionList.toArray(new ServerRuntime[definitionList.size()]);
- }
-}
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/ServerTypeDefinitionUtil.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/ServerTypeDefinitionUtil.java
deleted file mode 100644
index 9d0bf65..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/ServerTypeDefinitionUtil.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Gorkem Ercan - initial API and implementation
- * Naci M. Dai
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-
-package org.eclipse.jst.server.generic.internal.core;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.Map;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jst.server.generic.core.CorePlugin;
-import org.eclipse.jst.server.generic.servertype.definition.ArchiveType;
-import org.eclipse.jst.server.generic.servertype.definition.Classpath;
-import org.eclipse.jst.server.generic.servertype.definition.ServerRuntime;
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.model.RuntimeDelegate;
-
-/**
- * Utilities for ServerRuntime definition files.
- *
- * @author Gorkem Ercan
- */
-public class ServerTypeDefinitionUtil
-{
- /**
- *
- * @param runtime
- * @return
- */
- public static ServerRuntime getServerTypeDefinition(IRuntime runtime)
- {
- RuntimeDelegate delegate = (RuntimeDelegate)runtime.getAdapter(RuntimeDelegate.class);
- String serverType = delegate.getAttribute(GenericServerRuntime.SERVER_DEFINITION_ID,(String)null);
- Map properties = delegate.getAttribute(GenericServerRuntime.SERVER_INSTANCE_PROPERTIES,(Map)null);
- ServerRuntime definition =
- CorePlugin.getDefault().getServerTypeDefinitionManager().getServerRuntimeDefinition(serverType,properties);
- return definition;
- }
-
- public static IClasspathEntry[] getServerClassPathEntry(IRuntime runtime)
- {
- ServerRuntime definition = getServerTypeDefinition(runtime);
- String ref = definition.getProject().getClasspathReference();
- Classpath cp = definition.getClasspath(ref);
- Iterator archives = cp.getArchive().iterator();
- ArrayList entryList = new ArrayList();
- while (archives.hasNext()) {
- ArchiveType archive = (ArchiveType) archives.next();
- String item = definition.getResolver().resolveProperties(archive.getPath());
- IClasspathEntry entry = JavaCore.newLibraryEntry(new Path(item),null,null );
- entryList.add(entry);
- }
-
- return (IClasspathEntry[])entryList.toArray(new IClasspathEntry[entryList.size()]);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/Trace.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/Trace.java
deleted file mode 100644
index 6484869..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/core/Trace.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package org.eclipse.jst.server.generic.internal.core;
-
-import org.eclipse.jst.server.generic.core.CorePlugin;
-
-/**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-/**
- * Helper class to route trace output.
- */
-public class Trace {
- public static byte CONFIG = 0;
- public static byte WARNING = 1;
- public static byte SEVERE = 2;
- public static byte FINEST = 3;
- public static byte FINER = 4;
-
- /**
- * Trace constructor comment.
- */
- private Trace() {
- super();
- }
-
- /**
- * Trace the given text.
- *
- * @param s java.lang.String
- */
- public static void trace(byte level, String s) {
- Trace.trace(level, s, null);
- }
-
- /**
- * Trace the given message and exception.
- *
- * @param s java.lang.String
- * @param t java.lang.Throwable
- */
- public static void trace(byte level, String s, Throwable t) {
- if (!CorePlugin.getDefault().isDebugging())
- return;
-
- System.out.println(s);
- if (t != null)
- t.printStackTrace();
- }
-
- /**
- * Trace the given text.
- *
- * @param s java.lang.String
- */
- public static void trace(String s) {
- trace(s, null);
- }
-
- /**
- * Trace the given exception.
- *
- * @param s java.lang.String
- * @param e java.lang.Throwable
- */
- public static void trace(String s, Throwable t) {
- trace(FINEST, s, t);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/xml/Resolver.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/xml/Resolver.java
deleted file mode 100644
index ddf43e4..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/xml/Resolver.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Naci M. Dai - initial API and implementation
- *
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-
-package org.eclipse.jst.server.generic.internal.xml;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.jst.server.generic.servertype.definition.ArchiveType;
-import org.eclipse.jst.server.generic.servertype.definition.Property;
-import org.eclipse.jst.server.generic.servertype.definition.ServerRuntime;
-
-
-public class Resolver {
-
-
-
- private Map fPropertyValues = new HashMap();
- private ServerRuntime server;
-
- /**
- * @param impl
- */
- public Resolver(ServerRuntime runtime) {
- this.server = runtime;
- }
-
- public List resolveClasspathProperties(List cpList)
- {
- ArrayList list = new ArrayList(cpList.size());
- for (int i = 0; i < cpList.size(); i++) {
- ArchiveType item = (ArchiveType) cpList.get(i);
- String cpath = resolveProperties(item.getPath());
- list.add(cpath);
- }
- return list;
- }
- public String resolveProperties(String proppedString) {
- HashMap cache = new HashMap(getProperties().size());
- Iterator itr = getProperties().iterator();
- while (itr.hasNext()) {
- Property element =(Property) itr.next();
- String value = element.getDefault();
- if(fPropertyValues != null && fPropertyValues.containsKey(element.getId()))
- value=(String)fPropertyValues.get(element.getId());
- cache.put(element.getId(), value);
- }
- //String vmPath = install.getInstallLocation().getCanonicalPath();
- //vmPath = vmPath.replace('\\', '/');
- cache.put("jrePath", "JRE");
-
- String str = resolvePropertiesFromCache(proppedString, cache);
- str = fixPassthroughProperties(str);
- return str;
- }
-
- /**
- * @return
- */
- private List getProperties() {
- return this.server.getProperty();
- }
-
- /**
- * @param str
- * @return
- */
- private String fixPassthroughProperties(String str) {
- String resolvedString = str;
- if (isPassPropertyLeft(resolvedString)) {
- resolvedString = fixParam(resolvedString);
- resolvedString = fixPassthroughProperties(resolvedString);
- }
- return resolvedString;
- }
-
- private String resolvePropertiesFromCache(
- String proppedString,
- HashMap cache) {
- String resolvedString = proppedString;
- int start = skipToProperty(resolvedString,cache);
- if (start >= 0) {
- resolvedString = resolveProperty(resolvedString, start, cache);
- resolvedString = resolvePropertiesFromCache(resolvedString, cache);
- }
- return resolvedString;
- }
-
- private int skipToProperty(String str,HashMap cache) {
- int start = -1;
- int end = 0;
- String value = null;
- do {
- start = str.indexOf("${",end);
- if( start < 0)
- return start;
- end = str.indexOf("}", start);
-
- String key = str.substring(start + 2, end);
- value = (String)cache.get(key);
- }
- while(value == null);
- return start;
- }
-
- private boolean isPassPropertyLeft(String str) {
- return str.indexOf("%{") >= 0;
- }
-
- private String resolveProperty(String proppedString, int start, HashMap cache) {
- String str = proppedString;
- start = str.indexOf("${");
- int end = str.indexOf("}", start);
- String key = str.substring(start + 2, end);
- String value = (String)cache.get(key);
- if(value == null )
- return str;
- return str.substring(0, start)
- + value
- + str.substring(end + 1);
- }
-
- private String fixParam(String proppedString) {
- String str = proppedString;
- int start = str.indexOf("%{");
- return str.substring(0, start)
- + "${"
- + str.substring(start+2);
- }
-
- /**
- * @return Returns the fPropertyValues.
- */
- public Map getPropertyValues() {
- return fPropertyValues;
- }
- /**
- * @param propertyValues The fPropertyValues to set.
- */
- public void setPropertyValues(Map propertyValues) {
- fPropertyValues = propertyValues;
- }
-}
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/xml/XMLUtils.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/xml/XMLUtils.java
deleted file mode 100644
index 75968e8..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/internal/xml/XMLUtils.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Naci M. Dai - initial API and implementation
- *
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-
-package org.eclipse.jst.server.generic.internal.xml;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.emf.common.util.WrappedException;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;
-import org.eclipse.jst.server.generic.core.CorePlugin;
-import org.eclipse.jst.server.generic.servertype.definition.ServerRuntime;
-import org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage;
-
-/**
- * @author Naci Dai
- */
-public class XMLUtils {
-
- ArrayList definitions;
-
- File sourceDir;
-
- public XMLUtils(URL installUrl) {
- String serversPath = installUrl.getPath() + "/servers";
- URI uri;
- try {
- uri = new URI(installUrl.getProtocol(), installUrl.getHost(),
- serversPath, installUrl.getQuery());
- sourceDir = new File(uri);
- } catch (URISyntaxException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
- refresh();
- }
-
- public void refresh() {
- definitions = scanFiles(sourceDir);
- }
-
- public void update(ServerRuntime element) {
- toFile(element);
- }
-
- public void update() {
- Iterator defs = definitions.iterator();
- while (defs.hasNext()) {
- ServerRuntime element = (ServerRuntime) defs.next();
- update(element);
- }
- }
-
- private void toFile(ServerRuntime def) {
- try {
-
- File f = new File(def.getFilename());
- f.renameTo(new File(f.getCanonicalFile() + ".bak"));
- } catch (IOException e) {
- }
-
- try {
- FileOutputStream out = new FileOutputStream(def.getFilename());
- out.write(def.toString().getBytes());
- out.close();
- } catch (FileNotFoundException e) {
- } catch (IOException e) {
- }
- }
-
- private ArrayList scanFiles(File dir) {
- ArrayList all = new ArrayList();
- if (dir.isDirectory()) {
- File[] allServers = dir.listFiles(new FilenameFilter() {
- /*
- * (non-Javadoc)
- *
- * @see java.io.FilenameFilter#accept(java.io.File,
- * java.lang.String)
- */
- public boolean accept(File dir, String name) {
- if (name.endsWith(".server"))
- return true;
- return false;
- }
-
- });
-
- for (int i = 0; i < allServers.length; i++) {
- File file = allServers[i];
-
- // Create a resource set.
- ResourceSet resourceSet = new ResourceSetImpl();
-
- // Register the default resource factory -- only needed for
- // stand-alone!
- resourceSet.getResourceFactoryRegistry()
- .getExtensionToFactoryMap().put(
- Resource.Factory.Registry.DEFAULT_EXTENSION,
- new XMIResourceFactoryImpl());
-
- ServerTypePackage gstPack = ServerTypePackage.eINSTANCE;
-
- // Get the URI of the model file.
- org.eclipse.emf.common.util.URI fileURI = org.eclipse.emf.common.util.URI
- .createFileURI(file.getAbsolutePath());
-
- // Demand load the resource for this file.
- Resource resource=null;
- try {
- resource = resourceSet.getResource(fileURI, true);
- } catch (WrappedException e) {
-// sth wrong with this .server file.
- CorePlugin.getDefault().getLog().log(new Status(IStatus.ERROR,CorePlugin.PLUGIN_ID,1,"Error loading the server type definition",e));
- }
- if(resource!=null) {
- ServerRuntime def = (ServerRuntime) resource.getContents().get(0);
- if (def != null) {
- def.setFilename(file.getAbsolutePath());
- all.add(def);
- }
- }
- }
- }
-
- return all;
- }
-
- /**
- * @return ArrayList
- */
- public ArrayList getServerTypeDefinitions() {
- return definitions;
- }
-
- /**
- * @return ArrayList
- */
- public ServerRuntime getServerTypeDefinitionNamed(String name) {
- refresh();
- Iterator defs = getServerTypeDefinitions().iterator();
- while (defs.hasNext()) {
- ServerRuntime elem = (ServerRuntime) defs.next();
- if (name.equals(elem.getName()))
- return elem;
- }
- return null;
- }
-
- /**
- * Sets the definitions.
- *
- * @param definitions
- * The definitions to set
- */
- public void setDefinitions(ArrayList definitions) {
- this.definitions = definitions;
- }
-
-
-
-}
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/ArchiveType.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/ArchiveType.java
deleted file mode 100644
index d5c641c..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/ArchiveType.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * <copyright>
- *******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************
- * </copyright>
- *
- * $Id: ArchiveType.java,v 1.1 2004/11/20 21:18:10 ndai Exp $
- */
-package org.eclipse.jst.server.generic.servertype.definition;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Archive Type</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.ArchiveType#getPath <em>Path</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getArchiveType()
- * @model
- * @generated
- */
-public interface ArchiveType extends EObject {
- /**
- * Returns the value of the '<em><b>Path</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Path</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Path</em>' attribute.
- * @see #setPath(String)
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getArchiveType_Path()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- String getPath();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.server.generic.servertype.definition.ArchiveType#getPath <em>Path</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Path</em>' attribute.
- * @see #getPath()
- * @generated
- */
- void setPath(String value);
-
-} // ArchiveType
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/Classpath.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/Classpath.java
deleted file mode 100644
index 716d138..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/Classpath.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/**
- * <copyright>
- *******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************
- * </copyright>
- *
- * $Id: Classpath.java,v 1.1 2004/11/20 21:18:10 ndai Exp $
- */
-package org.eclipse.jst.server.generic.servertype.definition;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EObject;
-
-import org.eclipse.emf.ecore.util.FeatureMap;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Classpath</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.Classpath#getGroup <em>Group</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.Classpath#getArchive <em>Archive</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.Classpath#getId <em>Id</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.Classpath#isIsLibrary <em>Is Library</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getClasspath()
- * @model
- * @generated
- */
-public interface Classpath extends EObject {
- /**
- * Returns the value of the '<em><b>Group</b></em>' attribute list.
- * The list contents are of type {@link org.eclipse.emf.ecore.util.FeatureMap.Entry}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Group</em>' attribute list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Group</em>' attribute list.
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getClasspath_Group()
- * @model unique="false" dataType="org.eclipse.emf.ecore.EFeatureMapEntry" many="true"
- * @generated
- */
- FeatureMap getGroup();
-
- /**
- * Returns the value of the '<em><b>Archive</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jst.server.generic.servertype.definition.ArchiveType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Archive</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Archive</em>' containment reference list.
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getClasspath_Archive()
- * @model type="org.eclipse.jst.server.generic.servertype.definition.ArchiveType" containment="true" resolveProxies="false" required="true" transient="true" volatile="true" derived="true"
- * @generated
- */
- EList getArchive();
-
- /**
- * Returns the value of the '<em><b>Id</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Id</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Id</em>' attribute.
- * @see #setId(String)
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getClasspath_Id()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- String getId();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.server.generic.servertype.definition.Classpath#getId <em>Id</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Id</em>' attribute.
- * @see #getId()
- * @generated
- */
- void setId(String value);
-
- /**
- * Returns the value of the '<em><b>Is Library</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Is Library</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Is Library</em>' attribute.
- * @see #isSetIsLibrary()
- * @see #unsetIsLibrary()
- * @see #setIsLibrary(boolean)
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getClasspath_IsLibrary()
- * @model unique="false" unsettable="true" dataType="org.eclipse.emf.ecore.xml.type.Boolean"
- * @generated
- */
- boolean isIsLibrary();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.server.generic.servertype.definition.Classpath#isIsLibrary <em>Is Library</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Is Library</em>' attribute.
- * @see #isSetIsLibrary()
- * @see #unsetIsLibrary()
- * @see #isIsLibrary()
- * @generated
- */
- void setIsLibrary(boolean value);
-
- /**
- * Unsets the value of the '{@link org.eclipse.jst.server.generic.servertype.definition.Classpath#isIsLibrary <em>Is Library</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetIsLibrary()
- * @see #isIsLibrary()
- * @see #setIsLibrary(boolean)
- * @generated
- */
- void unsetIsLibrary();
-
- /**
- * Returns whether the value of the '{@link org.eclipse.jst.server.generic.servertype.definition.Classpath#isIsLibrary <em>Is Library</em>}' attribute is set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em>Is Library</em>' attribute is set.
- * @see #unsetIsLibrary()
- * @see #isIsLibrary()
- * @see #setIsLibrary(boolean)
- * @generated
- */
- boolean isSetIsLibrary();
-
-} // Classpath
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/LaunchConfiguration.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/LaunchConfiguration.java
deleted file mode 100644
index 6f7ef6a..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/LaunchConfiguration.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/**
- * <copyright>
- *******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************
- * </copyright>
- *
- * $Id: LaunchConfiguration.java,v 1.1 2004/11/20 21:18:10 ndai Exp $
- */
-package org.eclipse.jst.server.generic.servertype.definition;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Launch Configuration</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.LaunchConfiguration#getClass_ <em>Class</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.LaunchConfiguration#getWorkingDirectory <em>Working Directory</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.LaunchConfiguration#getProgramArguments <em>Program Arguments</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.LaunchConfiguration#getVmParameters <em>Vm Parameters</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.LaunchConfiguration#getClasspathReference <em>Classpath Reference</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getLaunchConfiguration()
- * @model
- * @generated
- */
-public interface LaunchConfiguration extends EObject {
- /**
- * Returns the value of the '<em><b>Class</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Class</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Class</em>' attribute.
- * @see #setClass(String)
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getLaunchConfiguration_Class()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- String getClass_();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.server.generic.servertype.definition.LaunchConfiguration#getClass_ <em>Class</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Class</em>' attribute.
- * @see #getClass_()
- * @generated
- */
- void setClass(String value);
-
- /**
- * Returns the value of the '<em><b>Working Directory</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Working Directory</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Working Directory</em>' attribute.
- * @see #setWorkingDirectory(String)
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getLaunchConfiguration_WorkingDirectory()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- String getWorkingDirectory();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.server.generic.servertype.definition.LaunchConfiguration#getWorkingDirectory <em>Working Directory</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Working Directory</em>' attribute.
- * @see #getWorkingDirectory()
- * @generated
- */
- void setWorkingDirectory(String value);
-
- /**
- * Returns the value of the '<em><b>Program Arguments</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Program Arguments</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Program Arguments</em>' attribute.
- * @see #setProgramArguments(String)
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getLaunchConfiguration_ProgramArguments()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- String getProgramArguments();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.server.generic.servertype.definition.LaunchConfiguration#getProgramArguments <em>Program Arguments</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Program Arguments</em>' attribute.
- * @see #getProgramArguments()
- * @generated
- */
- void setProgramArguments(String value);
-
- /**
- * Returns the value of the '<em><b>Vm Parameters</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Vm Parameters</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Vm Parameters</em>' attribute.
- * @see #setVmParameters(String)
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getLaunchConfiguration_VmParameters()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- String getVmParameters();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.server.generic.servertype.definition.LaunchConfiguration#getVmParameters <em>Vm Parameters</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Vm Parameters</em>' attribute.
- * @see #getVmParameters()
- * @generated
- */
- void setVmParameters(String value);
-
- /**
- * Returns the value of the '<em><b>Classpath Reference</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Classpath Reference</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Classpath Reference</em>' attribute.
- * @see #setClasspathReference(String)
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getLaunchConfiguration_ClasspathReference()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- String getClasspathReference();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.server.generic.servertype.definition.LaunchConfiguration#getClasspathReference <em>Classpath Reference</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Classpath Reference</em>' attribute.
- * @see #getClasspathReference()
- * @generated
- */
- void setClasspathReference(String value);
-
-} // LaunchConfiguration
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/Module.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/Module.java
deleted file mode 100644
index c9fdc40..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/Module.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- * <copyright>
- *******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************
- * </copyright>
- *
- * $Id: Module.java,v 1.1 2004/11/20 21:18:10 ndai Exp $
- */
-package org.eclipse.jst.server.generic.servertype.definition;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Module</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.Module#getType <em>Type</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.Module#getPublishDir <em>Publish Dir</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.Module#getPublisherReference <em>Publisher Reference</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getModule()
- * @model
- * @generated
- */
-public interface Module extends EObject {
- /**
- * Returns the value of the '<em><b>Type</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Type</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Type</em>' attribute.
- * @see #setType(String)
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getModule_Type()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- String getType();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.server.generic.servertype.definition.Module#getType <em>Type</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Type</em>' attribute.
- * @see #getType()
- * @generated
- */
- void setType(String value);
-
- /**
- * Returns the value of the '<em><b>Publish Dir</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Publish Dir</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Publish Dir</em>' attribute.
- * @see #setPublishDir(String)
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getModule_PublishDir()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- String getPublishDir();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.server.generic.servertype.definition.Module#getPublishDir <em>Publish Dir</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Publish Dir</em>' attribute.
- * @see #getPublishDir()
- * @generated
- */
- void setPublishDir(String value);
-
- /**
- * Returns the value of the '<em><b>Publisher Reference</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Publisher Reference</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Publisher Reference</em>' attribute.
- * @see #setPublisherReference(String)
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getModule_PublisherReference()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- String getPublisherReference();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.server.generic.servertype.definition.Module#getPublisherReference <em>Publisher Reference</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Publisher Reference</em>' attribute.
- * @see #getPublisherReference()
- * @generated
- */
- void setPublisherReference(String value);
-
-} // Module
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/Port.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/Port.java
deleted file mode 100644
index a933a53..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/Port.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- * <copyright>
- *******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************
- * </copyright>
- *
- * $Id: Port.java,v 1.1 2004/11/20 21:18:10 ndai Exp $
- */
-package org.eclipse.jst.server.generic.servertype.definition;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Port</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.Port#getNo <em>No</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.Port#getName <em>Name</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.Port#getProtocol <em>Protocol</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getPort()
- * @model
- * @generated
- */
-public interface Port extends EObject {
- /**
- * Returns the value of the '<em><b>No</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>No</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>No</em>' attribute.
- * @see #setNo(String)
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getPort_No()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- String getNo();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.server.generic.servertype.definition.Port#getNo <em>No</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>No</em>' attribute.
- * @see #getNo()
- * @generated
- */
- void setNo(String value);
-
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getPort_Name()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- String getName();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.server.generic.servertype.definition.Port#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- void setName(String value);
-
- /**
- * Returns the value of the '<em><b>Protocol</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Protocol</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Protocol</em>' attribute.
- * @see #setProtocol(String)
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getPort_Protocol()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- String getProtocol();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.server.generic.servertype.definition.Port#getProtocol <em>Protocol</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Protocol</em>' attribute.
- * @see #getProtocol()
- * @generated
- */
- void setProtocol(String value);
-
-} // Port
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/Project.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/Project.java
deleted file mode 100644
index 91980f3..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/Project.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * <copyright>
- *******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************
- * </copyright>
- *
- * $Id: Project.java,v 1.1 2004/11/20 21:18:10 ndai Exp $
- */
-package org.eclipse.jst.server.generic.servertype.definition;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Project</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.Project#getClasspathReference <em>Classpath Reference</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getProject()
- * @model
- * @generated
- */
-public interface Project extends EObject {
- /**
- * Returns the value of the '<em><b>Classpath Reference</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Classpath Reference</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Classpath Reference</em>' attribute.
- * @see #setClasspathReference(String)
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getProject_ClasspathReference()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- String getClasspathReference();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.server.generic.servertype.definition.Project#getClasspathReference <em>Classpath Reference</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Classpath Reference</em>' attribute.
- * @see #getClasspathReference()
- * @generated
- */
- void setClasspathReference(String value);
-
-} // Project
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/Property.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/Property.java
deleted file mode 100644
index 45f92eb..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/Property.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/**
- * <copyright>
- *******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************
- * </copyright>
- *
- * $Id: Property.java,v 1.1 2004/11/20 21:18:10 ndai Exp $
- */
-package org.eclipse.jst.server.generic.servertype.definition;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Property</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.Property#getContext <em>Context</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.Property#getDefault <em>Default</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.Property#getId <em>Id</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.Property#getLabel <em>Label</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.Property#getType <em>Type</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getProperty()
- * @model
- * @generated
- */
-public interface Property extends EObject {
- String CONTEXT_RUNTIME = "runtime";
- String CONTEXT_SERVER = "server";
-
- /**
- * Returns the value of the '<em><b>Context</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Context</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Context</em>' attribute.
- * @see #setContext(String)
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getProperty_Context()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- String getContext();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.server.generic.servertype.definition.Property#getContext <em>Context</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Context</em>' attribute.
- * @see #getContext()
- * @generated
- */
- void setContext(String value);
-
- /**
- * Returns the value of the '<em><b>Default</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Default</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Default</em>' attribute.
- * @see #setDefault(String)
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getProperty_Default()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- String getDefault();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.server.generic.servertype.definition.Property#getDefault <em>Default</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Default</em>' attribute.
- * @see #getDefault()
- * @generated
- */
- void setDefault(String value);
-
- /**
- * Returns the value of the '<em><b>Id</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Id</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Id</em>' attribute.
- * @see #setId(String)
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getProperty_Id()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- String getId();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.server.generic.servertype.definition.Property#getId <em>Id</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Id</em>' attribute.
- * @see #getId()
- * @generated
- */
- void setId(String value);
-
- /**
- * Returns the value of the '<em><b>Label</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Label</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Label</em>' attribute.
- * @see #setLabel(String)
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getProperty_Label()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- String getLabel();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.server.generic.servertype.definition.Property#getLabel <em>Label</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Label</em>' attribute.
- * @see #getLabel()
- * @generated
- */
- void setLabel(String value);
-
- /**
- * Returns the value of the '<em><b>Type</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Type</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Type</em>' attribute.
- * @see #setType(String)
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getProperty_Type()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- String getType();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.server.generic.servertype.definition.Property#getType <em>Type</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Type</em>' attribute.
- * @see #getType()
- * @generated
- */
- void setType(String value);
-
-} // Property
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/PublishType.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/PublishType.java
deleted file mode 100644
index e25cc36..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/PublishType.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
- * <copyright>
- *******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************
- * </copyright>
- *
- * $Id: PublishType.java,v 1.1 2004/11/20 21:18:10 ndai Exp $
- */
-package org.eclipse.jst.server.generic.servertype.definition;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Publish Type</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.PublishType#getTask <em>Task</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.PublishType#getClasspathReference <em>Classpath Reference</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getPublishType()
- * @model
- * @generated
- */
-public interface PublishType extends EObject {
- /**
- * Returns the value of the '<em><b>Task</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Task</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Task</em>' attribute.
- * @see #setTask(String)
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getPublishType_Task()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- String getTask();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.server.generic.servertype.definition.PublishType#getTask <em>Task</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Task</em>' attribute.
- * @see #getTask()
- * @generated
- */
- void setTask(String value);
-
- /**
- * Returns the value of the '<em><b>Classpath Reference</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Classpath Reference</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Classpath Reference</em>' attribute.
- * @see #setClasspathReference(String)
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getPublishType_ClasspathReference()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- String getClasspathReference();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.server.generic.servertype.definition.PublishType#getClasspathReference <em>Classpath Reference</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Classpath Reference</em>' attribute.
- * @see #getClasspathReference()
- * @generated
- */
- void setClasspathReference(String value);
-
-} // PublishType
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/Publisher.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/Publisher.java
deleted file mode 100644
index 542e36f..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/Publisher.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * <copyright>
- *******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************
- * </copyright>
- *
- * $Id: Publisher.java,v 1.1 2004/11/20 21:18:10 ndai Exp $
- */
-package org.eclipse.jst.server.generic.servertype.definition;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EObject;
-
-import org.eclipse.emf.ecore.util.FeatureMap;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Publisher</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.Publisher#getGroup <em>Group</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.Publisher#getPublish <em>Publish</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.Publisher#getUnpublish <em>Unpublish</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.Publisher#getId <em>Id</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getPublisher()
- * @model
- * @generated
- */
-public interface Publisher extends EObject {
- /**
- * Returns the value of the '<em><b>Group</b></em>' attribute list.
- * The list contents are of type {@link org.eclipse.emf.ecore.util.FeatureMap.Entry}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Group</em>' attribute list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Group</em>' attribute list.
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getPublisher_Group()
- * @model unique="false" dataType="org.eclipse.emf.ecore.EFeatureMapEntry" many="true"
- * @generated
- */
- FeatureMap getGroup();
-
- /**
- * Returns the value of the '<em><b>Publish</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jst.server.generic.servertype.definition.PublishType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Publish</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Publish</em>' containment reference list.
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getPublisher_Publish()
- * @model type="org.eclipse.jst.server.generic.servertype.definition.PublishType" containment="true" resolveProxies="false" required="true" transient="true" volatile="true" derived="true"
- * @generated
- */
- EList getPublish();
-
- /**
- * Returns the value of the '<em><b>Unpublish</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jst.server.generic.servertype.definition.UnpublishType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Unpublish</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Unpublish</em>' containment reference list.
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getPublisher_Unpublish()
- * @model type="org.eclipse.jst.server.generic.servertype.definition.UnpublishType" containment="true" resolveProxies="false" required="true" transient="true" volatile="true" derived="true"
- * @generated
- */
- EList getUnpublish();
-
- /**
- * Returns the value of the '<em><b>Id</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Id</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Id</em>' attribute.
- * @see #setId(String)
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getPublisher_Id()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- String getId();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.server.generic.servertype.definition.Publisher#getId <em>Id</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Id</em>' attribute.
- * @see #getId()
- * @generated
- */
- void setId(String value);
-
-} // Publisher
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/ServerRuntime.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/ServerRuntime.java
deleted file mode 100644
index 33e5b2d..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/ServerRuntime.java
+++ /dev/null
@@ -1,413 +0,0 @@
-/**
- * <copyright>
- *******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************
- * </copyright>
- *
- * $Id: ServerRuntime.java,v 1.1 2004/11/20 21:18:10 ndai Exp $
- */
-package org.eclipse.jst.server.generic.servertype.definition;
-
-import java.util.Map;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EObject;
-
-import org.eclipse.emf.ecore.util.FeatureMap;
-import org.eclipse.jst.server.generic.internal.xml.Resolver;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Server Runtime</b></em>'.
- * <!-- end-user-doc -->
- *
- * <!-- begin-model-doc -->
- *
- * Generic Server Type Definition. It must have a list of
- * properties.
- *
- * <!-- end-model-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getGroup <em>Group</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getProperty <em>Property</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getGroup1 <em>Group1</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getPort <em>Port</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getGroup2 <em>Group2</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getModule <em>Module</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getProject <em>Project</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getStart <em>Start</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getStop <em>Stop</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getGroup3 <em>Group3</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getPublisher <em>Publisher</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getGroup4 <em>Group4</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getClasspath <em>Classpath</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getName <em>Name</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getVersion <em>Version</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getServerRuntime()
- * @model
- * @generated
- */
-public interface ServerRuntime extends EObject {
- /**
- * Returns the value of the '<em><b>Group</b></em>' attribute list.
- * The list contents are of type {@link org.eclipse.emf.ecore.util.FeatureMap.Entry}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Group</em>' attribute list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Group</em>' attribute list.
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getServerRuntime_Group()
- * @model unique="false" dataType="org.eclipse.emf.ecore.EFeatureMapEntry" many="true"
- * @generated
- */
- FeatureMap getGroup();
-
- /**
- * Returns the value of the '<em><b>Property</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jst.server.generic.servertype.definition.Property}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Property</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Property</em>' containment reference list.
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getServerRuntime_Property()
- * @model type="org.eclipse.jst.server.generic.servertype.definition.Property" containment="true" resolveProxies="false" transient="true" volatile="true" derived="true"
- * @generated
- */
- EList getProperty();
-
- /**
- * Returns the value of the '<em><b>Group1</b></em>' attribute list.
- * The list contents are of type {@link org.eclipse.emf.ecore.util.FeatureMap.Entry}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Group1</em>' attribute list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Group1</em>' attribute list.
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getServerRuntime_Group1()
- * @model unique="false" dataType="org.eclipse.emf.ecore.EFeatureMapEntry" many="true"
- * @generated
- */
- FeatureMap getGroup1();
-
- /**
- * Returns the value of the '<em><b>Port</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jst.server.generic.servertype.definition.Port}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Port</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Port</em>' containment reference list.
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getServerRuntime_Port()
- * @model type="org.eclipse.jst.server.generic.servertype.definition.Port" containment="true" resolveProxies="false" transient="true" volatile="true" derived="true"
- * @generated
- */
- EList getPort();
-
- /**
- * Returns the value of the '<em><b>Group2</b></em>' attribute list.
- * The list contents are of type {@link org.eclipse.emf.ecore.util.FeatureMap.Entry}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Group2</em>' attribute list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Group2</em>' attribute list.
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getServerRuntime_Group2()
- * @model unique="false" dataType="org.eclipse.emf.ecore.EFeatureMapEntry" many="true"
- * @generated
- */
- FeatureMap getGroup2();
-
- /**
- * Returns the value of the '<em><b>Module</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jst.server.generic.servertype.definition.Module}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Module</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Module</em>' containment reference list.
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getServerRuntime_Module()
- * @model type="org.eclipse.jst.server.generic.servertype.definition.Module" containment="true" resolveProxies="false" required="true" transient="true" volatile="true" derived="true"
- * @generated
- */
- EList getModule();
-
- /**
- * Returns the value of the '<em><b>Project</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Project</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Project</em>' containment reference.
- * @see #setProject(Project)
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getServerRuntime_Project()
- * @model containment="true" resolveProxies="false" required="true"
- * @generated
- */
- Project getProject();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getProject <em>Project</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Project</em>' containment reference.
- * @see #getProject()
- * @generated
- */
- void setProject(Project value);
-
- /**
- * Returns the value of the '<em><b>Start</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Start</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Start</em>' containment reference.
- * @see #setStart(LaunchConfiguration)
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getServerRuntime_Start()
- * @model containment="true" resolveProxies="false" required="true"
- * @generated
- */
- LaunchConfiguration getStart();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getStart <em>Start</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Start</em>' containment reference.
- * @see #getStart()
- * @generated
- */
- void setStart(LaunchConfiguration value);
-
- /**
- * Returns the value of the '<em><b>Stop</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Stop</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Stop</em>' containment reference.
- * @see #setStop(LaunchConfiguration)
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getServerRuntime_Stop()
- * @model containment="true" resolveProxies="false" required="true"
- * @generated
- */
- LaunchConfiguration getStop();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getStop <em>Stop</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Stop</em>' containment reference.
- * @see #getStop()
- * @generated
- */
- void setStop(LaunchConfiguration value);
-
- /**
- * Returns the value of the '<em><b>Group3</b></em>' attribute list.
- * The list contents are of type {@link org.eclipse.emf.ecore.util.FeatureMap.Entry}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Group3</em>' attribute list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Group3</em>' attribute list.
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getServerRuntime_Group3()
- * @model unique="false" dataType="org.eclipse.emf.ecore.EFeatureMapEntry" many="true"
- * @generated
- */
- FeatureMap getGroup3();
-
- /**
- * Returns the value of the '<em><b>Publisher</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jst.server.generic.servertype.definition.Publisher}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Publisher</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Publisher</em>' containment reference list.
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getServerRuntime_Publisher()
- * @model type="org.eclipse.jst.server.generic.servertype.definition.Publisher" containment="true" resolveProxies="false" transient="true" volatile="true" derived="true"
- * @generated
- */
- EList getPublisher();
-
- /**
- * Returns the value of the '<em><b>Group4</b></em>' attribute list.
- * The list contents are of type {@link org.eclipse.emf.ecore.util.FeatureMap.Entry}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Group4</em>' attribute list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Group4</em>' attribute list.
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getServerRuntime_Group4()
- * @model unique="false" dataType="org.eclipse.emf.ecore.EFeatureMapEntry" many="true"
- * @generated
- */
- FeatureMap getGroup4();
-
- /**
- * Returns the value of the '<em><b>Classpath</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jst.server.generic.servertype.definition.Classpath}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Classpath</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Classpath</em>' containment reference list.
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getServerRuntime_Classpath()
- * @model type="org.eclipse.jst.server.generic.servertype.definition.Classpath" containment="true" resolveProxies="false" required="true" transient="true" volatile="true" derived="true"
- * @generated
- */
- EList getClasspath();
-
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getServerRuntime_Name()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- String getName();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- void setName(String value);
-
- /**
- * Returns the value of the '<em><b>Version</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Version</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Version</em>' attribute.
- * @see #setVersion(String)
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getServerRuntime_Version()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String"
- * @generated
- */
- String getVersion();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getVersion <em>Version</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Version</em>' attribute.
- * @see #getVersion()
- * @generated
- */
- void setVersion(String value);
-
- /**
- * @param id the id of the '<em>Publisher</em>' attribute.
- * @return
- * @generated NOT
- */
- Publisher getPublisher(String id);
-
- /**
- * @param type the type of the '<em>Module</em>' attribute.
- * @return
- * @generated NOT
- */
- Module getModule(String type);
-
- /**
- * @param cpRef the reference id of the '<em>Classpath</em>' attribute.
- * @return
- * @generated NOT
- */
- Classpath getClasspath(String cpRef);
-
- /**
- * @generated NOT
- */
- String getFilename();
-
- /**
- * @generated NOT
- */
- void setFilename(String fn);
-
- /**
- * @generated NOT
- */
- void setPropertyValues(Map properties);
-
- /**
- * @generated NOT
- */
- Resolver getResolver();
-
-} // ServerRuntime
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/ServerTypeFactory.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/ServerTypeFactory.java
deleted file mode 100644
index c6fd3b1..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/ServerTypeFactory.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/**
- * <copyright>
- *******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************
- * </copyright>
- *
- * $Id: ServerTypeFactory.java,v 1.1 2004/11/20 21:18:10 ndai Exp $
- */
-package org.eclipse.jst.server.generic.servertype.definition;
-
-import org.eclipse.emf.ecore.EFactory;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Factory</b> for the model.
- * It provides a create method for each non-abstract class of the model.
- * <!-- end-user-doc -->
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage
- * @generated
- */
-public interface ServerTypeFactory extends EFactory {
- /**
- * The singleton instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- ServerTypeFactory eINSTANCE = new org.eclipse.jst.server.generic.servertype.definition.impl.ServerTypeFactoryImpl();
-
- /**
- * Returns a new object of class '<em>Archive Type</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Archive Type</em>'.
- * @generated
- */
- ArchiveType createArchiveType();
-
- /**
- * Returns a new object of class '<em>Classpath</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Classpath</em>'.
- * @generated
- */
- Classpath createClasspath();
-
- /**
- * Returns a new object of class '<em>Launch Configuration</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Launch Configuration</em>'.
- * @generated
- */
- LaunchConfiguration createLaunchConfiguration();
-
- /**
- * Returns a new object of class '<em>Module</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Module</em>'.
- * @generated
- */
- Module createModule();
-
- /**
- * Returns a new object of class '<em>Port</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Port</em>'.
- * @generated
- */
- Port createPort();
-
- /**
- * Returns a new object of class '<em>Project</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Project</em>'.
- * @generated
- */
- Project createProject();
-
- /**
- * Returns a new object of class '<em>Property</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Property</em>'.
- * @generated
- */
- Property createProperty();
-
- /**
- * Returns a new object of class '<em>Publisher</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Publisher</em>'.
- * @generated
- */
- Publisher createPublisher();
-
- /**
- * Returns a new object of class '<em>Publish Type</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Publish Type</em>'.
- * @generated
- */
- PublishType createPublishType();
-
- /**
- * Returns a new object of class '<em>Server Runtime</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Server Runtime</em>'.
- * @generated
- */
- ServerRuntime createServerRuntime();
-
- /**
- * Returns a new object of class '<em>Unpublish Type</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Unpublish Type</em>'.
- * @generated
- */
- UnpublishType createUnpublishType();
-
- /**
- * Returns the package supported by this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the package supported by this factory.
- * @generated
- */
- ServerTypePackage getServerTypePackage();
-
-} //ServerTypeFactory
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/ServerTypePackage.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/ServerTypePackage.java
deleted file mode 100644
index f2f1e14..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/ServerTypePackage.java
+++ /dev/null
@@ -1,1316 +0,0 @@
-/**
- * <copyright>
- *******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************
- * </copyright>
- *
- * $Id: ServerTypePackage.java,v 1.1 2004/11/20 21:18:10 ndai Exp $
- */
-package org.eclipse.jst.server.generic.servertype.definition;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Package</b> for the model.
- * It contains accessors for the meta objects to represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypeFactory
- * @generated
- */
-public interface ServerTypePackage extends EPackage {
- /**
- * The package name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNAME = "definition";
-
- /**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_URI = "http://eclipse.org/jst/server/generic/ServerTypeDefinition";
-
- /**
- * The package namespace name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_PREFIX = "definition";
-
- /**
- * The singleton instance of the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- ServerTypePackage eINSTANCE = org.eclipse.jst.server.generic.servertype.definition.impl.ServerTypePackageImpl.init();
-
- /**
- * The meta object id for the '{@link org.eclipse.jst.server.generic.servertype.definition.impl.ArchiveTypeImpl <em>Archive Type</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jst.server.generic.servertype.definition.impl.ArchiveTypeImpl
- * @see org.eclipse.jst.server.generic.servertype.definition.impl.ServerTypePackageImpl#getArchiveType()
- * @generated
- */
- int ARCHIVE_TYPE = 0;
-
- /**
- * The feature id for the '<em><b>Path</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ARCHIVE_TYPE__PATH = 0;
-
- /**
- * The number of structural features of the the '<em>Archive Type</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ARCHIVE_TYPE_FEATURE_COUNT = 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.jst.server.generic.servertype.definition.impl.ClasspathImpl <em>Classpath</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jst.server.generic.servertype.definition.impl.ClasspathImpl
- * @see org.eclipse.jst.server.generic.servertype.definition.impl.ServerTypePackageImpl#getClasspath()
- * @generated
- */
- int CLASSPATH = 1;
-
- /**
- * The feature id for the '<em><b>Group</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int CLASSPATH__GROUP = 0;
-
- /**
- * The feature id for the '<em><b>Archive</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int CLASSPATH__ARCHIVE = 1;
-
- /**
- * The feature id for the '<em><b>Id</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int CLASSPATH__ID = 2;
-
- /**
- * The feature id for the '<em><b>Is Library</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int CLASSPATH__IS_LIBRARY = 3;
-
- /**
- * The number of structural features of the the '<em>Classpath</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int CLASSPATH_FEATURE_COUNT = 4;
-
- /**
- * The meta object id for the '{@link org.eclipse.jst.server.generic.servertype.definition.impl.LaunchConfigurationImpl <em>Launch Configuration</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jst.server.generic.servertype.definition.impl.LaunchConfigurationImpl
- * @see org.eclipse.jst.server.generic.servertype.definition.impl.ServerTypePackageImpl#getLaunchConfiguration()
- * @generated
- */
- int LAUNCH_CONFIGURATION = 2;
-
- /**
- * The feature id for the '<em><b>Class</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LAUNCH_CONFIGURATION__CLASS = 0;
-
- /**
- * The feature id for the '<em><b>Working Directory</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LAUNCH_CONFIGURATION__WORKING_DIRECTORY = 1;
-
- /**
- * The feature id for the '<em><b>Program Arguments</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LAUNCH_CONFIGURATION__PROGRAM_ARGUMENTS = 2;
-
- /**
- * The feature id for the '<em><b>Vm Parameters</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LAUNCH_CONFIGURATION__VM_PARAMETERS = 3;
-
- /**
- * The feature id for the '<em><b>Classpath Reference</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LAUNCH_CONFIGURATION__CLASSPATH_REFERENCE = 4;
-
- /**
- * The number of structural features of the the '<em>Launch Configuration</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LAUNCH_CONFIGURATION_FEATURE_COUNT = 5;
-
- /**
- * The meta object id for the '{@link org.eclipse.jst.server.generic.servertype.definition.impl.ModuleImpl <em>Module</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jst.server.generic.servertype.definition.impl.ModuleImpl
- * @see org.eclipse.jst.server.generic.servertype.definition.impl.ServerTypePackageImpl#getModule()
- * @generated
- */
- int MODULE = 3;
-
- /**
- * The feature id for the '<em><b>Type</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MODULE__TYPE = 0;
-
- /**
- * The feature id for the '<em><b>Publish Dir</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MODULE__PUBLISH_DIR = 1;
-
- /**
- * The feature id for the '<em><b>Publisher Reference</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MODULE__PUBLISHER_REFERENCE = 2;
-
- /**
- * The number of structural features of the the '<em>Module</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MODULE_FEATURE_COUNT = 3;
-
- /**
- * The meta object id for the '{@link org.eclipse.jst.server.generic.servertype.definition.impl.PortImpl <em>Port</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jst.server.generic.servertype.definition.impl.PortImpl
- * @see org.eclipse.jst.server.generic.servertype.definition.impl.ServerTypePackageImpl#getPort()
- * @generated
- */
- int PORT = 4;
-
- /**
- * The feature id for the '<em><b>No</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PORT__NO = 0;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PORT__NAME = 1;
-
- /**
- * The feature id for the '<em><b>Protocol</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PORT__PROTOCOL = 2;
-
- /**
- * The number of structural features of the the '<em>Port</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PORT_FEATURE_COUNT = 3;
-
- /**
- * The meta object id for the '{@link org.eclipse.jst.server.generic.servertype.definition.impl.ProjectImpl <em>Project</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jst.server.generic.servertype.definition.impl.ProjectImpl
- * @see org.eclipse.jst.server.generic.servertype.definition.impl.ServerTypePackageImpl#getProject()
- * @generated
- */
- int PROJECT = 5;
-
- /**
- * The feature id for the '<em><b>Classpath Reference</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PROJECT__CLASSPATH_REFERENCE = 0;
-
- /**
- * The number of structural features of the the '<em>Project</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PROJECT_FEATURE_COUNT = 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.jst.server.generic.servertype.definition.impl.PropertyImpl <em>Property</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jst.server.generic.servertype.definition.impl.PropertyImpl
- * @see org.eclipse.jst.server.generic.servertype.definition.impl.ServerTypePackageImpl#getProperty()
- * @generated
- */
- int PROPERTY = 6;
-
- /**
- * The feature id for the '<em><b>Context</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PROPERTY__CONTEXT = 0;
-
- /**
- * The feature id for the '<em><b>Default</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PROPERTY__DEFAULT = 1;
-
- /**
- * The feature id for the '<em><b>Id</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PROPERTY__ID = 2;
-
- /**
- * The feature id for the '<em><b>Label</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PROPERTY__LABEL = 3;
-
- /**
- * The feature id for the '<em><b>Type</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PROPERTY__TYPE = 4;
-
- /**
- * The number of structural features of the the '<em>Property</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PROPERTY_FEATURE_COUNT = 5;
-
- /**
- * The meta object id for the '{@link org.eclipse.jst.server.generic.servertype.definition.impl.PublisherImpl <em>Publisher</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jst.server.generic.servertype.definition.impl.PublisherImpl
- * @see org.eclipse.jst.server.generic.servertype.definition.impl.ServerTypePackageImpl#getPublisher()
- * @generated
- */
- int PUBLISHER = 7;
-
- /**
- * The feature id for the '<em><b>Group</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PUBLISHER__GROUP = 0;
-
- /**
- * The feature id for the '<em><b>Publish</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PUBLISHER__PUBLISH = 1;
-
- /**
- * The feature id for the '<em><b>Unpublish</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PUBLISHER__UNPUBLISH = 2;
-
- /**
- * The feature id for the '<em><b>Id</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PUBLISHER__ID = 3;
-
- /**
- * The number of structural features of the the '<em>Publisher</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PUBLISHER_FEATURE_COUNT = 4;
-
- /**
- * The meta object id for the '{@link org.eclipse.jst.server.generic.servertype.definition.impl.PublishTypeImpl <em>Publish Type</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jst.server.generic.servertype.definition.impl.PublishTypeImpl
- * @see org.eclipse.jst.server.generic.servertype.definition.impl.ServerTypePackageImpl#getPublishType()
- * @generated
- */
- int PUBLISH_TYPE = 8;
-
- /**
- * The feature id for the '<em><b>Task</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PUBLISH_TYPE__TASK = 0;
-
- /**
- * The feature id for the '<em><b>Classpath Reference</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PUBLISH_TYPE__CLASSPATH_REFERENCE = 1;
-
- /**
- * The number of structural features of the the '<em>Publish Type</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PUBLISH_TYPE_FEATURE_COUNT = 2;
-
- /**
- * The meta object id for the '{@link org.eclipse.jst.server.generic.servertype.definition.impl.ServerRuntimeImpl <em>Server Runtime</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jst.server.generic.servertype.definition.impl.ServerRuntimeImpl
- * @see org.eclipse.jst.server.generic.servertype.definition.impl.ServerTypePackageImpl#getServerRuntime()
- * @generated
- */
- int SERVER_RUNTIME = 9;
-
- /**
- * The feature id for the '<em><b>Group</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SERVER_RUNTIME__GROUP = 0;
-
- /**
- * The feature id for the '<em><b>Property</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SERVER_RUNTIME__PROPERTY = 1;
-
- /**
- * The feature id for the '<em><b>Group1</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SERVER_RUNTIME__GROUP1 = 2;
-
- /**
- * The feature id for the '<em><b>Port</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SERVER_RUNTIME__PORT = 3;
-
- /**
- * The feature id for the '<em><b>Group2</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SERVER_RUNTIME__GROUP2 = 4;
-
- /**
- * The feature id for the '<em><b>Module</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SERVER_RUNTIME__MODULE = 5;
-
- /**
- * The feature id for the '<em><b>Project</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SERVER_RUNTIME__PROJECT = 6;
-
- /**
- * The feature id for the '<em><b>Start</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SERVER_RUNTIME__START = 7;
-
- /**
- * The feature id for the '<em><b>Stop</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SERVER_RUNTIME__STOP = 8;
-
- /**
- * The feature id for the '<em><b>Group3</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SERVER_RUNTIME__GROUP3 = 9;
-
- /**
- * The feature id for the '<em><b>Publisher</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SERVER_RUNTIME__PUBLISHER = 10;
-
- /**
- * The feature id for the '<em><b>Group4</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SERVER_RUNTIME__GROUP4 = 11;
-
- /**
- * The feature id for the '<em><b>Classpath</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SERVER_RUNTIME__CLASSPATH = 12;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SERVER_RUNTIME__NAME = 13;
-
- /**
- * The feature id for the '<em><b>Version</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SERVER_RUNTIME__VERSION = 14;
-
- /**
- * The number of structural features of the the '<em>Server Runtime</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SERVER_RUNTIME_FEATURE_COUNT = 15;
-
- /**
- * The meta object id for the '{@link org.eclipse.jst.server.generic.servertype.definition.impl.UnpublishTypeImpl <em>Unpublish Type</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jst.server.generic.servertype.definition.impl.UnpublishTypeImpl
- * @see org.eclipse.jst.server.generic.servertype.definition.impl.ServerTypePackageImpl#getUnpublishType()
- * @generated
- */
- int UNPUBLISH_TYPE = 10;
-
- /**
- * The feature id for the '<em><b>Task</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int UNPUBLISH_TYPE__TASK = 0;
-
- /**
- * The feature id for the '<em><b>Classpath Reference</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int UNPUBLISH_TYPE__CLASSPATH_REFERENCE = 1;
-
- /**
- * The number of structural features of the the '<em>Unpublish Type</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int UNPUBLISH_TYPE_FEATURE_COUNT = 2;
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jst.server.generic.servertype.definition.ArchiveType <em>Archive Type</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Archive Type</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.ArchiveType
- * @generated
- */
- EClass getArchiveType();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jst.server.generic.servertype.definition.ArchiveType#getPath <em>Path</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Path</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.ArchiveType#getPath()
- * @see #getArchiveType()
- * @generated
- */
- EAttribute getArchiveType_Path();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jst.server.generic.servertype.definition.Classpath <em>Classpath</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Classpath</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.Classpath
- * @generated
- */
- EClass getClasspath();
-
- /**
- * Returns the meta object for the attribute list '{@link org.eclipse.jst.server.generic.servertype.definition.Classpath#getGroup <em>Group</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute list '<em>Group</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.Classpath#getGroup()
- * @see #getClasspath()
- * @generated
- */
- EAttribute getClasspath_Group();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jst.server.generic.servertype.definition.Classpath#getArchive <em>Archive</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Archive</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.Classpath#getArchive()
- * @see #getClasspath()
- * @generated
- */
- EReference getClasspath_Archive();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jst.server.generic.servertype.definition.Classpath#getId <em>Id</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Id</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.Classpath#getId()
- * @see #getClasspath()
- * @generated
- */
- EAttribute getClasspath_Id();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jst.server.generic.servertype.definition.Classpath#isIsLibrary <em>Is Library</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Is Library</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.Classpath#isIsLibrary()
- * @see #getClasspath()
- * @generated
- */
- EAttribute getClasspath_IsLibrary();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jst.server.generic.servertype.definition.LaunchConfiguration <em>Launch Configuration</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Launch Configuration</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.LaunchConfiguration
- * @generated
- */
- EClass getLaunchConfiguration();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jst.server.generic.servertype.definition.LaunchConfiguration#getClass_ <em>Class</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Class</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.LaunchConfiguration#getClass_()
- * @see #getLaunchConfiguration()
- * @generated
- */
- EAttribute getLaunchConfiguration_Class();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jst.server.generic.servertype.definition.LaunchConfiguration#getWorkingDirectory <em>Working Directory</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Working Directory</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.LaunchConfiguration#getWorkingDirectory()
- * @see #getLaunchConfiguration()
- * @generated
- */
- EAttribute getLaunchConfiguration_WorkingDirectory();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jst.server.generic.servertype.definition.LaunchConfiguration#getProgramArguments <em>Program Arguments</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Program Arguments</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.LaunchConfiguration#getProgramArguments()
- * @see #getLaunchConfiguration()
- * @generated
- */
- EAttribute getLaunchConfiguration_ProgramArguments();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jst.server.generic.servertype.definition.LaunchConfiguration#getVmParameters <em>Vm Parameters</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Vm Parameters</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.LaunchConfiguration#getVmParameters()
- * @see #getLaunchConfiguration()
- * @generated
- */
- EAttribute getLaunchConfiguration_VmParameters();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jst.server.generic.servertype.definition.LaunchConfiguration#getClasspathReference <em>Classpath Reference</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Classpath Reference</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.LaunchConfiguration#getClasspathReference()
- * @see #getLaunchConfiguration()
- * @generated
- */
- EAttribute getLaunchConfiguration_ClasspathReference();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jst.server.generic.servertype.definition.Module <em>Module</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Module</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.Module
- * @generated
- */
- EClass getModule();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jst.server.generic.servertype.definition.Module#getType <em>Type</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Type</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.Module#getType()
- * @see #getModule()
- * @generated
- */
- EAttribute getModule_Type();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jst.server.generic.servertype.definition.Module#getPublishDir <em>Publish Dir</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Publish Dir</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.Module#getPublishDir()
- * @see #getModule()
- * @generated
- */
- EAttribute getModule_PublishDir();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jst.server.generic.servertype.definition.Module#getPublisherReference <em>Publisher Reference</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Publisher Reference</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.Module#getPublisherReference()
- * @see #getModule()
- * @generated
- */
- EAttribute getModule_PublisherReference();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jst.server.generic.servertype.definition.Port <em>Port</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Port</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.Port
- * @generated
- */
- EClass getPort();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jst.server.generic.servertype.definition.Port#getNo <em>No</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>No</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.Port#getNo()
- * @see #getPort()
- * @generated
- */
- EAttribute getPort_No();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jst.server.generic.servertype.definition.Port#getName <em>Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Name</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.Port#getName()
- * @see #getPort()
- * @generated
- */
- EAttribute getPort_Name();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jst.server.generic.servertype.definition.Port#getProtocol <em>Protocol</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Protocol</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.Port#getProtocol()
- * @see #getPort()
- * @generated
- */
- EAttribute getPort_Protocol();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jst.server.generic.servertype.definition.Project <em>Project</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Project</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.Project
- * @generated
- */
- EClass getProject();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jst.server.generic.servertype.definition.Project#getClasspathReference <em>Classpath Reference</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Classpath Reference</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.Project#getClasspathReference()
- * @see #getProject()
- * @generated
- */
- EAttribute getProject_ClasspathReference();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jst.server.generic.servertype.definition.Property <em>Property</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Property</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.Property
- * @generated
- */
- EClass getProperty();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jst.server.generic.servertype.definition.Property#getContext <em>Context</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Context</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.Property#getContext()
- * @see #getProperty()
- * @generated
- */
- EAttribute getProperty_Context();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jst.server.generic.servertype.definition.Property#getDefault <em>Default</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Default</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.Property#getDefault()
- * @see #getProperty()
- * @generated
- */
- EAttribute getProperty_Default();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jst.server.generic.servertype.definition.Property#getId <em>Id</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Id</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.Property#getId()
- * @see #getProperty()
- * @generated
- */
- EAttribute getProperty_Id();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jst.server.generic.servertype.definition.Property#getLabel <em>Label</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Label</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.Property#getLabel()
- * @see #getProperty()
- * @generated
- */
- EAttribute getProperty_Label();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jst.server.generic.servertype.definition.Property#getType <em>Type</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Type</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.Property#getType()
- * @see #getProperty()
- * @generated
- */
- EAttribute getProperty_Type();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jst.server.generic.servertype.definition.Publisher <em>Publisher</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Publisher</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.Publisher
- * @generated
- */
- EClass getPublisher();
-
- /**
- * Returns the meta object for the attribute list '{@link org.eclipse.jst.server.generic.servertype.definition.Publisher#getGroup <em>Group</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute list '<em>Group</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.Publisher#getGroup()
- * @see #getPublisher()
- * @generated
- */
- EAttribute getPublisher_Group();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jst.server.generic.servertype.definition.Publisher#getPublish <em>Publish</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Publish</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.Publisher#getPublish()
- * @see #getPublisher()
- * @generated
- */
- EReference getPublisher_Publish();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jst.server.generic.servertype.definition.Publisher#getUnpublish <em>Unpublish</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Unpublish</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.Publisher#getUnpublish()
- * @see #getPublisher()
- * @generated
- */
- EReference getPublisher_Unpublish();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jst.server.generic.servertype.definition.Publisher#getId <em>Id</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Id</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.Publisher#getId()
- * @see #getPublisher()
- * @generated
- */
- EAttribute getPublisher_Id();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jst.server.generic.servertype.definition.PublishType <em>Publish Type</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Publish Type</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.PublishType
- * @generated
- */
- EClass getPublishType();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jst.server.generic.servertype.definition.PublishType#getTask <em>Task</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Task</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.PublishType#getTask()
- * @see #getPublishType()
- * @generated
- */
- EAttribute getPublishType_Task();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jst.server.generic.servertype.definition.PublishType#getClasspathReference <em>Classpath Reference</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Classpath Reference</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.PublishType#getClasspathReference()
- * @see #getPublishType()
- * @generated
- */
- EAttribute getPublishType_ClasspathReference();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jst.server.generic.servertype.definition.ServerRuntime <em>Server Runtime</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Server Runtime</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerRuntime
- * @generated
- */
- EClass getServerRuntime();
-
- /**
- * Returns the meta object for the attribute list '{@link org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getGroup <em>Group</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute list '<em>Group</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getGroup()
- * @see #getServerRuntime()
- * @generated
- */
- EAttribute getServerRuntime_Group();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getProperty <em>Property</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Property</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getProperty()
- * @see #getServerRuntime()
- * @generated
- */
- EReference getServerRuntime_Property();
-
- /**
- * Returns the meta object for the attribute list '{@link org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getGroup1 <em>Group1</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute list '<em>Group1</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getGroup1()
- * @see #getServerRuntime()
- * @generated
- */
- EAttribute getServerRuntime_Group1();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getPort <em>Port</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Port</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getPort()
- * @see #getServerRuntime()
- * @generated
- */
- EReference getServerRuntime_Port();
-
- /**
- * Returns the meta object for the attribute list '{@link org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getGroup2 <em>Group2</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute list '<em>Group2</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getGroup2()
- * @see #getServerRuntime()
- * @generated
- */
- EAttribute getServerRuntime_Group2();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getModule <em>Module</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Module</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getModule()
- * @see #getServerRuntime()
- * @generated
- */
- EReference getServerRuntime_Module();
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getProject <em>Project</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Project</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getProject()
- * @see #getServerRuntime()
- * @generated
- */
- EReference getServerRuntime_Project();
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getStart <em>Start</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Start</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getStart()
- * @see #getServerRuntime()
- * @generated
- */
- EReference getServerRuntime_Start();
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getStop <em>Stop</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Stop</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getStop()
- * @see #getServerRuntime()
- * @generated
- */
- EReference getServerRuntime_Stop();
-
- /**
- * Returns the meta object for the attribute list '{@link org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getGroup3 <em>Group3</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute list '<em>Group3</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getGroup3()
- * @see #getServerRuntime()
- * @generated
- */
- EAttribute getServerRuntime_Group3();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getPublisher <em>Publisher</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Publisher</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getPublisher()
- * @see #getServerRuntime()
- * @generated
- */
- EReference getServerRuntime_Publisher();
-
- /**
- * Returns the meta object for the attribute list '{@link org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getGroup4 <em>Group4</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute list '<em>Group4</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getGroup4()
- * @see #getServerRuntime()
- * @generated
- */
- EAttribute getServerRuntime_Group4();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getClasspath <em>Classpath</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Classpath</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getClasspath()
- * @see #getServerRuntime()
- * @generated
- */
- EReference getServerRuntime_Classpath();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getName <em>Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Name</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getName()
- * @see #getServerRuntime()
- * @generated
- */
- EAttribute getServerRuntime_Name();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getVersion <em>Version</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Version</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerRuntime#getVersion()
- * @see #getServerRuntime()
- * @generated
- */
- EAttribute getServerRuntime_Version();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jst.server.generic.servertype.definition.UnpublishType <em>Unpublish Type</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Unpublish Type</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.UnpublishType
- * @generated
- */
- EClass getUnpublishType();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jst.server.generic.servertype.definition.UnpublishType#getTask <em>Task</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Task</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.UnpublishType#getTask()
- * @see #getUnpublishType()
- * @generated
- */
- EAttribute getUnpublishType_Task();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jst.server.generic.servertype.definition.UnpublishType#getClasspathReference <em>Classpath Reference</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Classpath Reference</em>'.
- * @see org.eclipse.jst.server.generic.servertype.definition.UnpublishType#getClasspathReference()
- * @see #getUnpublishType()
- * @generated
- */
- EAttribute getUnpublishType_ClasspathReference();
-
- /**
- * Returns the factory that creates the instances of the model.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the factory that creates the instances of the model.
- * @generated
- */
- ServerTypeFactory getServerTypeFactory();
-
-} //ServerTypePackage
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/UnpublishType.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/UnpublishType.java
deleted file mode 100644
index cb39c33..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/UnpublishType.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
- * <copyright>
- *******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************
- * </copyright>
- *
- * $Id: UnpublishType.java,v 1.1 2004/11/20 21:18:10 ndai Exp $
- */
-package org.eclipse.jst.server.generic.servertype.definition;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Unpublish Type</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.UnpublishType#getTask <em>Task</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.UnpublishType#getClasspathReference <em>Classpath Reference</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getUnpublishType()
- * @model
- * @generated
- */
-public interface UnpublishType extends EObject {
- /**
- * Returns the value of the '<em><b>Task</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Task</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Task</em>' attribute.
- * @see #setTask(String)
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getUnpublishType_Task()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- String getTask();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.server.generic.servertype.definition.UnpublishType#getTask <em>Task</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Task</em>' attribute.
- * @see #getTask()
- * @generated
- */
- void setTask(String value);
-
- /**
- * Returns the value of the '<em><b>Classpath Reference</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Classpath Reference</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Classpath Reference</em>' attribute.
- * @see #setClasspathReference(String)
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#getUnpublishType_ClasspathReference()
- * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * @generated
- */
- String getClasspathReference();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.server.generic.servertype.definition.UnpublishType#getClasspathReference <em>Classpath Reference</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Classpath Reference</em>' attribute.
- * @see #getClasspathReference()
- * @generated
- */
- void setClasspathReference(String value);
-
-} // UnpublishType
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/ArchiveTypeImpl.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/ArchiveTypeImpl.java
deleted file mode 100644
index 93bc447..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/ArchiveTypeImpl.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/**
- * <copyright>
- *******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************
- * </copyright>
- *
- * $Id: ArchiveTypeImpl.java,v 1.1 2004/11/20 21:18:10 ndai Exp $
- */
-package org.eclipse.jst.server.generic.servertype.definition.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.EObjectImpl;
-
-import org.eclipse.jst.server.generic.servertype.definition.ArchiveType;
-import org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Archive Type</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.ArchiveTypeImpl#getPath <em>Path</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class ArchiveTypeImpl extends EObjectImpl implements ArchiveType {
- /**
- * The default value of the '{@link #getPath() <em>Path</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPath()
- * @generated
- * @ordered
- */
- protected static final String PATH_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getPath() <em>Path</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPath()
- * @generated
- * @ordered
- */
- protected String path = PATH_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ArchiveTypeImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return ServerTypePackage.eINSTANCE.getArchiveType();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getPath() {
- return path;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setPath(String newPath) {
- String oldPath = path;
- path = newPath;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ServerTypePackage.ARCHIVE_TYPE__PATH, oldPath, path));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.ARCHIVE_TYPE__PATH:
- return getPath();
- }
- return eDynamicGet(eFeature, resolve);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.ARCHIVE_TYPE__PATH:
- setPath((String)newValue);
- return;
- }
- eDynamicSet(eFeature, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.ARCHIVE_TYPE__PATH:
- setPath(PATH_EDEFAULT);
- return;
- }
- eDynamicUnset(eFeature);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.ARCHIVE_TYPE__PATH:
- return PATH_EDEFAULT == null ? path != null : !PATH_EDEFAULT.equals(path);
- }
- return eDynamicIsSet(eFeature);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (path: ");
- result.append(path);
- result.append(')');
- return result.toString();
- }
-
-} //ArchiveTypeImpl
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/ClasspathImpl.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/ClasspathImpl.java
deleted file mode 100644
index edf0de6..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/ClasspathImpl.java
+++ /dev/null
@@ -1,362 +0,0 @@
-/**
- * <copyright>
- *******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************
- * </copyright>
- *
- * $Id: ClasspathImpl.java,v 1.1 2004/11/20 21:18:10 ndai Exp $
- */
-package org.eclipse.jst.server.generic.servertype.definition.impl;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.EObjectImpl;
-
-import org.eclipse.emf.ecore.util.BasicFeatureMap;
-import org.eclipse.emf.ecore.util.FeatureMap;
-import org.eclipse.emf.ecore.util.InternalEList;
-
-import org.eclipse.jst.server.generic.servertype.definition.Classpath;
-import org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Classpath</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.ClasspathImpl#getGroup <em>Group</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.ClasspathImpl#getArchive <em>Archive</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.ClasspathImpl#getId <em>Id</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.ClasspathImpl#isIsLibrary <em>Is Library</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class ClasspathImpl extends EObjectImpl implements Classpath {
- /**
- * The cached value of the '{@link #getGroup() <em>Group</em>}' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getGroup()
- * @generated
- * @ordered
- */
- protected FeatureMap group = null;
-
- /**
- * The default value of the '{@link #getId() <em>Id</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getId()
- * @generated
- * @ordered
- */
- protected static final String ID_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getId() <em>Id</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getId()
- * @generated
- * @ordered
- */
- protected String id = ID_EDEFAULT;
-
- /**
- * The default value of the '{@link #isIsLibrary() <em>Is Library</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isIsLibrary()
- * @generated
- * @ordered
- */
- protected static final boolean IS_LIBRARY_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isIsLibrary() <em>Is Library</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isIsLibrary()
- * @generated
- * @ordered
- */
- protected boolean isLibrary = IS_LIBRARY_EDEFAULT;
-
- /**
- * This is true if the Is Library attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean isLibraryESet = false;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ClasspathImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return ServerTypePackage.eINSTANCE.getClasspath();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public FeatureMap getGroup() {
- if (group == null) {
- group = new BasicFeatureMap(this, ServerTypePackage.CLASSPATH__GROUP);
- }
- return group;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList getArchive() {
- return ((FeatureMap)getGroup()).list(ServerTypePackage.eINSTANCE.getClasspath_Archive());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getId() {
- return id;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setId(String newId) {
- String oldId = id;
- id = newId;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ServerTypePackage.CLASSPATH__ID, oldId, id));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isIsLibrary() {
- return isLibrary;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setIsLibrary(boolean newIsLibrary) {
- boolean oldIsLibrary = isLibrary;
- isLibrary = newIsLibrary;
- boolean oldIsLibraryESet = isLibraryESet;
- isLibraryESet = true;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ServerTypePackage.CLASSPATH__IS_LIBRARY, oldIsLibrary, isLibrary, !oldIsLibraryESet));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetIsLibrary() {
- boolean oldIsLibrary = isLibrary;
- boolean oldIsLibraryESet = isLibraryESet;
- isLibrary = IS_LIBRARY_EDEFAULT;
- isLibraryESet = false;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.UNSET, ServerTypePackage.CLASSPATH__IS_LIBRARY, oldIsLibrary, IS_LIBRARY_EDEFAULT, oldIsLibraryESet));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetIsLibrary() {
- return isLibraryESet;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (eDerivedStructuralFeatureID(featureID, baseClass)) {
- case ServerTypePackage.CLASSPATH__GROUP:
- return ((InternalEList)getGroup()).basicRemove(otherEnd, msgs);
- case ServerTypePackage.CLASSPATH__ARCHIVE:
- return ((InternalEList)getArchive()).basicRemove(otherEnd, msgs);
- default:
- return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs);
- }
- }
- return eBasicSetContainer(null, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.CLASSPATH__GROUP:
- return getGroup();
- case ServerTypePackage.CLASSPATH__ARCHIVE:
- return getArchive();
- case ServerTypePackage.CLASSPATH__ID:
- return getId();
- case ServerTypePackage.CLASSPATH__IS_LIBRARY:
- return isIsLibrary() ? Boolean.TRUE : Boolean.FALSE;
- }
- return eDynamicGet(eFeature, resolve);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.CLASSPATH__GROUP:
- getGroup().clear();
- getGroup().addAll((Collection)newValue);
- return;
- case ServerTypePackage.CLASSPATH__ARCHIVE:
- getArchive().clear();
- getArchive().addAll((Collection)newValue);
- return;
- case ServerTypePackage.CLASSPATH__ID:
- setId((String)newValue);
- return;
- case ServerTypePackage.CLASSPATH__IS_LIBRARY:
- setIsLibrary(((Boolean)newValue).booleanValue());
- return;
- }
- eDynamicSet(eFeature, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.CLASSPATH__GROUP:
- getGroup().clear();
- return;
- case ServerTypePackage.CLASSPATH__ARCHIVE:
- getArchive().clear();
- return;
- case ServerTypePackage.CLASSPATH__ID:
- setId(ID_EDEFAULT);
- return;
- case ServerTypePackage.CLASSPATH__IS_LIBRARY:
- unsetIsLibrary();
- return;
- }
- eDynamicUnset(eFeature);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.CLASSPATH__GROUP:
- return group != null && !group.isEmpty();
- case ServerTypePackage.CLASSPATH__ARCHIVE:
- return !getArchive().isEmpty();
- case ServerTypePackage.CLASSPATH__ID:
- return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id);
- case ServerTypePackage.CLASSPATH__IS_LIBRARY:
- return isSetIsLibrary();
- }
- return eDynamicIsSet(eFeature);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (group: ");
- result.append(group);
- result.append(", id: ");
- result.append(id);
- result.append(", isLibrary: ");
- if (isLibraryESet) result.append(isLibrary); else result.append("<unset>");
- result.append(')');
- return result.toString();
- }
-
-} //ClasspathImpl
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/LaunchConfigurationImpl.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/LaunchConfigurationImpl.java
deleted file mode 100644
index 067da61..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/LaunchConfigurationImpl.java
+++ /dev/null
@@ -1,404 +0,0 @@
-/**
- * <copyright>
- *******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************
- * </copyright>
- *
- * $Id: LaunchConfigurationImpl.java,v 1.1 2004/11/20 21:18:10 ndai Exp $
- */
-package org.eclipse.jst.server.generic.servertype.definition.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.EObjectImpl;
-
-import org.eclipse.jst.server.generic.servertype.definition.LaunchConfiguration;
-import org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Launch Configuration</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.LaunchConfigurationImpl#getClass_ <em>Class</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.LaunchConfigurationImpl#getWorkingDirectory <em>Working Directory</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.LaunchConfigurationImpl#getProgramArguments <em>Program Arguments</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.LaunchConfigurationImpl#getVmParameters <em>Vm Parameters</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.LaunchConfigurationImpl#getClasspathReference <em>Classpath Reference</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class LaunchConfigurationImpl extends EObjectImpl implements LaunchConfiguration {
- /**
- * The default value of the '{@link #getClass_() <em>Class</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getClass_()
- * @generated
- * @ordered
- */
- protected static final String CLASS_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getClass_() <em>Class</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getClass_()
- * @generated
- * @ordered
- */
- protected String class_ = CLASS_EDEFAULT;
-
- /**
- * The default value of the '{@link #getWorkingDirectory() <em>Working Directory</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getWorkingDirectory()
- * @generated
- * @ordered
- */
- protected static final String WORKING_DIRECTORY_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getWorkingDirectory() <em>Working Directory</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getWorkingDirectory()
- * @generated
- * @ordered
- */
- protected String workingDirectory = WORKING_DIRECTORY_EDEFAULT;
-
- /**
- * The default value of the '{@link #getProgramArguments() <em>Program Arguments</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getProgramArguments()
- * @generated
- * @ordered
- */
- protected static final String PROGRAM_ARGUMENTS_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getProgramArguments() <em>Program Arguments</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getProgramArguments()
- * @generated
- * @ordered
- */
- protected String programArguments = PROGRAM_ARGUMENTS_EDEFAULT;
-
- /**
- * The default value of the '{@link #getVmParameters() <em>Vm Parameters</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getVmParameters()
- * @generated
- * @ordered
- */
- protected static final String VM_PARAMETERS_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getVmParameters() <em>Vm Parameters</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getVmParameters()
- * @generated
- * @ordered
- */
- protected String vmParameters = VM_PARAMETERS_EDEFAULT;
-
- /**
- * The default value of the '{@link #getClasspathReference() <em>Classpath Reference</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getClasspathReference()
- * @generated
- * @ordered
- */
- protected static final String CLASSPATH_REFERENCE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getClasspathReference() <em>Classpath Reference</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getClasspathReference()
- * @generated
- * @ordered
- */
- protected String classpathReference = CLASSPATH_REFERENCE_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected LaunchConfigurationImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return ServerTypePackage.eINSTANCE.getLaunchConfiguration();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getClass_() {
- return class_;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setClass(String newClass) {
- String oldClass = class_;
- class_ = newClass;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ServerTypePackage.LAUNCH_CONFIGURATION__CLASS, oldClass, class_));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getWorkingDirectory() {
- return workingDirectory;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setWorkingDirectory(String newWorkingDirectory) {
- String oldWorkingDirectory = workingDirectory;
- workingDirectory = newWorkingDirectory;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ServerTypePackage.LAUNCH_CONFIGURATION__WORKING_DIRECTORY, oldWorkingDirectory, workingDirectory));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getProgramArguments() {
- return programArguments;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setProgramArguments(String newProgramArguments) {
- String oldProgramArguments = programArguments;
- programArguments = newProgramArguments;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ServerTypePackage.LAUNCH_CONFIGURATION__PROGRAM_ARGUMENTS, oldProgramArguments, programArguments));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getVmParameters() {
- return vmParameters;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setVmParameters(String newVmParameters) {
- String oldVmParameters = vmParameters;
- vmParameters = newVmParameters;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ServerTypePackage.LAUNCH_CONFIGURATION__VM_PARAMETERS, oldVmParameters, vmParameters));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getClasspathReference() {
- return classpathReference;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setClasspathReference(String newClasspathReference) {
- String oldClasspathReference = classpathReference;
- classpathReference = newClasspathReference;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ServerTypePackage.LAUNCH_CONFIGURATION__CLASSPATH_REFERENCE, oldClasspathReference, classpathReference));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.LAUNCH_CONFIGURATION__CLASS:
- return getClass_();
- case ServerTypePackage.LAUNCH_CONFIGURATION__WORKING_DIRECTORY:
- return getWorkingDirectory();
- case ServerTypePackage.LAUNCH_CONFIGURATION__PROGRAM_ARGUMENTS:
- return getProgramArguments();
- case ServerTypePackage.LAUNCH_CONFIGURATION__VM_PARAMETERS:
- return getVmParameters();
- case ServerTypePackage.LAUNCH_CONFIGURATION__CLASSPATH_REFERENCE:
- return getClasspathReference();
- }
- return eDynamicGet(eFeature, resolve);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.LAUNCH_CONFIGURATION__CLASS:
- setClass((String)newValue);
- return;
- case ServerTypePackage.LAUNCH_CONFIGURATION__WORKING_DIRECTORY:
- setWorkingDirectory((String)newValue);
- return;
- case ServerTypePackage.LAUNCH_CONFIGURATION__PROGRAM_ARGUMENTS:
- setProgramArguments((String)newValue);
- return;
- case ServerTypePackage.LAUNCH_CONFIGURATION__VM_PARAMETERS:
- setVmParameters((String)newValue);
- return;
- case ServerTypePackage.LAUNCH_CONFIGURATION__CLASSPATH_REFERENCE:
- setClasspathReference((String)newValue);
- return;
- }
- eDynamicSet(eFeature, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.LAUNCH_CONFIGURATION__CLASS:
- setClass(CLASS_EDEFAULT);
- return;
- case ServerTypePackage.LAUNCH_CONFIGURATION__WORKING_DIRECTORY:
- setWorkingDirectory(WORKING_DIRECTORY_EDEFAULT);
- return;
- case ServerTypePackage.LAUNCH_CONFIGURATION__PROGRAM_ARGUMENTS:
- setProgramArguments(PROGRAM_ARGUMENTS_EDEFAULT);
- return;
- case ServerTypePackage.LAUNCH_CONFIGURATION__VM_PARAMETERS:
- setVmParameters(VM_PARAMETERS_EDEFAULT);
- return;
- case ServerTypePackage.LAUNCH_CONFIGURATION__CLASSPATH_REFERENCE:
- setClasspathReference(CLASSPATH_REFERENCE_EDEFAULT);
- return;
- }
- eDynamicUnset(eFeature);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.LAUNCH_CONFIGURATION__CLASS:
- return CLASS_EDEFAULT == null ? class_ != null : !CLASS_EDEFAULT.equals(class_);
- case ServerTypePackage.LAUNCH_CONFIGURATION__WORKING_DIRECTORY:
- return WORKING_DIRECTORY_EDEFAULT == null ? workingDirectory != null : !WORKING_DIRECTORY_EDEFAULT.equals(workingDirectory);
- case ServerTypePackage.LAUNCH_CONFIGURATION__PROGRAM_ARGUMENTS:
- return PROGRAM_ARGUMENTS_EDEFAULT == null ? programArguments != null : !PROGRAM_ARGUMENTS_EDEFAULT.equals(programArguments);
- case ServerTypePackage.LAUNCH_CONFIGURATION__VM_PARAMETERS:
- return VM_PARAMETERS_EDEFAULT == null ? vmParameters != null : !VM_PARAMETERS_EDEFAULT.equals(vmParameters);
- case ServerTypePackage.LAUNCH_CONFIGURATION__CLASSPATH_REFERENCE:
- return CLASSPATH_REFERENCE_EDEFAULT == null ? classpathReference != null : !CLASSPATH_REFERENCE_EDEFAULT.equals(classpathReference);
- }
- return eDynamicIsSet(eFeature);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (class: ");
- result.append(class_);
- result.append(", workingDirectory: ");
- result.append(workingDirectory);
- result.append(", programArguments: ");
- result.append(programArguments);
- result.append(", vmParameters: ");
- result.append(vmParameters);
- result.append(", classpathReference: ");
- result.append(classpathReference);
- result.append(')');
- return result.toString();
- }
-
-} //LaunchConfigurationImpl
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/ModuleImpl.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/ModuleImpl.java
deleted file mode 100644
index e3e314f..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/ModuleImpl.java
+++ /dev/null
@@ -1,296 +0,0 @@
-/**
- * <copyright>
- *******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************
- * </copyright>
- *
- * $Id: ModuleImpl.java,v 1.1 2004/11/20 21:18:10 ndai Exp $
- */
-package org.eclipse.jst.server.generic.servertype.definition.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.EObjectImpl;
-
-import org.eclipse.jst.server.generic.servertype.definition.Module;
-import org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Module</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.ModuleImpl#getType <em>Type</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.ModuleImpl#getPublishDir <em>Publish Dir</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.ModuleImpl#getPublisherReference <em>Publisher Reference</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class ModuleImpl extends EObjectImpl implements Module {
- /**
- * The default value of the '{@link #getType() <em>Type</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getType()
- * @generated
- * @ordered
- */
- protected static final String TYPE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getType() <em>Type</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getType()
- * @generated
- * @ordered
- */
- protected String type = TYPE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getPublishDir() <em>Publish Dir</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPublishDir()
- * @generated
- * @ordered
- */
- protected static final String PUBLISH_DIR_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getPublishDir() <em>Publish Dir</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPublishDir()
- * @generated
- * @ordered
- */
- protected String publishDir = PUBLISH_DIR_EDEFAULT;
-
- /**
- * The default value of the '{@link #getPublisherReference() <em>Publisher Reference</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPublisherReference()
- * @generated
- * @ordered
- */
- protected static final String PUBLISHER_REFERENCE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getPublisherReference() <em>Publisher Reference</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPublisherReference()
- * @generated
- * @ordered
- */
- protected String publisherReference = PUBLISHER_REFERENCE_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ModuleImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return ServerTypePackage.eINSTANCE.getModule();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getType() {
- return type;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setType(String newType) {
- String oldType = type;
- type = newType;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ServerTypePackage.MODULE__TYPE, oldType, type));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getPublishDir() {
- return publishDir;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setPublishDir(String newPublishDir) {
- String oldPublishDir = publishDir;
- publishDir = newPublishDir;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ServerTypePackage.MODULE__PUBLISH_DIR, oldPublishDir, publishDir));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getPublisherReference() {
- return publisherReference;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setPublisherReference(String newPublisherReference) {
- String oldPublisherReference = publisherReference;
- publisherReference = newPublisherReference;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ServerTypePackage.MODULE__PUBLISHER_REFERENCE, oldPublisherReference, publisherReference));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.MODULE__TYPE:
- return getType();
- case ServerTypePackage.MODULE__PUBLISH_DIR:
- return getPublishDir();
- case ServerTypePackage.MODULE__PUBLISHER_REFERENCE:
- return getPublisherReference();
- }
- return eDynamicGet(eFeature, resolve);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.MODULE__TYPE:
- setType((String)newValue);
- return;
- case ServerTypePackage.MODULE__PUBLISH_DIR:
- setPublishDir((String)newValue);
- return;
- case ServerTypePackage.MODULE__PUBLISHER_REFERENCE:
- setPublisherReference((String)newValue);
- return;
- }
- eDynamicSet(eFeature, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.MODULE__TYPE:
- setType(TYPE_EDEFAULT);
- return;
- case ServerTypePackage.MODULE__PUBLISH_DIR:
- setPublishDir(PUBLISH_DIR_EDEFAULT);
- return;
- case ServerTypePackage.MODULE__PUBLISHER_REFERENCE:
- setPublisherReference(PUBLISHER_REFERENCE_EDEFAULT);
- return;
- }
- eDynamicUnset(eFeature);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.MODULE__TYPE:
- return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type);
- case ServerTypePackage.MODULE__PUBLISH_DIR:
- return PUBLISH_DIR_EDEFAULT == null ? publishDir != null : !PUBLISH_DIR_EDEFAULT.equals(publishDir);
- case ServerTypePackage.MODULE__PUBLISHER_REFERENCE:
- return PUBLISHER_REFERENCE_EDEFAULT == null ? publisherReference != null : !PUBLISHER_REFERENCE_EDEFAULT.equals(publisherReference);
- }
- return eDynamicIsSet(eFeature);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (type: ");
- result.append(type);
- result.append(", publishDir: ");
- result.append(publishDir);
- result.append(", publisherReference: ");
- result.append(publisherReference);
- result.append(')');
- return result.toString();
- }
-
-} //ModuleImpl
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/PortImpl.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/PortImpl.java
deleted file mode 100644
index a91f336..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/PortImpl.java
+++ /dev/null
@@ -1,296 +0,0 @@
-/**
- * <copyright>
- *******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************
- * </copyright>
- *
- * $Id: PortImpl.java,v 1.1 2004/11/20 21:18:10 ndai Exp $
- */
-package org.eclipse.jst.server.generic.servertype.definition.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.EObjectImpl;
-
-import org.eclipse.jst.server.generic.servertype.definition.Port;
-import org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Port</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.PortImpl#getNo <em>No</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.PortImpl#getName <em>Name</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.PortImpl#getProtocol <em>Protocol</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class PortImpl extends EObjectImpl implements Port {
- /**
- * The default value of the '{@link #getNo() <em>No</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getNo()
- * @generated
- * @ordered
- */
- protected static final String NO_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getNo() <em>No</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getNo()
- * @generated
- * @ordered
- */
- protected String no = NO_EDEFAULT;
-
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_EDEFAULT;
-
- /**
- * The default value of the '{@link #getProtocol() <em>Protocol</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getProtocol()
- * @generated
- * @ordered
- */
- protected static final String PROTOCOL_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getProtocol() <em>Protocol</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getProtocol()
- * @generated
- * @ordered
- */
- protected String protocol = PROTOCOL_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected PortImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return ServerTypePackage.eINSTANCE.getPort();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getNo() {
- return no;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setNo(String newNo) {
- String oldNo = no;
- no = newNo;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ServerTypePackage.PORT__NO, oldNo, no));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getName() {
- return name;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setName(String newName) {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ServerTypePackage.PORT__NAME, oldName, name));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getProtocol() {
- return protocol;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setProtocol(String newProtocol) {
- String oldProtocol = protocol;
- protocol = newProtocol;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ServerTypePackage.PORT__PROTOCOL, oldProtocol, protocol));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.PORT__NO:
- return getNo();
- case ServerTypePackage.PORT__NAME:
- return getName();
- case ServerTypePackage.PORT__PROTOCOL:
- return getProtocol();
- }
- return eDynamicGet(eFeature, resolve);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.PORT__NO:
- setNo((String)newValue);
- return;
- case ServerTypePackage.PORT__NAME:
- setName((String)newValue);
- return;
- case ServerTypePackage.PORT__PROTOCOL:
- setProtocol((String)newValue);
- return;
- }
- eDynamicSet(eFeature, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.PORT__NO:
- setNo(NO_EDEFAULT);
- return;
- case ServerTypePackage.PORT__NAME:
- setName(NAME_EDEFAULT);
- return;
- case ServerTypePackage.PORT__PROTOCOL:
- setProtocol(PROTOCOL_EDEFAULT);
- return;
- }
- eDynamicUnset(eFeature);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.PORT__NO:
- return NO_EDEFAULT == null ? no != null : !NO_EDEFAULT.equals(no);
- case ServerTypePackage.PORT__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case ServerTypePackage.PORT__PROTOCOL:
- return PROTOCOL_EDEFAULT == null ? protocol != null : !PROTOCOL_EDEFAULT.equals(protocol);
- }
- return eDynamicIsSet(eFeature);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (no: ");
- result.append(no);
- result.append(", name: ");
- result.append(name);
- result.append(", protocol: ");
- result.append(protocol);
- result.append(')');
- return result.toString();
- }
-
-} //PortImpl
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/ProjectImpl.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/ProjectImpl.java
deleted file mode 100644
index 18ca93a..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/ProjectImpl.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/**
- * <copyright>
- *******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************
- * </copyright>
- *
- * $Id: ProjectImpl.java,v 1.1 2004/11/20 21:18:10 ndai Exp $
- */
-package org.eclipse.jst.server.generic.servertype.definition.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.EObjectImpl;
-
-import org.eclipse.jst.server.generic.servertype.definition.Project;
-import org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Project</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.ProjectImpl#getClasspathReference <em>Classpath Reference</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class ProjectImpl extends EObjectImpl implements Project {
- /**
- * The default value of the '{@link #getClasspathReference() <em>Classpath Reference</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getClasspathReference()
- * @generated
- * @ordered
- */
- protected static final String CLASSPATH_REFERENCE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getClasspathReference() <em>Classpath Reference</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getClasspathReference()
- * @generated
- * @ordered
- */
- protected String classpathReference = CLASSPATH_REFERENCE_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ProjectImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return ServerTypePackage.eINSTANCE.getProject();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getClasspathReference() {
- return classpathReference;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setClasspathReference(String newClasspathReference) {
- String oldClasspathReference = classpathReference;
- classpathReference = newClasspathReference;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ServerTypePackage.PROJECT__CLASSPATH_REFERENCE, oldClasspathReference, classpathReference));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.PROJECT__CLASSPATH_REFERENCE:
- return getClasspathReference();
- }
- return eDynamicGet(eFeature, resolve);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.PROJECT__CLASSPATH_REFERENCE:
- setClasspathReference((String)newValue);
- return;
- }
- eDynamicSet(eFeature, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.PROJECT__CLASSPATH_REFERENCE:
- setClasspathReference(CLASSPATH_REFERENCE_EDEFAULT);
- return;
- }
- eDynamicUnset(eFeature);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.PROJECT__CLASSPATH_REFERENCE:
- return CLASSPATH_REFERENCE_EDEFAULT == null ? classpathReference != null : !CLASSPATH_REFERENCE_EDEFAULT.equals(classpathReference);
- }
- return eDynamicIsSet(eFeature);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (classpathReference: ");
- result.append(classpathReference);
- result.append(')');
- return result.toString();
- }
-
-} //ProjectImpl
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/PropertyImpl.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/PropertyImpl.java
deleted file mode 100644
index 7171921..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/PropertyImpl.java
+++ /dev/null
@@ -1,404 +0,0 @@
-/**
- * <copyright>
- *******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************
- * </copyright>
- *
- * $Id: PropertyImpl.java,v 1.1 2004/11/20 21:18:10 ndai Exp $
- */
-package org.eclipse.jst.server.generic.servertype.definition.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.EObjectImpl;
-
-import org.eclipse.jst.server.generic.servertype.definition.Property;
-import org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Property</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.PropertyImpl#getContext <em>Context</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.PropertyImpl#getDefault <em>Default</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.PropertyImpl#getId <em>Id</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.PropertyImpl#getLabel <em>Label</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.PropertyImpl#getType <em>Type</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class PropertyImpl extends EObjectImpl implements Property {
- /**
- * The default value of the '{@link #getContext() <em>Context</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getContext()
- * @generated
- * @ordered
- */
- protected static final String CONTEXT_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getContext() <em>Context</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getContext()
- * @generated
- * @ordered
- */
- protected String context = CONTEXT_EDEFAULT;
-
- /**
- * The default value of the '{@link #getDefault() <em>Default</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefault()
- * @generated
- * @ordered
- */
- protected static final String DEFAULT_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDefault() <em>Default</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDefault()
- * @generated
- * @ordered
- */
- protected String default_ = DEFAULT_EDEFAULT;
-
- /**
- * The default value of the '{@link #getId() <em>Id</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getId()
- * @generated
- * @ordered
- */
- protected static final String ID_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getId() <em>Id</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getId()
- * @generated
- * @ordered
- */
- protected String id = ID_EDEFAULT;
-
- /**
- * The default value of the '{@link #getLabel() <em>Label</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getLabel()
- * @generated
- * @ordered
- */
- protected static final String LABEL_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getLabel() <em>Label</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getLabel()
- * @generated
- * @ordered
- */
- protected String label = LABEL_EDEFAULT;
-
- /**
- * The default value of the '{@link #getType() <em>Type</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getType()
- * @generated
- * @ordered
- */
- protected static final String TYPE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getType() <em>Type</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getType()
- * @generated
- * @ordered
- */
- protected String type = TYPE_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected PropertyImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return ServerTypePackage.eINSTANCE.getProperty();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getContext() {
- return context;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setContext(String newContext) {
- String oldContext = context;
- context = newContext;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ServerTypePackage.PROPERTY__CONTEXT, oldContext, context));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getDefault() {
- return default_;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setDefault(String newDefault) {
- String oldDefault = default_;
- default_ = newDefault;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ServerTypePackage.PROPERTY__DEFAULT, oldDefault, default_));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getId() {
- return id;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setId(String newId) {
- String oldId = id;
- id = newId;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ServerTypePackage.PROPERTY__ID, oldId, id));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getLabel() {
- return label;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setLabel(String newLabel) {
- String oldLabel = label;
- label = newLabel;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ServerTypePackage.PROPERTY__LABEL, oldLabel, label));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getType() {
- return type;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setType(String newType) {
- String oldType = type;
- type = newType;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ServerTypePackage.PROPERTY__TYPE, oldType, type));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.PROPERTY__CONTEXT:
- return getContext();
- case ServerTypePackage.PROPERTY__DEFAULT:
- return getDefault();
- case ServerTypePackage.PROPERTY__ID:
- return getId();
- case ServerTypePackage.PROPERTY__LABEL:
- return getLabel();
- case ServerTypePackage.PROPERTY__TYPE:
- return getType();
- }
- return eDynamicGet(eFeature, resolve);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.PROPERTY__CONTEXT:
- setContext((String)newValue);
- return;
- case ServerTypePackage.PROPERTY__DEFAULT:
- setDefault((String)newValue);
- return;
- case ServerTypePackage.PROPERTY__ID:
- setId((String)newValue);
- return;
- case ServerTypePackage.PROPERTY__LABEL:
- setLabel((String)newValue);
- return;
- case ServerTypePackage.PROPERTY__TYPE:
- setType((String)newValue);
- return;
- }
- eDynamicSet(eFeature, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.PROPERTY__CONTEXT:
- setContext(CONTEXT_EDEFAULT);
- return;
- case ServerTypePackage.PROPERTY__DEFAULT:
- setDefault(DEFAULT_EDEFAULT);
- return;
- case ServerTypePackage.PROPERTY__ID:
- setId(ID_EDEFAULT);
- return;
- case ServerTypePackage.PROPERTY__LABEL:
- setLabel(LABEL_EDEFAULT);
- return;
- case ServerTypePackage.PROPERTY__TYPE:
- setType(TYPE_EDEFAULT);
- return;
- }
- eDynamicUnset(eFeature);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.PROPERTY__CONTEXT:
- return CONTEXT_EDEFAULT == null ? context != null : !CONTEXT_EDEFAULT.equals(context);
- case ServerTypePackage.PROPERTY__DEFAULT:
- return DEFAULT_EDEFAULT == null ? default_ != null : !DEFAULT_EDEFAULT.equals(default_);
- case ServerTypePackage.PROPERTY__ID:
- return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id);
- case ServerTypePackage.PROPERTY__LABEL:
- return LABEL_EDEFAULT == null ? label != null : !LABEL_EDEFAULT.equals(label);
- case ServerTypePackage.PROPERTY__TYPE:
- return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type);
- }
- return eDynamicIsSet(eFeature);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (context: ");
- result.append(context);
- result.append(", default: ");
- result.append(default_);
- result.append(", id: ");
- result.append(id);
- result.append(", label: ");
- result.append(label);
- result.append(", type: ");
- result.append(type);
- result.append(')');
- return result.toString();
- }
-
-} //PropertyImpl
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/PublishTypeImpl.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/PublishTypeImpl.java
deleted file mode 100644
index cef3bad..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/PublishTypeImpl.java
+++ /dev/null
@@ -1,242 +0,0 @@
-/**
- * <copyright>
- *******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************
- * </copyright>
- *
- * $Id: PublishTypeImpl.java,v 1.1 2004/11/20 21:18:10 ndai Exp $
- */
-package org.eclipse.jst.server.generic.servertype.definition.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.EObjectImpl;
-
-import org.eclipse.jst.server.generic.servertype.definition.PublishType;
-import org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Publish Type</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.PublishTypeImpl#getTask <em>Task</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.PublishTypeImpl#getClasspathReference <em>Classpath Reference</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class PublishTypeImpl extends EObjectImpl implements PublishType {
- /**
- * The default value of the '{@link #getTask() <em>Task</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTask()
- * @generated
- * @ordered
- */
- protected static final String TASK_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getTask() <em>Task</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTask()
- * @generated
- * @ordered
- */
- protected String task = TASK_EDEFAULT;
-
- /**
- * The default value of the '{@link #getClasspathReference() <em>Classpath Reference</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getClasspathReference()
- * @generated
- * @ordered
- */
- protected static final String CLASSPATH_REFERENCE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getClasspathReference() <em>Classpath Reference</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getClasspathReference()
- * @generated
- * @ordered
- */
- protected String classpathReference = CLASSPATH_REFERENCE_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected PublishTypeImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return ServerTypePackage.eINSTANCE.getPublishType();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getTask() {
- return task;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setTask(String newTask) {
- String oldTask = task;
- task = newTask;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ServerTypePackage.PUBLISH_TYPE__TASK, oldTask, task));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getClasspathReference() {
- return classpathReference;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setClasspathReference(String newClasspathReference) {
- String oldClasspathReference = classpathReference;
- classpathReference = newClasspathReference;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ServerTypePackage.PUBLISH_TYPE__CLASSPATH_REFERENCE, oldClasspathReference, classpathReference));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.PUBLISH_TYPE__TASK:
- return getTask();
- case ServerTypePackage.PUBLISH_TYPE__CLASSPATH_REFERENCE:
- return getClasspathReference();
- }
- return eDynamicGet(eFeature, resolve);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.PUBLISH_TYPE__TASK:
- setTask((String)newValue);
- return;
- case ServerTypePackage.PUBLISH_TYPE__CLASSPATH_REFERENCE:
- setClasspathReference((String)newValue);
- return;
- }
- eDynamicSet(eFeature, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.PUBLISH_TYPE__TASK:
- setTask(TASK_EDEFAULT);
- return;
- case ServerTypePackage.PUBLISH_TYPE__CLASSPATH_REFERENCE:
- setClasspathReference(CLASSPATH_REFERENCE_EDEFAULT);
- return;
- }
- eDynamicUnset(eFeature);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.PUBLISH_TYPE__TASK:
- return TASK_EDEFAULT == null ? task != null : !TASK_EDEFAULT.equals(task);
- case ServerTypePackage.PUBLISH_TYPE__CLASSPATH_REFERENCE:
- return CLASSPATH_REFERENCE_EDEFAULT == null ? classpathReference != null : !CLASSPATH_REFERENCE_EDEFAULT.equals(classpathReference);
- }
- return eDynamicIsSet(eFeature);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (task: ");
- result.append(task);
- result.append(", classpathReference: ");
- result.append(classpathReference);
- result.append(')');
- return result.toString();
- }
-
-} //PublishTypeImpl
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/PublisherImpl.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/PublisherImpl.java
deleted file mode 100644
index 08b1db5..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/PublisherImpl.java
+++ /dev/null
@@ -1,297 +0,0 @@
-/**
- * <copyright>
- *******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************
- * </copyright>
- *
- * $Id: PublisherImpl.java,v 1.1 2004/11/20 21:18:10 ndai Exp $
- */
-package org.eclipse.jst.server.generic.servertype.definition.impl;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.EObjectImpl;
-
-import org.eclipse.emf.ecore.util.BasicFeatureMap;
-import org.eclipse.emf.ecore.util.FeatureMap;
-import org.eclipse.emf.ecore.util.InternalEList;
-
-import org.eclipse.jst.server.generic.servertype.definition.Publisher;
-import org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Publisher</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.PublisherImpl#getGroup <em>Group</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.PublisherImpl#getPublish <em>Publish</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.PublisherImpl#getUnpublish <em>Unpublish</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.PublisherImpl#getId <em>Id</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class PublisherImpl extends EObjectImpl implements Publisher {
- /**
- * The cached value of the '{@link #getGroup() <em>Group</em>}' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getGroup()
- * @generated
- * @ordered
- */
- protected FeatureMap group = null;
-
- /**
- * The default value of the '{@link #getId() <em>Id</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getId()
- * @generated
- * @ordered
- */
- protected static final String ID_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getId() <em>Id</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getId()
- * @generated
- * @ordered
- */
- protected String id = ID_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected PublisherImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return ServerTypePackage.eINSTANCE.getPublisher();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public FeatureMap getGroup() {
- if (group == null) {
- group = new BasicFeatureMap(this, ServerTypePackage.PUBLISHER__GROUP);
- }
- return group;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList getPublish() {
- return ((FeatureMap)getGroup()).list(ServerTypePackage.eINSTANCE.getPublisher_Publish());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList getUnpublish() {
- return ((FeatureMap)getGroup()).list(ServerTypePackage.eINSTANCE.getPublisher_Unpublish());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getId() {
- return id;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setId(String newId) {
- String oldId = id;
- id = newId;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ServerTypePackage.PUBLISHER__ID, oldId, id));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (eDerivedStructuralFeatureID(featureID, baseClass)) {
- case ServerTypePackage.PUBLISHER__GROUP:
- return ((InternalEList)getGroup()).basicRemove(otherEnd, msgs);
- case ServerTypePackage.PUBLISHER__PUBLISH:
- return ((InternalEList)getPublish()).basicRemove(otherEnd, msgs);
- case ServerTypePackage.PUBLISHER__UNPUBLISH:
- return ((InternalEList)getUnpublish()).basicRemove(otherEnd, msgs);
- default:
- return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs);
- }
- }
- return eBasicSetContainer(null, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.PUBLISHER__GROUP:
- return getGroup();
- case ServerTypePackage.PUBLISHER__PUBLISH:
- return getPublish();
- case ServerTypePackage.PUBLISHER__UNPUBLISH:
- return getUnpublish();
- case ServerTypePackage.PUBLISHER__ID:
- return getId();
- }
- return eDynamicGet(eFeature, resolve);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.PUBLISHER__GROUP:
- getGroup().clear();
- getGroup().addAll((Collection)newValue);
- return;
- case ServerTypePackage.PUBLISHER__PUBLISH:
- getPublish().clear();
- getPublish().addAll((Collection)newValue);
- return;
- case ServerTypePackage.PUBLISHER__UNPUBLISH:
- getUnpublish().clear();
- getUnpublish().addAll((Collection)newValue);
- return;
- case ServerTypePackage.PUBLISHER__ID:
- setId((String)newValue);
- return;
- }
- eDynamicSet(eFeature, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.PUBLISHER__GROUP:
- getGroup().clear();
- return;
- case ServerTypePackage.PUBLISHER__PUBLISH:
- getPublish().clear();
- return;
- case ServerTypePackage.PUBLISHER__UNPUBLISH:
- getUnpublish().clear();
- return;
- case ServerTypePackage.PUBLISHER__ID:
- setId(ID_EDEFAULT);
- return;
- }
- eDynamicUnset(eFeature);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.PUBLISHER__GROUP:
- return group != null && !group.isEmpty();
- case ServerTypePackage.PUBLISHER__PUBLISH:
- return !getPublish().isEmpty();
- case ServerTypePackage.PUBLISHER__UNPUBLISH:
- return !getUnpublish().isEmpty();
- case ServerTypePackage.PUBLISHER__ID:
- return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id);
- }
- return eDynamicIsSet(eFeature);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (group: ");
- result.append(group);
- result.append(", id: ");
- result.append(id);
- result.append(')');
- return result.toString();
- }
-
-} //PublisherImpl
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/ServerRuntimeImpl.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/ServerRuntimeImpl.java
deleted file mode 100644
index 052ca32..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/ServerRuntimeImpl.java
+++ /dev/null
@@ -1,881 +0,0 @@
-/**
- * <copyright>
- *******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************
- * </copyright>
- *
- * $Id: ServerRuntimeImpl.java,v 1.2 2004/12/02 17:56:53 ndai Exp $
- */
-package org.eclipse.jst.server.generic.servertype.definition.impl;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.EObjectImpl;
-
-import org.eclipse.emf.ecore.util.BasicFeatureMap;
-import org.eclipse.emf.ecore.util.FeatureMap;
-import org.eclipse.emf.ecore.util.InternalEList;
-
-import org.eclipse.jst.server.generic.internal.xml.Resolver;
-import org.eclipse.jst.server.generic.servertype.definition.Classpath;
-import org.eclipse.jst.server.generic.servertype.definition.LaunchConfiguration;
-import org.eclipse.jst.server.generic.servertype.definition.Module;
-import org.eclipse.jst.server.generic.servertype.definition.Project;
-import org.eclipse.jst.server.generic.servertype.definition.Publisher;
-import org.eclipse.jst.server.generic.servertype.definition.ServerRuntime;
-import org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Server Runtime</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.ServerRuntimeImpl#getGroup <em>Group</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.ServerRuntimeImpl#getProperty <em>Property</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.ServerRuntimeImpl#getGroup1 <em>Group1</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.ServerRuntimeImpl#getPort <em>Port</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.ServerRuntimeImpl#getGroup2 <em>Group2</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.ServerRuntimeImpl#getModule <em>Module</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.ServerRuntimeImpl#getProject <em>Project</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.ServerRuntimeImpl#getStart <em>Start</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.ServerRuntimeImpl#getStop <em>Stop</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.ServerRuntimeImpl#getGroup3 <em>Group3</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.ServerRuntimeImpl#getPublisher <em>Publisher</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.ServerRuntimeImpl#getGroup4 <em>Group4</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.ServerRuntimeImpl#getClasspath <em>Classpath</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.ServerRuntimeImpl#getName <em>Name</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.ServerRuntimeImpl#getVersion <em>Version</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class ServerRuntimeImpl extends EObjectImpl implements ServerRuntime {
- /**
- * The cached value of the '{@link #getGroup() <em>Group</em>}' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getGroup()
- * @generated
- * @ordered
- */
- protected FeatureMap group = null;
-
- /**
- * The cached value of the '{@link #getGroup1() <em>Group1</em>}' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getGroup1()
- * @generated
- * @ordered
- */
- protected FeatureMap group1 = null;
-
- /**
- * The cached value of the '{@link #getGroup2() <em>Group2</em>}' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getGroup2()
- * @generated
- * @ordered
- */
- protected FeatureMap group2 = null;
-
- /**
- * The cached value of the '{@link #getProject() <em>Project</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getProject()
- * @generated
- * @ordered
- */
- protected Project project = null;
-
- /**
- * The cached value of the '{@link #getStart() <em>Start</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getStart()
- * @generated
- * @ordered
- */
- protected LaunchConfiguration start = null;
-
- /**
- * The cached value of the '{@link #getStop() <em>Stop</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getStop()
- * @generated
- * @ordered
- */
- protected LaunchConfiguration stop = null;
-
- /**
- * The cached value of the '{@link #getGroup3() <em>Group3</em>}' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getGroup3()
- * @generated
- * @ordered
- */
- protected FeatureMap group3 = null;
-
- /**
- * The cached value of the '{@link #getGroup4() <em>Group4</em>}' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getGroup4()
- * @generated
- * @ordered
- */
- protected FeatureMap group4 = null;
-
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_EDEFAULT;
-
- /**
- * The default value of the '{@link #getVersion() <em>Version</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getVersion()
- * @generated
- * @ordered
- */
- protected static final String VERSION_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getVersion() <em>Version</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getVersion()
- * @generated
- * @ordered
- */
- protected String version = VERSION_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getGroup() <em>Group</em>}' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getGroup()
- * @generated NOT
- * @ordered
- */
- protected String filename = null;
-
-
- /**
- * The cached value of the '{@link #getGroup() <em>Group</em>}' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getGroup()
- * @generated NOT
- * @ordered
- */
- protected Resolver resolver = new Resolver(this);
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ServerRuntimeImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return ServerTypePackage.eINSTANCE.getServerRuntime();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public FeatureMap getGroup() {
- if (group == null) {
- group = new BasicFeatureMap(this, ServerTypePackage.SERVER_RUNTIME__GROUP);
- }
- return group;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList getProperty() {
- return ((FeatureMap)getGroup()).list(ServerTypePackage.eINSTANCE.getServerRuntime_Property());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public FeatureMap getGroup1() {
- if (group1 == null) {
- group1 = new BasicFeatureMap(this, ServerTypePackage.SERVER_RUNTIME__GROUP1);
- }
- return group1;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList getPort() {
- return ((FeatureMap)getGroup1()).list(ServerTypePackage.eINSTANCE.getServerRuntime_Port());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public FeatureMap getGroup2() {
- if (group2 == null) {
- group2 = new BasicFeatureMap(this, ServerTypePackage.SERVER_RUNTIME__GROUP2);
- }
- return group2;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList getModule() {
- return ((FeatureMap)getGroup2()).list(ServerTypePackage.eINSTANCE.getServerRuntime_Module());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Project getProject() {
- return project;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetProject(Project newProject, NotificationChain msgs) {
- Project oldProject = project;
- project = newProject;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ServerTypePackage.SERVER_RUNTIME__PROJECT, oldProject, newProject);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setProject(Project newProject) {
- if (newProject != project) {
- NotificationChain msgs = null;
- if (project != null)
- msgs = ((InternalEObject)project).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ServerTypePackage.SERVER_RUNTIME__PROJECT, null, msgs);
- if (newProject != null)
- msgs = ((InternalEObject)newProject).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ServerTypePackage.SERVER_RUNTIME__PROJECT, null, msgs);
- msgs = basicSetProject(newProject, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ServerTypePackage.SERVER_RUNTIME__PROJECT, newProject, newProject));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public LaunchConfiguration getStart() {
- return start;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetStart(LaunchConfiguration newStart, NotificationChain msgs) {
- LaunchConfiguration oldStart = start;
- start = newStart;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ServerTypePackage.SERVER_RUNTIME__START, oldStart, newStart);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setStart(LaunchConfiguration newStart) {
- if (newStart != start) {
- NotificationChain msgs = null;
- if (start != null)
- msgs = ((InternalEObject)start).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ServerTypePackage.SERVER_RUNTIME__START, null, msgs);
- if (newStart != null)
- msgs = ((InternalEObject)newStart).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ServerTypePackage.SERVER_RUNTIME__START, null, msgs);
- msgs = basicSetStart(newStart, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ServerTypePackage.SERVER_RUNTIME__START, newStart, newStart));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public LaunchConfiguration getStop() {
- return stop;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetStop(LaunchConfiguration newStop, NotificationChain msgs) {
- LaunchConfiguration oldStop = stop;
- stop = newStop;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ServerTypePackage.SERVER_RUNTIME__STOP, oldStop, newStop);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setStop(LaunchConfiguration newStop) {
- if (newStop != stop) {
- NotificationChain msgs = null;
- if (stop != null)
- msgs = ((InternalEObject)stop).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ServerTypePackage.SERVER_RUNTIME__STOP, null, msgs);
- if (newStop != null)
- msgs = ((InternalEObject)newStop).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ServerTypePackage.SERVER_RUNTIME__STOP, null, msgs);
- msgs = basicSetStop(newStop, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ServerTypePackage.SERVER_RUNTIME__STOP, newStop, newStop));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public FeatureMap getGroup3() {
- if (group3 == null) {
- group3 = new BasicFeatureMap(this, ServerTypePackage.SERVER_RUNTIME__GROUP3);
- }
- return group3;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList getPublisher() {
- return ((FeatureMap)getGroup3()).list(ServerTypePackage.eINSTANCE.getServerRuntime_Publisher());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public FeatureMap getGroup4() {
- if (group4 == null) {
- group4 = new BasicFeatureMap(this, ServerTypePackage.SERVER_RUNTIME__GROUP4);
- }
- return group4;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList getClasspath() {
- return ((FeatureMap)getGroup4()).list(ServerTypePackage.eINSTANCE.getServerRuntime_Classpath());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getName() {
- return name;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setName(String newName) {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ServerTypePackage.SERVER_RUNTIME__NAME, oldName, name));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getVersion() {
- return version;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setVersion(String newVersion) {
- String oldVersion = version;
- version = newVersion;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ServerTypePackage.SERVER_RUNTIME__VERSION, oldVersion, version));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (eDerivedStructuralFeatureID(featureID, baseClass)) {
- case ServerTypePackage.SERVER_RUNTIME__GROUP:
- return ((InternalEList)getGroup()).basicRemove(otherEnd, msgs);
- case ServerTypePackage.SERVER_RUNTIME__PROPERTY:
- return ((InternalEList)getProperty()).basicRemove(otherEnd, msgs);
- case ServerTypePackage.SERVER_RUNTIME__GROUP1:
- return ((InternalEList)getGroup1()).basicRemove(otherEnd, msgs);
- case ServerTypePackage.SERVER_RUNTIME__PORT:
- return ((InternalEList)getPort()).basicRemove(otherEnd, msgs);
- case ServerTypePackage.SERVER_RUNTIME__GROUP2:
- return ((InternalEList)getGroup2()).basicRemove(otherEnd, msgs);
- case ServerTypePackage.SERVER_RUNTIME__MODULE:
- return ((InternalEList)getModule()).basicRemove(otherEnd, msgs);
- case ServerTypePackage.SERVER_RUNTIME__PROJECT:
- return basicSetProject(null, msgs);
- case ServerTypePackage.SERVER_RUNTIME__START:
- return basicSetStart(null, msgs);
- case ServerTypePackage.SERVER_RUNTIME__STOP:
- return basicSetStop(null, msgs);
- case ServerTypePackage.SERVER_RUNTIME__GROUP3:
- return ((InternalEList)getGroup3()).basicRemove(otherEnd, msgs);
- case ServerTypePackage.SERVER_RUNTIME__PUBLISHER:
- return ((InternalEList)getPublisher()).basicRemove(otherEnd, msgs);
- case ServerTypePackage.SERVER_RUNTIME__GROUP4:
- return ((InternalEList)getGroup4()).basicRemove(otherEnd, msgs);
- case ServerTypePackage.SERVER_RUNTIME__CLASSPATH:
- return ((InternalEList)getClasspath()).basicRemove(otherEnd, msgs);
- default:
- return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs);
- }
- }
- return eBasicSetContainer(null, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.SERVER_RUNTIME__GROUP:
- return getGroup();
- case ServerTypePackage.SERVER_RUNTIME__PROPERTY:
- return getProperty();
- case ServerTypePackage.SERVER_RUNTIME__GROUP1:
- return getGroup1();
- case ServerTypePackage.SERVER_RUNTIME__PORT:
- return getPort();
- case ServerTypePackage.SERVER_RUNTIME__GROUP2:
- return getGroup2();
- case ServerTypePackage.SERVER_RUNTIME__MODULE:
- return getModule();
- case ServerTypePackage.SERVER_RUNTIME__PROJECT:
- return getProject();
- case ServerTypePackage.SERVER_RUNTIME__START:
- return getStart();
- case ServerTypePackage.SERVER_RUNTIME__STOP:
- return getStop();
- case ServerTypePackage.SERVER_RUNTIME__GROUP3:
- return getGroup3();
- case ServerTypePackage.SERVER_RUNTIME__PUBLISHER:
- return getPublisher();
- case ServerTypePackage.SERVER_RUNTIME__GROUP4:
- return getGroup4();
- case ServerTypePackage.SERVER_RUNTIME__CLASSPATH:
- return getClasspath();
- case ServerTypePackage.SERVER_RUNTIME__NAME:
- return getName();
- case ServerTypePackage.SERVER_RUNTIME__VERSION:
- return getVersion();
- }
- return eDynamicGet(eFeature, resolve);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.SERVER_RUNTIME__GROUP:
- getGroup().clear();
- getGroup().addAll((Collection)newValue);
- return;
- case ServerTypePackage.SERVER_RUNTIME__PROPERTY:
- getProperty().clear();
- getProperty().addAll((Collection)newValue);
- return;
- case ServerTypePackage.SERVER_RUNTIME__GROUP1:
- getGroup1().clear();
- getGroup1().addAll((Collection)newValue);
- return;
- case ServerTypePackage.SERVER_RUNTIME__PORT:
- getPort().clear();
- getPort().addAll((Collection)newValue);
- return;
- case ServerTypePackage.SERVER_RUNTIME__GROUP2:
- getGroup2().clear();
- getGroup2().addAll((Collection)newValue);
- return;
- case ServerTypePackage.SERVER_RUNTIME__MODULE:
- getModule().clear();
- getModule().addAll((Collection)newValue);
- return;
- case ServerTypePackage.SERVER_RUNTIME__PROJECT:
- setProject((Project)newValue);
- return;
- case ServerTypePackage.SERVER_RUNTIME__START:
- setStart((LaunchConfiguration)newValue);
- return;
- case ServerTypePackage.SERVER_RUNTIME__STOP:
- setStop((LaunchConfiguration)newValue);
- return;
- case ServerTypePackage.SERVER_RUNTIME__GROUP3:
- getGroup3().clear();
- getGroup3().addAll((Collection)newValue);
- return;
- case ServerTypePackage.SERVER_RUNTIME__PUBLISHER:
- getPublisher().clear();
- getPublisher().addAll((Collection)newValue);
- return;
- case ServerTypePackage.SERVER_RUNTIME__GROUP4:
- getGroup4().clear();
- getGroup4().addAll((Collection)newValue);
- return;
- case ServerTypePackage.SERVER_RUNTIME__CLASSPATH:
- getClasspath().clear();
- getClasspath().addAll((Collection)newValue);
- return;
- case ServerTypePackage.SERVER_RUNTIME__NAME:
- setName((String)newValue);
- return;
- case ServerTypePackage.SERVER_RUNTIME__VERSION:
- setVersion((String)newValue);
- return;
- }
- eDynamicSet(eFeature, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.SERVER_RUNTIME__GROUP:
- getGroup().clear();
- return;
- case ServerTypePackage.SERVER_RUNTIME__PROPERTY:
- getProperty().clear();
- return;
- case ServerTypePackage.SERVER_RUNTIME__GROUP1:
- getGroup1().clear();
- return;
- case ServerTypePackage.SERVER_RUNTIME__PORT:
- getPort().clear();
- return;
- case ServerTypePackage.SERVER_RUNTIME__GROUP2:
- getGroup2().clear();
- return;
- case ServerTypePackage.SERVER_RUNTIME__MODULE:
- getModule().clear();
- return;
- case ServerTypePackage.SERVER_RUNTIME__PROJECT:
- setProject((Project)null);
- return;
- case ServerTypePackage.SERVER_RUNTIME__START:
- setStart((LaunchConfiguration)null);
- return;
- case ServerTypePackage.SERVER_RUNTIME__STOP:
- setStop((LaunchConfiguration)null);
- return;
- case ServerTypePackage.SERVER_RUNTIME__GROUP3:
- getGroup3().clear();
- return;
- case ServerTypePackage.SERVER_RUNTIME__PUBLISHER:
- getPublisher().clear();
- return;
- case ServerTypePackage.SERVER_RUNTIME__GROUP4:
- getGroup4().clear();
- return;
- case ServerTypePackage.SERVER_RUNTIME__CLASSPATH:
- getClasspath().clear();
- return;
- case ServerTypePackage.SERVER_RUNTIME__NAME:
- setName(NAME_EDEFAULT);
- return;
- case ServerTypePackage.SERVER_RUNTIME__VERSION:
- setVersion(VERSION_EDEFAULT);
- return;
- }
- eDynamicUnset(eFeature);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.SERVER_RUNTIME__GROUP:
- return group != null && !group.isEmpty();
- case ServerTypePackage.SERVER_RUNTIME__PROPERTY:
- return !getProperty().isEmpty();
- case ServerTypePackage.SERVER_RUNTIME__GROUP1:
- return group1 != null && !group1.isEmpty();
- case ServerTypePackage.SERVER_RUNTIME__PORT:
- return !getPort().isEmpty();
- case ServerTypePackage.SERVER_RUNTIME__GROUP2:
- return group2 != null && !group2.isEmpty();
- case ServerTypePackage.SERVER_RUNTIME__MODULE:
- return !getModule().isEmpty();
- case ServerTypePackage.SERVER_RUNTIME__PROJECT:
- return project != null;
- case ServerTypePackage.SERVER_RUNTIME__START:
- return start != null;
- case ServerTypePackage.SERVER_RUNTIME__STOP:
- return stop != null;
- case ServerTypePackage.SERVER_RUNTIME__GROUP3:
- return group3 != null && !group3.isEmpty();
- case ServerTypePackage.SERVER_RUNTIME__PUBLISHER:
- return !getPublisher().isEmpty();
- case ServerTypePackage.SERVER_RUNTIME__GROUP4:
- return group4 != null && !group4.isEmpty();
- case ServerTypePackage.SERVER_RUNTIME__CLASSPATH:
- return !getClasspath().isEmpty();
- case ServerTypePackage.SERVER_RUNTIME__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case ServerTypePackage.SERVER_RUNTIME__VERSION:
- return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version);
- }
- return eDynamicIsSet(eFeature);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (group: ");
- result.append(group);
- result.append(", group1: ");
- result.append(group1);
- result.append(", group2: ");
- result.append(group2);
- result.append(", group3: ");
- result.append(group3);
- result.append(", group4: ");
- result.append(group4);
- result.append(", name: ");
- result.append(name);
- result.append(", version: ");
- result.append(version);
- result.append(')');
- return result.toString();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public Publisher getPublisher(String id) {
- Iterator iterator = this.getPublisher().iterator();
- while (iterator.hasNext()) {
- Publisher publisher = (Publisher) iterator.next();
- if(id.equals(publisher.getId()))
- return publisher;
- }
- return null;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public Module getModule(String type) {
- Iterator iterator = this.getModule().iterator();
- while (iterator.hasNext()) {
- Module module = (Module) iterator.next();
- if(type.equals(module.getType()))
- return module;
- }
- return null;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public Classpath getClasspath(String ref) {
- Iterator iterator = this.getClasspath().iterator();
- while (iterator.hasNext()) {
- Classpath cp = (Classpath) iterator.next();
- if(ref.equals(cp.getId()))
- return cp;
- }
- return null;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public String getFilename() {
- return filename;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public void setFilename(String fn) {
- this.filename = fn;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public void setPropertyValues(Map properties) {
- this.resolver.setPropertyValues(properties);
-
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public Resolver getResolver() {
- return this.resolver;
- }
-
-
-} //ServerRuntimeImpl
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/ServerTypeFactoryImpl.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/ServerTypeFactoryImpl.java
deleted file mode 100644
index 9002e4b..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/ServerTypeFactoryImpl.java
+++ /dev/null
@@ -1,211 +0,0 @@
-/**
- * <copyright>
- *******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************
- * </copyright>
- *
- * $Id: ServerTypeFactoryImpl.java,v 1.1 2004/11/20 21:18:10 ndai Exp $
- */
-package org.eclipse.jst.server.generic.servertype.definition.impl;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-
-import org.eclipse.emf.ecore.impl.EFactoryImpl;
-
-import org.eclipse.jst.server.generic.servertype.definition.*;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model <b>Factory</b>.
- * <!-- end-user-doc -->
- * @generated
- */
-public class ServerTypeFactoryImpl extends EFactoryImpl implements ServerTypeFactory {
- /**
- * Creates and instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ServerTypeFactoryImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EObject create(EClass eClass) {
- switch (eClass.getClassifierID()) {
- case ServerTypePackage.ARCHIVE_TYPE: return createArchiveType();
- case ServerTypePackage.CLASSPATH: return createClasspath();
- case ServerTypePackage.LAUNCH_CONFIGURATION: return createLaunchConfiguration();
- case ServerTypePackage.MODULE: return createModule();
- case ServerTypePackage.PORT: return createPort();
- case ServerTypePackage.PROJECT: return createProject();
- case ServerTypePackage.PROPERTY: return createProperty();
- case ServerTypePackage.PUBLISHER: return createPublisher();
- case ServerTypePackage.PUBLISH_TYPE: return createPublishType();
- case ServerTypePackage.SERVER_RUNTIME: return createServerRuntime();
- case ServerTypePackage.UNPUBLISH_TYPE: return createUnpublishType();
- default:
- throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ArchiveType createArchiveType() {
- ArchiveTypeImpl archiveType = new ArchiveTypeImpl();
- return archiveType;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Classpath createClasspath() {
- ClasspathImpl classpath = new ClasspathImpl();
- return classpath;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public LaunchConfiguration createLaunchConfiguration() {
- LaunchConfigurationImpl launchConfiguration = new LaunchConfigurationImpl();
- return launchConfiguration;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Module createModule() {
- ModuleImpl module = new ModuleImpl();
- return module;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Port createPort() {
- PortImpl port = new PortImpl();
- return port;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Project createProject() {
- ProjectImpl project = new ProjectImpl();
- return project;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Property createProperty() {
- PropertyImpl property = new PropertyImpl();
- return property;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Publisher createPublisher() {
- PublisherImpl publisher = new PublisherImpl();
- return publisher;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public PublishType createPublishType() {
- PublishTypeImpl publishType = new PublishTypeImpl();
- return publishType;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ServerRuntime createServerRuntime() {
- ServerRuntimeImpl serverRuntime = new ServerRuntimeImpl();
- return serverRuntime;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public UnpublishType createUnpublishType() {
- UnpublishTypeImpl unpublishType = new UnpublishTypeImpl();
- return unpublishType;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ServerTypePackage getServerTypePackage() {
- return (ServerTypePackage)getEPackage();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @deprecated
- * @generated
- */
- public static ServerTypePackage getPackage() {
- return ServerTypePackage.eINSTANCE;
- }
-
-} //ServerTypeFactoryImpl
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/ServerTypePackageImpl.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/ServerTypePackageImpl.java
deleted file mode 100644
index 02e6613..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/ServerTypePackageImpl.java
+++ /dev/null
@@ -1,1329 +0,0 @@
-/**
- * <copyright>
- *******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************
- * </copyright>
- *
- * $Id: ServerTypePackageImpl.java,v 1.1 2004/11/20 21:18:10 ndai Exp $
- */
-package org.eclipse.jst.server.generic.servertype.definition.impl;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-
-import org.eclipse.emf.ecore.impl.EPackageImpl;
-
-import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
-
-import org.eclipse.emf.ecore.xml.type.impl.XMLTypePackageImpl;
-
-import org.eclipse.jst.server.generic.servertype.definition.ArchiveType;
-import org.eclipse.jst.server.generic.servertype.definition.Classpath;
-import org.eclipse.jst.server.generic.servertype.definition.LaunchConfiguration;
-import org.eclipse.jst.server.generic.servertype.definition.Module;
-import org.eclipse.jst.server.generic.servertype.definition.Port;
-import org.eclipse.jst.server.generic.servertype.definition.Project;
-import org.eclipse.jst.server.generic.servertype.definition.Property;
-import org.eclipse.jst.server.generic.servertype.definition.PublishType;
-import org.eclipse.jst.server.generic.servertype.definition.Publisher;
-import org.eclipse.jst.server.generic.servertype.definition.ServerRuntime;
-import org.eclipse.jst.server.generic.servertype.definition.ServerTypeFactory;
-import org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage;
-import org.eclipse.jst.server.generic.servertype.definition.UnpublishType;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model <b>Package</b>.
- * <!-- end-user-doc -->
- * @generated
- */
-public class ServerTypePackageImpl extends EPackageImpl implements ServerTypePackage {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass archiveTypeEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass classpathEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass launchConfigurationEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass moduleEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass portEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass projectEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass propertyEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass publisherEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass publishTypeEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass serverRuntimeEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass unpublishTypeEClass = null;
-
- /**
- * Creates an instance of the model <b>Package</b>, registered with
- * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
- * package URI value.
- * <p>Note: the correct way to create the package is via the static
- * factory method {@link #init init()}, which also performs
- * initialization of the package, or returns the registered package,
- * if one already exists.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.ecore.EPackage.Registry
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage#eNS_URI
- * @see #init()
- * @generated
- */
- private ServerTypePackageImpl() {
- super(eNS_URI, ServerTypeFactory.eINSTANCE);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static boolean isInited = false;
-
- /**
- * Creates, registers, and initializes the <b>Package</b> for this
- * model, and for any others upon which it depends. Simple
- * dependencies are satisfied by calling this method on all
- * dependent packages before doing anything else. This method drives
- * initialization for interdependent packages directly, in parallel
- * with this package, itself.
- * <p>Of this package and its interdependencies, all packages which
- * have not yet been registered by their URI values are first created
- * and registered. The packages are then initialized in two steps:
- * meta-model objects for all of the packages are created before any
- * are initialized, since one package's meta-model objects may refer to
- * those of another.
- * <p>Invocation of this method will not affect any packages that have
- * already been initialized.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #eNS_URI
- * @see #createPackageContents()
- * @see #initializePackageContents()
- * @generated
- */
- public static ServerTypePackage init() {
- if (isInited) return (ServerTypePackage)EPackage.Registry.INSTANCE.getEPackage(ServerTypePackage.eNS_URI);
-
- // Obtain or create and register package
- ServerTypePackageImpl theServerTypePackage = (ServerTypePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof ServerTypePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new ServerTypePackageImpl());
-
- isInited = true;
-
- // Initialize simple dependencies
- XMLTypePackageImpl.init();
-
- // Create package meta-data objects
- theServerTypePackage.createPackageContents();
-
- // Initialize created meta-data
- theServerTypePackage.initializePackageContents();
-
- // Mark meta-data to indicate it can't be changed
- theServerTypePackage.freeze();
-
- return theServerTypePackage;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getArchiveType() {
- return archiveTypeEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getArchiveType_Path() {
- return (EAttribute)archiveTypeEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getClasspath() {
- return classpathEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getClasspath_Group() {
- return (EAttribute)classpathEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getClasspath_Archive() {
- return (EReference)classpathEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getClasspath_Id() {
- return (EAttribute)classpathEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getClasspath_IsLibrary() {
- return (EAttribute)classpathEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getLaunchConfiguration() {
- return launchConfigurationEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getLaunchConfiguration_Class() {
- return (EAttribute)launchConfigurationEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getLaunchConfiguration_WorkingDirectory() {
- return (EAttribute)launchConfigurationEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getLaunchConfiguration_ProgramArguments() {
- return (EAttribute)launchConfigurationEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getLaunchConfiguration_VmParameters() {
- return (EAttribute)launchConfigurationEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getLaunchConfiguration_ClasspathReference() {
- return (EAttribute)launchConfigurationEClass.getEStructuralFeatures().get(4);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getModule() {
- return moduleEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getModule_Type() {
- return (EAttribute)moduleEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getModule_PublishDir() {
- return (EAttribute)moduleEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getModule_PublisherReference() {
- return (EAttribute)moduleEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getPort() {
- return portEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getPort_No() {
- return (EAttribute)portEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getPort_Name() {
- return (EAttribute)portEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getPort_Protocol() {
- return (EAttribute)portEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getProject() {
- return projectEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getProject_ClasspathReference() {
- return (EAttribute)projectEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getProperty() {
- return propertyEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getProperty_Context() {
- return (EAttribute)propertyEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getProperty_Default() {
- return (EAttribute)propertyEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getProperty_Id() {
- return (EAttribute)propertyEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getProperty_Label() {
- return (EAttribute)propertyEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getProperty_Type() {
- return (EAttribute)propertyEClass.getEStructuralFeatures().get(4);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getPublisher() {
- return publisherEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getPublisher_Group() {
- return (EAttribute)publisherEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getPublisher_Publish() {
- return (EReference)publisherEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getPublisher_Unpublish() {
- return (EReference)publisherEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getPublisher_Id() {
- return (EAttribute)publisherEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getPublishType() {
- return publishTypeEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getPublishType_Task() {
- return (EAttribute)publishTypeEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getPublishType_ClasspathReference() {
- return (EAttribute)publishTypeEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getServerRuntime() {
- return serverRuntimeEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getServerRuntime_Group() {
- return (EAttribute)serverRuntimeEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getServerRuntime_Property() {
- return (EReference)serverRuntimeEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getServerRuntime_Group1() {
- return (EAttribute)serverRuntimeEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getServerRuntime_Port() {
- return (EReference)serverRuntimeEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getServerRuntime_Group2() {
- return (EAttribute)serverRuntimeEClass.getEStructuralFeatures().get(4);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getServerRuntime_Module() {
- return (EReference)serverRuntimeEClass.getEStructuralFeatures().get(5);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getServerRuntime_Project() {
- return (EReference)serverRuntimeEClass.getEStructuralFeatures().get(6);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getServerRuntime_Start() {
- return (EReference)serverRuntimeEClass.getEStructuralFeatures().get(7);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getServerRuntime_Stop() {
- return (EReference)serverRuntimeEClass.getEStructuralFeatures().get(8);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getServerRuntime_Group3() {
- return (EAttribute)serverRuntimeEClass.getEStructuralFeatures().get(9);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getServerRuntime_Publisher() {
- return (EReference)serverRuntimeEClass.getEStructuralFeatures().get(10);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getServerRuntime_Group4() {
- return (EAttribute)serverRuntimeEClass.getEStructuralFeatures().get(11);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getServerRuntime_Classpath() {
- return (EReference)serverRuntimeEClass.getEStructuralFeatures().get(12);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getServerRuntime_Name() {
- return (EAttribute)serverRuntimeEClass.getEStructuralFeatures().get(13);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getServerRuntime_Version() {
- return (EAttribute)serverRuntimeEClass.getEStructuralFeatures().get(14);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getUnpublishType() {
- return unpublishTypeEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getUnpublishType_Task() {
- return (EAttribute)unpublishTypeEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getUnpublishType_ClasspathReference() {
- return (EAttribute)unpublishTypeEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ServerTypeFactory getServerTypeFactory() {
- return (ServerTypeFactory)getEFactoryInstance();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private boolean isCreated = false;
-
- /**
- * Creates the meta-model objects for the package. This method is
- * guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void createPackageContents() {
- if (isCreated) return;
- isCreated = true;
-
- // Create classes and their features
- archiveTypeEClass = createEClass(ARCHIVE_TYPE);
- createEAttribute(archiveTypeEClass, ARCHIVE_TYPE__PATH);
-
- classpathEClass = createEClass(CLASSPATH);
- createEAttribute(classpathEClass, CLASSPATH__GROUP);
- createEReference(classpathEClass, CLASSPATH__ARCHIVE);
- createEAttribute(classpathEClass, CLASSPATH__ID);
- createEAttribute(classpathEClass, CLASSPATH__IS_LIBRARY);
-
- launchConfigurationEClass = createEClass(LAUNCH_CONFIGURATION);
- createEAttribute(launchConfigurationEClass, LAUNCH_CONFIGURATION__CLASS);
- createEAttribute(launchConfigurationEClass, LAUNCH_CONFIGURATION__WORKING_DIRECTORY);
- createEAttribute(launchConfigurationEClass, LAUNCH_CONFIGURATION__PROGRAM_ARGUMENTS);
- createEAttribute(launchConfigurationEClass, LAUNCH_CONFIGURATION__VM_PARAMETERS);
- createEAttribute(launchConfigurationEClass, LAUNCH_CONFIGURATION__CLASSPATH_REFERENCE);
-
- moduleEClass = createEClass(MODULE);
- createEAttribute(moduleEClass, MODULE__TYPE);
- createEAttribute(moduleEClass, MODULE__PUBLISH_DIR);
- createEAttribute(moduleEClass, MODULE__PUBLISHER_REFERENCE);
-
- portEClass = createEClass(PORT);
- createEAttribute(portEClass, PORT__NO);
- createEAttribute(portEClass, PORT__NAME);
- createEAttribute(portEClass, PORT__PROTOCOL);
-
- projectEClass = createEClass(PROJECT);
- createEAttribute(projectEClass, PROJECT__CLASSPATH_REFERENCE);
-
- propertyEClass = createEClass(PROPERTY);
- createEAttribute(propertyEClass, PROPERTY__CONTEXT);
- createEAttribute(propertyEClass, PROPERTY__DEFAULT);
- createEAttribute(propertyEClass, PROPERTY__ID);
- createEAttribute(propertyEClass, PROPERTY__LABEL);
- createEAttribute(propertyEClass, PROPERTY__TYPE);
-
- publisherEClass = createEClass(PUBLISHER);
- createEAttribute(publisherEClass, PUBLISHER__GROUP);
- createEReference(publisherEClass, PUBLISHER__PUBLISH);
- createEReference(publisherEClass, PUBLISHER__UNPUBLISH);
- createEAttribute(publisherEClass, PUBLISHER__ID);
-
- publishTypeEClass = createEClass(PUBLISH_TYPE);
- createEAttribute(publishTypeEClass, PUBLISH_TYPE__TASK);
- createEAttribute(publishTypeEClass, PUBLISH_TYPE__CLASSPATH_REFERENCE);
-
- serverRuntimeEClass = createEClass(SERVER_RUNTIME);
- createEAttribute(serverRuntimeEClass, SERVER_RUNTIME__GROUP);
- createEReference(serverRuntimeEClass, SERVER_RUNTIME__PROPERTY);
- createEAttribute(serverRuntimeEClass, SERVER_RUNTIME__GROUP1);
- createEReference(serverRuntimeEClass, SERVER_RUNTIME__PORT);
- createEAttribute(serverRuntimeEClass, SERVER_RUNTIME__GROUP2);
- createEReference(serverRuntimeEClass, SERVER_RUNTIME__MODULE);
- createEReference(serverRuntimeEClass, SERVER_RUNTIME__PROJECT);
- createEReference(serverRuntimeEClass, SERVER_RUNTIME__START);
- createEReference(serverRuntimeEClass, SERVER_RUNTIME__STOP);
- createEAttribute(serverRuntimeEClass, SERVER_RUNTIME__GROUP3);
- createEReference(serverRuntimeEClass, SERVER_RUNTIME__PUBLISHER);
- createEAttribute(serverRuntimeEClass, SERVER_RUNTIME__GROUP4);
- createEReference(serverRuntimeEClass, SERVER_RUNTIME__CLASSPATH);
- createEAttribute(serverRuntimeEClass, SERVER_RUNTIME__NAME);
- createEAttribute(serverRuntimeEClass, SERVER_RUNTIME__VERSION);
-
- unpublishTypeEClass = createEClass(UNPUBLISH_TYPE);
- createEAttribute(unpublishTypeEClass, UNPUBLISH_TYPE__TASK);
- createEAttribute(unpublishTypeEClass, UNPUBLISH_TYPE__CLASSPATH_REFERENCE);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private boolean isInitialized = false;
-
- /**
- * Complete the initialization of the package and its meta-model. This
- * method is guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void initializePackageContents() {
- if (isInitialized) return;
- isInitialized = true;
-
- // Initialize package
- setName(eNAME);
- setNsPrefix(eNS_PREFIX);
- setNsURI(eNS_URI);
-
- // Obtain other dependent packages
- XMLTypePackageImpl theXMLTypePackage = (XMLTypePackageImpl)EPackage.Registry.INSTANCE.getEPackage(XMLTypePackage.eNS_URI);
-
- // Add supertypes to classes
-
- // Initialize classes and features; add operations and parameters
- initEClass(archiveTypeEClass, ArchiveType.class, "ArchiveType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getArchiveType_Path(), theXMLTypePackage.getString(), "path", null, 0, 1, ArchiveType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(classpathEClass, Classpath.class, "Classpath", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getClasspath_Group(), ecorePackage.getEFeatureMapEntry(), "group", null, 0, -1, Classpath.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getClasspath_Archive(), this.getArchiveType(), null, "archive", null, 1, -1, Classpath.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
- initEAttribute(getClasspath_Id(), theXMLTypePackage.getString(), "id", null, 0, 1, Classpath.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getClasspath_IsLibrary(), theXMLTypePackage.getBoolean(), "isLibrary", null, 0, 1, Classpath.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(launchConfigurationEClass, LaunchConfiguration.class, "LaunchConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getLaunchConfiguration_Class(), theXMLTypePackage.getString(), "class", null, 1, 1, LaunchConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getLaunchConfiguration_WorkingDirectory(), theXMLTypePackage.getString(), "workingDirectory", null, 1, 1, LaunchConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getLaunchConfiguration_ProgramArguments(), theXMLTypePackage.getString(), "programArguments", null, 1, 1, LaunchConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getLaunchConfiguration_VmParameters(), theXMLTypePackage.getString(), "vmParameters", null, 1, 1, LaunchConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getLaunchConfiguration_ClasspathReference(), theXMLTypePackage.getString(), "classpathReference", null, 1, 1, LaunchConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(moduleEClass, Module.class, "Module", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getModule_Type(), theXMLTypePackage.getString(), "type", null, 1, 1, Module.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getModule_PublishDir(), theXMLTypePackage.getString(), "publishDir", null, 1, 1, Module.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getModule_PublisherReference(), theXMLTypePackage.getString(), "publisherReference", null, 1, 1, Module.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(portEClass, Port.class, "Port", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getPort_No(), theXMLTypePackage.getString(), "no", null, 1, 1, Port.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getPort_Name(), theXMLTypePackage.getString(), "name", null, 1, 1, Port.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getPort_Protocol(), theXMLTypePackage.getString(), "protocol", null, 1, 1, Port.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(projectEClass, Project.class, "Project", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getProject_ClasspathReference(), theXMLTypePackage.getString(), "classpathReference", null, 1, 1, Project.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(propertyEClass, Property.class, "Property", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getProperty_Context(), theXMLTypePackage.getString(), "context", null, 0, 1, Property.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getProperty_Default(), theXMLTypePackage.getString(), "default", null, 0, 1, Property.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getProperty_Id(), theXMLTypePackage.getString(), "id", null, 0, 1, Property.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getProperty_Label(), theXMLTypePackage.getString(), "label", null, 0, 1, Property.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getProperty_Type(), theXMLTypePackage.getString(), "type", null, 0, 1, Property.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(publisherEClass, Publisher.class, "Publisher", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getPublisher_Group(), ecorePackage.getEFeatureMapEntry(), "group", null, 0, -1, Publisher.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getPublisher_Publish(), this.getPublishType(), null, "publish", null, 1, -1, Publisher.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
- initEReference(getPublisher_Unpublish(), this.getUnpublishType(), null, "unpublish", null, 1, -1, Publisher.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
- initEAttribute(getPublisher_Id(), theXMLTypePackage.getString(), "id", null, 0, 1, Publisher.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(publishTypeEClass, PublishType.class, "PublishType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getPublishType_Task(), theXMLTypePackage.getString(), "task", null, 1, 1, PublishType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getPublishType_ClasspathReference(), theXMLTypePackage.getString(), "classpathReference", null, 1, 1, PublishType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(serverRuntimeEClass, ServerRuntime.class, "ServerRuntime", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getServerRuntime_Group(), ecorePackage.getEFeatureMapEntry(), "group", null, 0, -1, ServerRuntime.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getServerRuntime_Property(), this.getProperty(), null, "property", null, 0, -1, ServerRuntime.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
- initEAttribute(getServerRuntime_Group1(), ecorePackage.getEFeatureMapEntry(), "group1", null, 0, -1, ServerRuntime.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getServerRuntime_Port(), this.getPort(), null, "port", null, 0, -1, ServerRuntime.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
- initEAttribute(getServerRuntime_Group2(), ecorePackage.getEFeatureMapEntry(), "group2", null, 0, -1, ServerRuntime.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getServerRuntime_Module(), this.getModule(), null, "module", null, 1, -1, ServerRuntime.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
- initEReference(getServerRuntime_Project(), this.getProject(), null, "project", null, 1, 1, ServerRuntime.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getServerRuntime_Start(), this.getLaunchConfiguration(), null, "start", null, 1, 1, ServerRuntime.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getServerRuntime_Stop(), this.getLaunchConfiguration(), null, "stop", null, 1, 1, ServerRuntime.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getServerRuntime_Group3(), ecorePackage.getEFeatureMapEntry(), "group3", null, 0, -1, ServerRuntime.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getServerRuntime_Publisher(), this.getPublisher(), null, "publisher", null, 0, -1, ServerRuntime.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
- initEAttribute(getServerRuntime_Group4(), ecorePackage.getEFeatureMapEntry(), "group4", null, 0, -1, ServerRuntime.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getServerRuntime_Classpath(), this.getClasspath(), null, "classpath", null, 1, -1, ServerRuntime.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
- initEAttribute(getServerRuntime_Name(), theXMLTypePackage.getString(), "name", null, 1, 1, ServerRuntime.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getServerRuntime_Version(), theXMLTypePackage.getString(), "version", null, 0, 1, ServerRuntime.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(unpublishTypeEClass, UnpublishType.class, "UnpublishType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getUnpublishType_Task(), theXMLTypePackage.getString(), "task", null, 1, 1, UnpublishType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getUnpublishType_ClasspathReference(), theXMLTypePackage.getString(), "classpathReference", null, 1, 1, UnpublishType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- // Create resource
- createResource(eNS_URI);
-
- // Create annotations
- // http:///org/eclipse/emf/ecore/util/ExtendedMetaData
- createExtendedMetaDataAnnotations();
- }
-
- /**
- * Initializes the annotations for <b>http:///org/eclipse/emf/ecore/util/ExtendedMetaData</b>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void createExtendedMetaDataAnnotations() {
- String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData";
- addAnnotation
- (archiveTypeEClass,
- source,
- new String[] {
- "name", "archive_._type",
- "kind", "empty"
- });
- addAnnotation
- (getArchiveType_Path(),
- source,
- new String[] {
- "kind", "attribute",
- "name", "path"
- });
- addAnnotation
- (classpathEClass,
- source,
- new String[] {
- "name", "Classpath",
- "kind", "elementOnly"
- });
- addAnnotation
- (getClasspath_Group(),
- source,
- new String[] {
- "kind", "group",
- "name", "group:0"
- });
- addAnnotation
- (getClasspath_Archive(),
- source,
- new String[] {
- "kind", "element",
- "name", "archive",
- "group", "#group:0"
- });
- addAnnotation
- (getClasspath_Id(),
- source,
- new String[] {
- "kind", "attribute",
- "name", "id"
- });
- addAnnotation
- (getClasspath_IsLibrary(),
- source,
- new String[] {
- "kind", "attribute",
- "name", "isLibrary"
- });
- addAnnotation
- (launchConfigurationEClass,
- source,
- new String[] {
- "name", "LaunchConfiguration",
- "kind", "elementOnly"
- });
- addAnnotation
- (getLaunchConfiguration_Class(),
- source,
- new String[] {
- "kind", "element",
- "name", "class"
- });
- addAnnotation
- (getLaunchConfiguration_WorkingDirectory(),
- source,
- new String[] {
- "kind", "element",
- "name", "workingDirectory"
- });
- addAnnotation
- (getLaunchConfiguration_ProgramArguments(),
- source,
- new String[] {
- "kind", "element",
- "name", "programArguments"
- });
- addAnnotation
- (getLaunchConfiguration_VmParameters(),
- source,
- new String[] {
- "kind", "element",
- "name", "vmParameters"
- });
- addAnnotation
- (getLaunchConfiguration_ClasspathReference(),
- source,
- new String[] {
- "kind", "element",
- "name", "classpathReference"
- });
- addAnnotation
- (moduleEClass,
- source,
- new String[] {
- "name", "Module",
- "kind", "elementOnly"
- });
- addAnnotation
- (getModule_Type(),
- source,
- new String[] {
- "kind", "element",
- "name", "type"
- });
- addAnnotation
- (getModule_PublishDir(),
- source,
- new String[] {
- "kind", "element",
- "name", "publishDir"
- });
- addAnnotation
- (getModule_PublisherReference(),
- source,
- new String[] {
- "kind", "element",
- "name", "publisherReference"
- });
- addAnnotation
- (portEClass,
- source,
- new String[] {
- "name", "Port",
- "kind", "elementOnly"
- });
- addAnnotation
- (getPort_No(),
- source,
- new String[] {
- "kind", "element",
- "name", "no"
- });
- addAnnotation
- (getPort_Name(),
- source,
- new String[] {
- "kind", "element",
- "name", "name"
- });
- addAnnotation
- (getPort_Protocol(),
- source,
- new String[] {
- "kind", "element",
- "name", "protocol"
- });
- addAnnotation
- (projectEClass,
- source,
- new String[] {
- "name", "Project",
- "kind", "elementOnly"
- });
- addAnnotation
- (getProject_ClasspathReference(),
- source,
- new String[] {
- "kind", "element",
- "name", "classpathReference"
- });
- addAnnotation
- (propertyEClass,
- source,
- new String[] {
- "name", "Property",
- "kind", "empty"
- });
- addAnnotation
- (getProperty_Context(),
- source,
- new String[] {
- "kind", "attribute",
- "name", "context"
- });
- addAnnotation
- (getProperty_Default(),
- source,
- new String[] {
- "kind", "attribute",
- "name", "default"
- });
- addAnnotation
- (getProperty_Id(),
- source,
- new String[] {
- "kind", "attribute",
- "name", "id"
- });
- addAnnotation
- (getProperty_Label(),
- source,
- new String[] {
- "kind", "attribute",
- "name", "label"
- });
- addAnnotation
- (getProperty_Type(),
- source,
- new String[] {
- "kind", "attribute",
- "name", "type"
- });
- addAnnotation
- (publisherEClass,
- source,
- new String[] {
- "name", "Publisher",
- "kind", "elementOnly"
- });
- addAnnotation
- (getPublisher_Group(),
- source,
- new String[] {
- "kind", "group",
- "name", "group:0"
- });
- addAnnotation
- (getPublisher_Publish(),
- source,
- new String[] {
- "kind", "element",
- "name", "publish",
- "group", "#group:0"
- });
- addAnnotation
- (getPublisher_Unpublish(),
- source,
- new String[] {
- "kind", "element",
- "name", "unpublish",
- "group", "#group:0"
- });
- addAnnotation
- (getPublisher_Id(),
- source,
- new String[] {
- "kind", "attribute",
- "name", "id"
- });
- addAnnotation
- (publishTypeEClass,
- source,
- new String[] {
- "name", "publish_._type",
- "kind", "elementOnly"
- });
- addAnnotation
- (getPublishType_Task(),
- source,
- new String[] {
- "kind", "element",
- "name", "task"
- });
- addAnnotation
- (getPublishType_ClasspathReference(),
- source,
- new String[] {
- "kind", "element",
- "name", "classpathReference"
- });
- addAnnotation
- (serverRuntimeEClass,
- source,
- new String[] {
- "name", "ServerRuntime",
- "kind", "elementOnly"
- });
- addAnnotation
- (getServerRuntime_Group(),
- source,
- new String[] {
- "kind", "group",
- "name", "group:0"
- });
- addAnnotation
- (getServerRuntime_Property(),
- source,
- new String[] {
- "kind", "element",
- "name", "property",
- "group", "#group:0"
- });
- addAnnotation
- (getServerRuntime_Group1(),
- source,
- new String[] {
- "kind", "group",
- "name", "group:2"
- });
- addAnnotation
- (getServerRuntime_Port(),
- source,
- new String[] {
- "kind", "element",
- "name", "port",
- "group", "#group:2"
- });
- addAnnotation
- (getServerRuntime_Group2(),
- source,
- new String[] {
- "kind", "group",
- "name", "group:4"
- });
- addAnnotation
- (getServerRuntime_Module(),
- source,
- new String[] {
- "kind", "element",
- "name", "module",
- "group", "#group:4"
- });
- addAnnotation
- (getServerRuntime_Project(),
- source,
- new String[] {
- "kind", "element",
- "name", "project"
- });
- addAnnotation
- (getServerRuntime_Start(),
- source,
- new String[] {
- "kind", "element",
- "name", "start"
- });
- addAnnotation
- (getServerRuntime_Stop(),
- source,
- new String[] {
- "kind", "element",
- "name", "stop"
- });
- addAnnotation
- (getServerRuntime_Group3(),
- source,
- new String[] {
- "kind", "group",
- "name", "group:9"
- });
- addAnnotation
- (getServerRuntime_Publisher(),
- source,
- new String[] {
- "kind", "element",
- "name", "publisher",
- "group", "#group:9"
- });
- addAnnotation
- (getServerRuntime_Group4(),
- source,
- new String[] {
- "kind", "group",
- "name", "group:11"
- });
- addAnnotation
- (getServerRuntime_Classpath(),
- source,
- new String[] {
- "kind", "element",
- "name", "classpath",
- "group", "#group:11"
- });
- addAnnotation
- (getServerRuntime_Name(),
- source,
- new String[] {
- "kind", "attribute",
- "name", "name"
- });
- addAnnotation
- (getServerRuntime_Version(),
- source,
- new String[] {
- "kind", "attribute",
- "name", "version"
- });
- addAnnotation
- (unpublishTypeEClass,
- source,
- new String[] {
- "name", "unpublish_._type",
- "kind", "elementOnly"
- });
- addAnnotation
- (getUnpublishType_Task(),
- source,
- new String[] {
- "kind", "element",
- "name", "task"
- });
- addAnnotation
- (getUnpublishType_ClasspathReference(),
- source,
- new String[] {
- "kind", "element",
- "name", "classpathReference"
- });
- }
-
-} //ServerTypePackageImpl
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/UnpublishTypeImpl.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/UnpublishTypeImpl.java
deleted file mode 100644
index 451a60e..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/impl/UnpublishTypeImpl.java
+++ /dev/null
@@ -1,242 +0,0 @@
-/**
- * <copyright>
- *******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************
- * </copyright>
- *
- * $Id: UnpublishTypeImpl.java,v 1.1 2004/11/20 21:18:10 ndai Exp $
- */
-package org.eclipse.jst.server.generic.servertype.definition.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.EObjectImpl;
-
-import org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage;
-import org.eclipse.jst.server.generic.servertype.definition.UnpublishType;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Unpublish Type</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.UnpublishTypeImpl#getTask <em>Task</em>}</li>
- * <li>{@link org.eclipse.jst.server.generic.servertype.definition.impl.UnpublishTypeImpl#getClasspathReference <em>Classpath Reference</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class UnpublishTypeImpl extends EObjectImpl implements UnpublishType {
- /**
- * The default value of the '{@link #getTask() <em>Task</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTask()
- * @generated
- * @ordered
- */
- protected static final String TASK_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getTask() <em>Task</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTask()
- * @generated
- * @ordered
- */
- protected String task = TASK_EDEFAULT;
-
- /**
- * The default value of the '{@link #getClasspathReference() <em>Classpath Reference</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getClasspathReference()
- * @generated
- * @ordered
- */
- protected static final String CLASSPATH_REFERENCE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getClasspathReference() <em>Classpath Reference</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getClasspathReference()
- * @generated
- * @ordered
- */
- protected String classpathReference = CLASSPATH_REFERENCE_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected UnpublishTypeImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return ServerTypePackage.eINSTANCE.getUnpublishType();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getTask() {
- return task;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setTask(String newTask) {
- String oldTask = task;
- task = newTask;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ServerTypePackage.UNPUBLISH_TYPE__TASK, oldTask, task));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getClasspathReference() {
- return classpathReference;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setClasspathReference(String newClasspathReference) {
- String oldClasspathReference = classpathReference;
- classpathReference = newClasspathReference;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ServerTypePackage.UNPUBLISH_TYPE__CLASSPATH_REFERENCE, oldClasspathReference, classpathReference));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.UNPUBLISH_TYPE__TASK:
- return getTask();
- case ServerTypePackage.UNPUBLISH_TYPE__CLASSPATH_REFERENCE:
- return getClasspathReference();
- }
- return eDynamicGet(eFeature, resolve);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.UNPUBLISH_TYPE__TASK:
- setTask((String)newValue);
- return;
- case ServerTypePackage.UNPUBLISH_TYPE__CLASSPATH_REFERENCE:
- setClasspathReference((String)newValue);
- return;
- }
- eDynamicSet(eFeature, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.UNPUBLISH_TYPE__TASK:
- setTask(TASK_EDEFAULT);
- return;
- case ServerTypePackage.UNPUBLISH_TYPE__CLASSPATH_REFERENCE:
- setClasspathReference(CLASSPATH_REFERENCE_EDEFAULT);
- return;
- }
- eDynamicUnset(eFeature);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ServerTypePackage.UNPUBLISH_TYPE__TASK:
- return TASK_EDEFAULT == null ? task != null : !TASK_EDEFAULT.equals(task);
- case ServerTypePackage.UNPUBLISH_TYPE__CLASSPATH_REFERENCE:
- return CLASSPATH_REFERENCE_EDEFAULT == null ? classpathReference != null : !CLASSPATH_REFERENCE_EDEFAULT.equals(classpathReference);
- }
- return eDynamicIsSet(eFeature);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (task: ");
- result.append(task);
- result.append(", classpathReference: ");
- result.append(classpathReference);
- result.append(')');
- return result.toString();
- }
-
-} //UnpublishTypeImpl
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/util/ServerTypeAdapterFactory.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/util/ServerTypeAdapterFactory.java
deleted file mode 100644
index 891ba08..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/util/ServerTypeAdapterFactory.java
+++ /dev/null
@@ -1,316 +0,0 @@
-/**
- * <copyright>
- *******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************
- * </copyright>
- *
- * $Id: ServerTypeAdapterFactory.java,v 1.1 2004/11/20 21:18:10 ndai Exp $
- */
-package org.eclipse.jst.server.generic.servertype.definition.util;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notifier;
-
-import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
-
-import org.eclipse.emf.ecore.EObject;
-
-import org.eclipse.jst.server.generic.servertype.definition.*;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Adapter Factory</b> for the model.
- * It provides an adapter <code>createXXX</code> method for each class of the model.
- * <!-- end-user-doc -->
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage
- * @generated
- */
-public class ServerTypeAdapterFactory extends AdapterFactoryImpl {
- /**
- * The cached model package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static ServerTypePackage modelPackage;
-
- /**
- * Creates an instance of the adapter factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ServerTypeAdapterFactory() {
- if (modelPackage == null) {
- modelPackage = ServerTypePackage.eINSTANCE;
- }
- }
-
- /**
- * Returns whether this factory is applicable for the type of the object.
- * <!-- begin-user-doc -->
- * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
- * <!-- end-user-doc -->
- * @return whether this factory is applicable for the type of the object.
- * @generated
- */
- public boolean isFactoryForType(Object object) {
- if (object == modelPackage) {
- return true;
- }
- if (object instanceof EObject) {
- return ((EObject)object).eClass().getEPackage() == modelPackage;
- }
- return false;
- }
-
- /**
- * The switch the delegates to the <code>createXXX</code> methods.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ServerTypeSwitch modelSwitch =
- new ServerTypeSwitch() {
- public Object caseArchiveType(ArchiveType object) {
- return createArchiveTypeAdapter();
- }
- public Object caseClasspath(Classpath object) {
- return createClasspathAdapter();
- }
- public Object caseLaunchConfiguration(LaunchConfiguration object) {
- return createLaunchConfigurationAdapter();
- }
- public Object caseModule(Module object) {
- return createModuleAdapter();
- }
- public Object casePort(Port object) {
- return createPortAdapter();
- }
- public Object caseProject(Project object) {
- return createProjectAdapter();
- }
- public Object caseProperty(Property object) {
- return createPropertyAdapter();
- }
- public Object casePublisher(Publisher object) {
- return createPublisherAdapter();
- }
- public Object casePublishType(PublishType object) {
- return createPublishTypeAdapter();
- }
- public Object caseServerRuntime(ServerRuntime object) {
- return createServerRuntimeAdapter();
- }
- public Object caseUnpublishType(UnpublishType object) {
- return createUnpublishTypeAdapter();
- }
- public Object defaultCase(EObject object) {
- return createEObjectAdapter();
- }
- };
-
- /**
- * Creates an adapter for the <code>target</code>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param target the object to adapt.
- * @return the adapter for the <code>target</code>.
- * @generated
- */
- public Adapter createAdapter(Notifier target) {
- return (Adapter)modelSwitch.doSwitch((EObject)target);
- }
-
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jst.server.generic.servertype.definition.ArchiveType <em>Archive Type</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jst.server.generic.servertype.definition.ArchiveType
- * @generated
- */
- public Adapter createArchiveTypeAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jst.server.generic.servertype.definition.Classpath <em>Classpath</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jst.server.generic.servertype.definition.Classpath
- * @generated
- */
- public Adapter createClasspathAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jst.server.generic.servertype.definition.LaunchConfiguration <em>Launch Configuration</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jst.server.generic.servertype.definition.LaunchConfiguration
- * @generated
- */
- public Adapter createLaunchConfigurationAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jst.server.generic.servertype.definition.Module <em>Module</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jst.server.generic.servertype.definition.Module
- * @generated
- */
- public Adapter createModuleAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jst.server.generic.servertype.definition.Port <em>Port</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jst.server.generic.servertype.definition.Port
- * @generated
- */
- public Adapter createPortAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jst.server.generic.servertype.definition.Project <em>Project</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jst.server.generic.servertype.definition.Project
- * @generated
- */
- public Adapter createProjectAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jst.server.generic.servertype.definition.Property <em>Property</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jst.server.generic.servertype.definition.Property
- * @generated
- */
- public Adapter createPropertyAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jst.server.generic.servertype.definition.Publisher <em>Publisher</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jst.server.generic.servertype.definition.Publisher
- * @generated
- */
- public Adapter createPublisherAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jst.server.generic.servertype.definition.PublishType <em>Publish Type</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jst.server.generic.servertype.definition.PublishType
- * @generated
- */
- public Adapter createPublishTypeAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jst.server.generic.servertype.definition.ServerRuntime <em>Server Runtime</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerRuntime
- * @generated
- */
- public Adapter createServerRuntimeAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jst.server.generic.servertype.definition.UnpublishType <em>Unpublish Type</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jst.server.generic.servertype.definition.UnpublishType
- * @generated
- */
- public Adapter createUnpublishTypeAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for the default case.
- * <!-- begin-user-doc -->
- * This default implementation returns null.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @generated
- */
- public Adapter createEObjectAdapter() {
- return null;
- }
-
-} //ServerTypeAdapterFactory
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/util/ServerTypeResourceFactoryImpl.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/util/ServerTypeResourceFactoryImpl.java
deleted file mode 100644
index f472d2e..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/util/ServerTypeResourceFactoryImpl.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/**
- * <copyright>
- *******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************
- * </copyright>
- *
- * $Id: ServerTypeResourceFactoryImpl.java,v 1.1 2004/11/20 21:18:10 ndai Exp $
- */
-package org.eclipse.jst.server.generic.servertype.definition.util;
-
-import org.eclipse.emf.common.util.URI;
-
-import org.eclipse.emf.ecore.resource.Resource;
-
-import org.eclipse.emf.ecore.util.ExtendedMetaData;
-
-import org.eclipse.emf.ecore.xmi.XMLResource;
-
-import org.eclipse.emf.ecore.xmi.impl.XMLResourceFactoryImpl;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Resource Factory</b> associated with the package.
- * <!-- end-user-doc -->
- * @see org.eclipse.jst.server.generic.servertype.definition.util.ServerTypeResourceImpl
- * @generated
- */
-public class ServerTypeResourceFactoryImpl extends XMLResourceFactoryImpl {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ExtendedMetaData extendedMetaData;
-
- /**
- * Creates an instance of the resource factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ServerTypeResourceFactoryImpl() {
- super();
- extendedMetaData = ExtendedMetaData.INSTANCE;
- }
-
- /**
- * Creates an instance of the resource.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Resource createResource(URI uri) {
- XMLResource result = new ServerTypeResourceImpl(uri);
- result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, extendedMetaData);
- result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, extendedMetaData);
-
- result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);
- result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
-
- result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
- return result;
- }
-
-} //ServerTypeResourceFactoryImpl
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/util/ServerTypeResourceImpl.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/util/ServerTypeResourceImpl.java
deleted file mode 100644
index d3030a2..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/util/ServerTypeResourceImpl.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * <copyright>
- *******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************
- * </copyright>
- *
- * $Id: ServerTypeResourceImpl.java,v 1.1 2004/11/20 21:18:10 ndai Exp $
- */
-package org.eclipse.jst.server.generic.servertype.definition.util;
-
-import org.eclipse.emf.common.util.URI;
-
-import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Resource </b> associated with the package.
- * <!-- end-user-doc -->
- * @see org.eclipse.jst.server.generic.servertype.definition.util.ServerTypeResourceFactoryImpl
- * @generated
- */
-public class ServerTypeResourceImpl extends XMLResourceImpl {
- /**
- * Creates an instance of the resource.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param uri the URI of the new resource.
- * @generated
- */
- public ServerTypeResourceImpl(URI uri) {
- super(uri);
- }
-
-} //ServerTypeResourceFactoryImpl
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/util/ServerTypeSwitch.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/util/ServerTypeSwitch.java
deleted file mode 100644
index b891eb7..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/servertype/definition/util/ServerTypeSwitch.java
+++ /dev/null
@@ -1,366 +0,0 @@
-/**
- * <copyright>
- *******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************
- * </copyright>
- *
- * $Id: ServerTypeSwitch.java,v 1.1 2004/11/20 21:18:10 ndai Exp $
- */
-package org.eclipse.jst.server.generic.servertype.definition.util;
-
-import java.util.List;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-
-import org.eclipse.jst.server.generic.servertype.definition.*;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Switch</b> for the model's inheritance hierarchy.
- * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
- * to invoke the <code>caseXXX</code> method for each class of the model,
- * starting with the actual class of the object
- * and proceeding up the inheritance hierarchy
- * until a non-null result is returned,
- * which is the result of the switch.
- * <!-- end-user-doc -->
- * @see org.eclipse.jst.server.generic.servertype.definition.ServerTypePackage
- * @generated
- */
-public class ServerTypeSwitch {
- /**
- * The cached model package
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static ServerTypePackage modelPackage;
-
- /**
- * Creates an instance of the switch.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ServerTypeSwitch() {
- if (modelPackage == null) {
- modelPackage = ServerTypePackage.eINSTANCE;
- }
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- public Object doSwitch(EObject theEObject) {
- return doSwitch(theEObject.eClass(), theEObject);
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- protected Object doSwitch(EClass theEClass, EObject theEObject) {
- if (theEClass.eContainer() == modelPackage) {
- return doSwitch(theEClass.getClassifierID(), theEObject);
- }
- else {
- List eSuperTypes = theEClass.getESuperTypes();
- return
- eSuperTypes.isEmpty() ?
- defaultCase(theEObject) :
- doSwitch((EClass)eSuperTypes.get(0), theEObject);
- }
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- protected Object doSwitch(int classifierID, EObject theEObject) {
- switch (classifierID) {
- case ServerTypePackage.ARCHIVE_TYPE: {
- ArchiveType archiveType = (ArchiveType)theEObject;
- Object result = caseArchiveType(archiveType);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case ServerTypePackage.CLASSPATH: {
- Classpath classpath = (Classpath)theEObject;
- Object result = caseClasspath(classpath);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case ServerTypePackage.LAUNCH_CONFIGURATION: {
- LaunchConfiguration launchConfiguration = (LaunchConfiguration)theEObject;
- Object result = caseLaunchConfiguration(launchConfiguration);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case ServerTypePackage.MODULE: {
- Module module = (Module)theEObject;
- Object result = caseModule(module);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case ServerTypePackage.PORT: {
- Port port = (Port)theEObject;
- Object result = casePort(port);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case ServerTypePackage.PROJECT: {
- Project project = (Project)theEObject;
- Object result = caseProject(project);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case ServerTypePackage.PROPERTY: {
- Property property = (Property)theEObject;
- Object result = caseProperty(property);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case ServerTypePackage.PUBLISHER: {
- Publisher publisher = (Publisher)theEObject;
- Object result = casePublisher(publisher);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case ServerTypePackage.PUBLISH_TYPE: {
- PublishType publishType = (PublishType)theEObject;
- Object result = casePublishType(publishType);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case ServerTypePackage.SERVER_RUNTIME: {
- ServerRuntime serverRuntime = (ServerRuntime)theEObject;
- Object result = caseServerRuntime(serverRuntime);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case ServerTypePackage.UNPUBLISH_TYPE: {
- UnpublishType unpublishType = (UnpublishType)theEObject;
- Object result = caseUnpublishType(unpublishType);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- default: return defaultCase(theEObject);
- }
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Archive Type</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Archive Type</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseArchiveType(ArchiveType object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Classpath</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Classpath</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseClasspath(Classpath object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Launch Configuration</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Launch Configuration</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseLaunchConfiguration(LaunchConfiguration object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Module</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Module</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseModule(Module object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Port</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Port</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object casePort(Port object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Project</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Project</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseProject(Project object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Property</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Property</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseProperty(Property object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Publisher</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Publisher</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object casePublisher(Publisher object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Publish Type</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Publish Type</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object casePublishType(PublishType object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Server Runtime</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Server Runtime</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseServerRuntime(ServerRuntime object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Unpublish Type</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Unpublish Type</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseUnpublishType(UnpublishType object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>EObject</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch, but this is the last case anyway.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>EObject</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject)
- * @generated
- */
- public Object defaultCase(EObject object) {
- return null;
- }
-
-} //ServerTypeSwitch
diff --git a/plugins/org.eclipse.jst.server.generic.core/xsd/ServerTypeDefinitionSchema.xsd b/plugins/org.eclipse.jst.server.generic.core/xsd/ServerTypeDefinitionSchema.xsd
deleted file mode 100644
index db3de5a..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/xsd/ServerTypeDefinitionSchema.xsd
+++ /dev/null
@@ -1,121 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://eclipse.org/jst/server/generic/ServerTypeDefinition"
- xmlns:jst="http://eclipse.org/jst/server/generic/ServerTypeDefinition">
-
-
-
- <complexType name="ServerRuntime">
- <annotation>
- <documentation>
- Generic Server Type Definition. It must have a list of
- properties.
- </documentation>
- </annotation>
-
- <sequence minOccurs="1" maxOccurs="1">
- <sequence minOccurs="0" maxOccurs="unbounded">
- <element name="property" type="jst:Property"></element>
- </sequence>
-
- <sequence minOccurs="0" maxOccurs="unbounded">
- <element name="port" type="jst:Port" />
- </sequence>
-
- <sequence minOccurs="1" maxOccurs="unbounded">
- <element name="module" type="jst:Module" />
- </sequence>
- <element name="project" type="jst:Project"/>
- <element name="start" type="jst:LaunchConfiguration" />
- <element name="stop" type="jst:LaunchConfiguration" />
-
- <sequence minOccurs="0" maxOccurs="unbounded">
- <element name="publisher" type="jst:Publisher" />
- </sequence>
-
- <sequence minOccurs="1" maxOccurs="unbounded">
- <element name="classpath" type="jst:Classpath" />
- </sequence>
- </sequence>
-
- <attribute name="name" type="string" use="required" />
- <attribute name="version" type="string"></attribute>
- </complexType>
-
- <complexType name="Property">
- <attribute name="id" type="string" />
- <attribute name="label" type="string" />
- <attribute name="type" type="string" />
- <attribute name="context" type="string" />
- <attribute name="default" type="string" />
- </complexType>
-
- <complexType name="Module">
- <sequence>
- <element name="type" type="string" />
- <element name="publishDir" type="string" />
- <element name="publisherReference" type="string" />
- </sequence>
- </complexType>
-
- <complexType name="LaunchConfiguration">
- <sequence>
- <element name="class" type="string" />
- <element name="workingDirectory" type="string" />
- <element name="programArguments" type="string" />
- <element name="vmParameters" type="string" />
- <element name="classpathReference" type="string" />
- </sequence>
- </complexType>
-
- <complexType name="Port">
- <sequence>
- <element name="no" type="string" />
- <element name="name" type="string" />
- <element name="protocol" type="string" />
- </sequence>
- </complexType>
-
- <complexType name="Classpath">
- <sequence minOccurs="1" maxOccurs="unbounded">
- <element name="archive">
- <complexType>
- <attribute name="path" type="string" />
- </complexType>
- </element>
- </sequence>
- <attribute name="id" type="string" />
- <attribute name="isLibrary" type="boolean" use="optional" />
- </complexType>
-
- <complexType name="Publisher">
- <sequence minOccurs="1" maxOccurs="unbounded">
- <element name="publish">
-
- <complexType>
- <sequence>
- <element name="task" type="string" />
- <element name="classpathReference"
- type="string" />
- </sequence>
- </complexType>
- </element>
- <element name="unpublish">
- <complexType>
- <sequence>
- <element name="task" type="string" />
- <element name="classpathReference" type="string" />
- </sequence>
- </complexType>
- </element>
- </sequence>
- <attribute name="id" type="string" />
- </complexType>
-
- <complexType name="Project">
- <sequence minOccurs="1" maxOccurs="1">
- <element name="classpathReference" type="string"></element>
- </sequence>
- </complexType>
-
-</schema>
diff --git a/plugins/org.eclipse.jst.server.generic.core/xsd/org.eclipse.jst.server.generic.servertype.ecore b/plugins/org.eclipse.jst.server.generic.core/xsd/org.eclipse.jst.server.generic.servertype.ecore
deleted file mode 100644
index 582ec37..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/xsd/org.eclipse.jst.server.generic.servertype.ecore
+++ /dev/null
@@ -1,400 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ecore:EPackage xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="definition"
- nsURI="http://eclipse.org/jst/server/generic/ServerTypeDefinition" nsPrefix="definition">
- <eClassifiers xsi:type="ecore:EClass" name="ArchiveType">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="name" value="archive_._type"/>
- <details key="kind" value="empty"/>
- </eAnnotations>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="path" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="path"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Classpath">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="name" value="Classpath"/>
- <details key="kind" value="elementOnly"/>
- </eAnnotations>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="group" unique="false" upperBound="-1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="group"/>
- <details key="name" value="group:0"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="archive" lowerBound="1"
- upperBound="-1" eType="#//ArchiveType" volatile="true" transient="true" derived="true"
- containment="true" resolveProxies="false">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="archive"/>
- <details key="group" value="#group:0"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="id" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="id"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="isLibrary" unique="false"
- eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Boolean"
- unsettable="true">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="isLibrary"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="LaunchConfiguration">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="name" value="LaunchConfiguration"/>
- <details key="kind" value="elementOnly"/>
- </eAnnotations>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="class" unique="false" lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="class"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="workingDirectory" unique="false"
- lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="workingDirectory"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="programArguments" unique="false"
- lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="programArguments"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="vmParameters" unique="false"
- lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="vmParameters"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="classpathReference" unique="false"
- lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="classpathReference"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Module">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="name" value="Module"/>
- <details key="kind" value="elementOnly"/>
- </eAnnotations>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" unique="false" lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="type"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="publishDir" unique="false"
- lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="publishDir"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="publisherReference" unique="false"
- lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="publisherReference"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Port">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="name" value="Port"/>
- <details key="kind" value="elementOnly"/>
- </eAnnotations>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="no" unique="false" lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="no"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" unique="false" lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="name"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="protocol" unique="false"
- lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="protocol"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Project">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="name" value="Project"/>
- <details key="kind" value="elementOnly"/>
- </eAnnotations>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="classpathReference" unique="false"
- lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="classpathReference"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Property">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="name" value="Property"/>
- <details key="kind" value="empty"/>
- </eAnnotations>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="context" unique="false"
- eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="context"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="default" unique="false"
- eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="default"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="id" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="id"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="label" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="label"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="type"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Publisher">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="name" value="Publisher"/>
- <details key="kind" value="elementOnly"/>
- </eAnnotations>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="group" unique="false" upperBound="-1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="group"/>
- <details key="name" value="group:0"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="publish" lowerBound="1"
- upperBound="-1" eType="#//PublishType" volatile="true" transient="true" derived="true"
- containment="true" resolveProxies="false">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="publish"/>
- <details key="group" value="#group:0"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="unpublish" lowerBound="1"
- upperBound="-1" eType="#//UnpublishType" volatile="true" transient="true"
- derived="true" containment="true" resolveProxies="false">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="unpublish"/>
- <details key="group" value="#group:0"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="id" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="id"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="PublishType">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="name" value="publish_._type"/>
- <details key="kind" value="elementOnly"/>
- </eAnnotations>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="task" unique="false" lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="task"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="classpathReference" unique="false"
- lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="classpathReference"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="ServerRuntime">
- <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
- <details key="documentation" value="
				Generic Server Type Definition. It must have a list of
				properties.
			"/>
- </eAnnotations>
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="name" value="ServerRuntime"/>
- <details key="kind" value="elementOnly"/>
- </eAnnotations>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="group" unique="false" upperBound="-1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="group"/>
- <details key="name" value="group:0"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="property" upperBound="-1"
- eType="#//Property" volatile="true" transient="true" derived="true" containment="true"
- resolveProxies="false">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="property"/>
- <details key="group" value="#group:0"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="group1" unique="false"
- upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="group"/>
- <details key="name" value="group:2"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="port" upperBound="-1" eType="#//Port"
- volatile="true" transient="true" derived="true" containment="true" resolveProxies="false">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="port"/>
- <details key="group" value="#group:2"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="group2" unique="false"
- upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="group"/>
- <details key="name" value="group:4"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="module" lowerBound="1"
- upperBound="-1" eType="#//Module" volatile="true" transient="true" derived="true"
- containment="true" resolveProxies="false">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="module"/>
- <details key="group" value="#group:4"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="project" lowerBound="1"
- eType="#//Project" containment="true" resolveProxies="false">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="project"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="start" lowerBound="1" eType="#//LaunchConfiguration"
- containment="true" resolveProxies="false">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="start"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="stop" lowerBound="1" eType="#//LaunchConfiguration"
- containment="true" resolveProxies="false">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="stop"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="group3" unique="false"
- upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="group"/>
- <details key="name" value="group:9"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="publisher" upperBound="-1"
- eType="#//Publisher" volatile="true" transient="true" derived="true" containment="true"
- resolveProxies="false">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="publisher"/>
- <details key="group" value="#group:9"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="group4" unique="false"
- upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="group"/>
- <details key="name" value="group:11"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="classpath" lowerBound="1"
- upperBound="-1" eType="#//Classpath" volatile="true" transient="true" derived="true"
- containment="true" resolveProxies="false">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="classpath"/>
- <details key="group" value="#group:11"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" unique="false" lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="name"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="version" unique="false"
- eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="version"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="UnpublishType">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="name" value="unpublish_._type"/>
- <details key="kind" value="elementOnly"/>
- </eAnnotations>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="task" unique="false" lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="task"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="classpathReference" unique="false"
- lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="classpathReference"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
-</ecore:EPackage>
diff --git a/plugins/org.eclipse.jst.server.generic.core/xsd/servertype.genmodel b/plugins/org.eclipse.jst.server.generic.core/xsd/servertype.genmodel
deleted file mode 100644
index c042602..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/xsd/servertype.genmodel
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<genmodel:GenModel xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
- xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.jst.server.generic.model/src"
- editDirectory="/org.eclipse.jst.server.generic.model.edit/src" editorDirectory="/org.eclipse.jst.server.generic.model.editor/src"
- modelPluginID="org.eclipse.jst.server.generic.model" runtimeJar="true" modelName="Servertype"
- editPluginClass="org.eclipse.jst.server.generic.server.type.definition.provider.ServertypeEditPlugin"
- editorPluginClass="org.eclipse.jst.server.generic.server.type.definition.presentation.ServertypeEditorPlugin"
- runtimeCompatibility="false">
- <foreignModel>ServerTypeDefinitionSchema.xsd</foreignModel>
- <genPackages prefix="ServerType" basePackage="org.eclipse.jst.server.generic.servertype"
- resource="XML" ecorePackage="org.eclipse.jst.server.generic.servertype.ecore#/">
- <genClasses ecoreClass="org.eclipse.jst.server.generic.servertype.ecore#//ArchiveType">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute org.eclipse.jst.server.generic.servertype.ecore#//ArchiveType/path"/>
- </genClasses>
- <genClasses ecoreClass="org.eclipse.jst.server.generic.servertype.ecore#//Classpath">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EAttribute org.eclipse.jst.server.generic.servertype.ecore#//Classpath/group"/>
- <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference org.eclipse.jst.server.generic.servertype.ecore#//Classpath/archive"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute org.eclipse.jst.server.generic.servertype.ecore#//Classpath/id"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute org.eclipse.jst.server.generic.servertype.ecore#//Classpath/isLibrary"/>
- </genClasses>
- <genClasses ecoreClass="org.eclipse.jst.server.generic.servertype.ecore#//LaunchConfiguration">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute org.eclipse.jst.server.generic.servertype.ecore#//LaunchConfiguration/class"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute org.eclipse.jst.server.generic.servertype.ecore#//LaunchConfiguration/workingDirectory"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute org.eclipse.jst.server.generic.servertype.ecore#//LaunchConfiguration/programArguments"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute org.eclipse.jst.server.generic.servertype.ecore#//LaunchConfiguration/vmParameters"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute org.eclipse.jst.server.generic.servertype.ecore#//LaunchConfiguration/classpathReference"/>
- </genClasses>
- <genClasses ecoreClass="org.eclipse.jst.server.generic.servertype.ecore#//Module">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute org.eclipse.jst.server.generic.servertype.ecore#//Module/type"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute org.eclipse.jst.server.generic.servertype.ecore#//Module/publishDir"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute org.eclipse.jst.server.generic.servertype.ecore#//Module/publisherReference"/>
- </genClasses>
- <genClasses ecoreClass="org.eclipse.jst.server.generic.servertype.ecore#//Port">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute org.eclipse.jst.server.generic.servertype.ecore#//Port/no"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute org.eclipse.jst.server.generic.servertype.ecore#//Port/name"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute org.eclipse.jst.server.generic.servertype.ecore#//Port/protocol"/>
- </genClasses>
- <genClasses ecoreClass="org.eclipse.jst.server.generic.servertype.ecore#//Project">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute org.eclipse.jst.server.generic.servertype.ecore#//Project/classpathReference"/>
- </genClasses>
- <genClasses ecoreClass="org.eclipse.jst.server.generic.servertype.ecore#//Property">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute org.eclipse.jst.server.generic.servertype.ecore#//Property/context"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute org.eclipse.jst.server.generic.servertype.ecore#//Property/default"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute org.eclipse.jst.server.generic.servertype.ecore#//Property/id"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute org.eclipse.jst.server.generic.servertype.ecore#//Property/label"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute org.eclipse.jst.server.generic.servertype.ecore#//Property/type"/>
- </genClasses>
- <genClasses ecoreClass="org.eclipse.jst.server.generic.servertype.ecore#//Publisher">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EAttribute org.eclipse.jst.server.generic.servertype.ecore#//Publisher/group"/>
- <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference org.eclipse.jst.server.generic.servertype.ecore#//Publisher/publish"/>
- <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference org.eclipse.jst.server.generic.servertype.ecore#//Publisher/unpublish"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute org.eclipse.jst.server.generic.servertype.ecore#//Publisher/id"/>
- </genClasses>
- <genClasses ecoreClass="org.eclipse.jst.server.generic.servertype.ecore#//PublishType">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute org.eclipse.jst.server.generic.servertype.ecore#//PublishType/task"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute org.eclipse.jst.server.generic.servertype.ecore#//PublishType/classpathReference"/>
- </genClasses>
- <genClasses ecoreClass="org.eclipse.jst.server.generic.servertype.ecore#//ServerRuntime">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EAttribute org.eclipse.jst.server.generic.servertype.ecore#//ServerRuntime/group"/>
- <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference org.eclipse.jst.server.generic.servertype.ecore#//ServerRuntime/property"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EAttribute org.eclipse.jst.server.generic.servertype.ecore#//ServerRuntime/group1"/>
- <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference org.eclipse.jst.server.generic.servertype.ecore#//ServerRuntime/port"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EAttribute org.eclipse.jst.server.generic.servertype.ecore#//ServerRuntime/group2"/>
- <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference org.eclipse.jst.server.generic.servertype.ecore#//ServerRuntime/module"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference org.eclipse.jst.server.generic.servertype.ecore#//ServerRuntime/project"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference org.eclipse.jst.server.generic.servertype.ecore#//ServerRuntime/start"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference org.eclipse.jst.server.generic.servertype.ecore#//ServerRuntime/stop"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EAttribute org.eclipse.jst.server.generic.servertype.ecore#//ServerRuntime/group3"/>
- <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference org.eclipse.jst.server.generic.servertype.ecore#//ServerRuntime/publisher"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EAttribute org.eclipse.jst.server.generic.servertype.ecore#//ServerRuntime/group4"/>
- <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference org.eclipse.jst.server.generic.servertype.ecore#//ServerRuntime/classpath"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute org.eclipse.jst.server.generic.servertype.ecore#//ServerRuntime/name"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute org.eclipse.jst.server.generic.servertype.ecore#//ServerRuntime/version"/>
- </genClasses>
- <genClasses ecoreClass="org.eclipse.jst.server.generic.servertype.ecore#//UnpublishType">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute org.eclipse.jst.server.generic.servertype.ecore#//UnpublishType/task"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute org.eclipse.jst.server.generic.servertype.ecore#//UnpublishType/classpathReference"/>
- </genClasses>
- </genPackages>
-</genmodel:GenModel>
diff --git a/plugins/org.eclipse.jst.server.generic.core/xsd/servertype.xsd2ecore b/plugins/org.eclipse.jst.server.generic.core/xsd/servertype.xsd2ecore
deleted file mode 100644
index 999e4e4..0000000
--- a/plugins/org.eclipse.jst.server.generic.core/xsd/servertype.xsd2ecore
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<xsd2ecore:XSD2EcoreMappingRoot xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI" xmlns:xsd2ecore="http://www.eclipse.org/emf/2002/XSD2Ecore" inputs="ServerTypeDefinitionSchema.xsd#/"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#/" topToBottom="true">
- <nested inputs="bundleentry://175/cache/www.w3.org/2001/XMLSchema.xsd#//string;XSDSimpleTypeDefinition=7"
- outputs="http://www.eclipse.org/emf/2003/XMLType#//String"/>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//Classpath;XSDComplexTypeDefinition=5/XSDParticle/XSDModelGroup/XSDParticle/archive;XSDElementDeclaration/XSDComplexTypeDefinition"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//ArchiveType">
- <nested inputs="ServerTypeDefinitionSchema.xsd#//Classpath;XSDComplexTypeDefinition=5/XSDParticle/XSDModelGroup/XSDParticle/archive;XSDElementDeclaration/XSDComplexTypeDefinition/XSDAttributeUse"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//ArchiveType/path"/>
- </nested>
- <nested inputs="bundleentry://175/cache/www.w3.org/2001/XMLSchema.xsd#//boolean;XSDSimpleTypeDefinition=8"
- outputs="http://www.eclipse.org/emf/2003/XMLType#//Boolean"/>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//Classpath;XSDComplexTypeDefinition=5"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//Classpath">
- <nested inputs="ServerTypeDefinitionSchema.xsd#//Classpath;XSDComplexTypeDefinition=5/XSDParticle"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//Classpath/group"/>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//Classpath;XSDComplexTypeDefinition=5/XSDParticle/XSDModelGroup/XSDParticle"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//Classpath/archive"/>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//Classpath;XSDComplexTypeDefinition=5/XSDAttributeUse"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//Classpath/id"/>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//Classpath;XSDComplexTypeDefinition=5/XSDAttributeUse=1"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//Classpath/isLibrary"/>
- </nested>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//LaunchConfiguration;XSDComplexTypeDefinition=3"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//LaunchConfiguration">
- <nested inputs="ServerTypeDefinitionSchema.xsd#//LaunchConfiguration;XSDComplexTypeDefinition=3/XSDParticle/XSDModelGroup/XSDParticle"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//LaunchConfiguration/class"/>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//LaunchConfiguration;XSDComplexTypeDefinition=3/XSDParticle/XSDModelGroup/XSDParticle=1"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//LaunchConfiguration/workingDirectory"/>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//LaunchConfiguration;XSDComplexTypeDefinition=3/XSDParticle/XSDModelGroup/XSDParticle=2"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//LaunchConfiguration/programArguments"/>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//LaunchConfiguration;XSDComplexTypeDefinition=3/XSDParticle/XSDModelGroup/XSDParticle=3"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//LaunchConfiguration/vmParameters"/>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//LaunchConfiguration;XSDComplexTypeDefinition=3/XSDParticle/XSDModelGroup/XSDParticle=4"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//LaunchConfiguration/classpathReference"/>
- </nested>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//Module;XSDComplexTypeDefinition=2"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//Module">
- <nested inputs="ServerTypeDefinitionSchema.xsd#//Module;XSDComplexTypeDefinition=2/XSDParticle/XSDModelGroup/XSDParticle"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//Module/type"/>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//Module;XSDComplexTypeDefinition=2/XSDParticle/XSDModelGroup/XSDParticle=1"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//Module/publishDir"/>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//Module;XSDComplexTypeDefinition=2/XSDParticle/XSDModelGroup/XSDParticle=2"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//Module/publisherReference"/>
- </nested>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//Port;XSDComplexTypeDefinition=4"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//Port">
- <nested inputs="ServerTypeDefinitionSchema.xsd#//Port;XSDComplexTypeDefinition=4/XSDParticle/XSDModelGroup/XSDParticle"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//Port/no"/>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//Port;XSDComplexTypeDefinition=4/XSDParticle/XSDModelGroup/XSDParticle=1"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//Port/name"/>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//Port;XSDComplexTypeDefinition=4/XSDParticle/XSDModelGroup/XSDParticle=2"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//Port/protocol"/>
- </nested>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//Project;XSDComplexTypeDefinition=7"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//Project">
- <nested inputs="ServerTypeDefinitionSchema.xsd#//Project;XSDComplexTypeDefinition=7/XSDParticle/XSDModelGroup/XSDParticle"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//Project/classpathReference"/>
- </nested>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//Property;XSDComplexTypeDefinition=1"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//Property">
- <nested inputs="ServerTypeDefinitionSchema.xsd#//Property;XSDComplexTypeDefinition=1/XSDAttributeUse=3"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//Property/context"/>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//Property;XSDComplexTypeDefinition=1/XSDAttributeUse=4"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//Property/default"/>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//Property;XSDComplexTypeDefinition=1/XSDAttributeUse"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//Property/id"/>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//Property;XSDComplexTypeDefinition=1/XSDAttributeUse=1"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//Property/label"/>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//Property;XSDComplexTypeDefinition=1/XSDAttributeUse=2"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//Property/type"/>
- </nested>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//Publisher;XSDComplexTypeDefinition=6/XSDParticle/XSDModelGroup/XSDParticle/publish;XSDElementDeclaration/XSDComplexTypeDefinition"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//PublishType">
- <nested inputs="ServerTypeDefinitionSchema.xsd#//Publisher;XSDComplexTypeDefinition=6/XSDParticle/XSDModelGroup/XSDParticle/publish;XSDElementDeclaration/XSDComplexTypeDefinition/XSDParticle/XSDModelGroup/XSDParticle"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//PublishType/task"/>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//Publisher;XSDComplexTypeDefinition=6/XSDParticle/XSDModelGroup/XSDParticle/publish;XSDElementDeclaration/XSDComplexTypeDefinition/XSDParticle/XSDModelGroup/XSDParticle=1"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//PublishType/classpathReference"/>
- </nested>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//Publisher;XSDComplexTypeDefinition=6/XSDParticle/XSDModelGroup/XSDParticle=1/unpublish;XSDElementDeclaration/XSDComplexTypeDefinition"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//UnpublishType">
- <nested inputs="ServerTypeDefinitionSchema.xsd#//Publisher;XSDComplexTypeDefinition=6/XSDParticle/XSDModelGroup/XSDParticle=1/unpublish;XSDElementDeclaration/XSDComplexTypeDefinition/XSDParticle/XSDModelGroup/XSDParticle"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//UnpublishType/task"/>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//Publisher;XSDComplexTypeDefinition=6/XSDParticle/XSDModelGroup/XSDParticle=1/unpublish;XSDElementDeclaration/XSDComplexTypeDefinition/XSDParticle/XSDModelGroup/XSDParticle=1"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//UnpublishType/classpathReference"/>
- </nested>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//Publisher;XSDComplexTypeDefinition=6"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//Publisher">
- <nested inputs="ServerTypeDefinitionSchema.xsd#//Publisher;XSDComplexTypeDefinition=6/XSDParticle"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//Publisher/group"/>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//Publisher;XSDComplexTypeDefinition=6/XSDParticle/XSDModelGroup/XSDParticle"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//Publisher/publish"/>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//Publisher;XSDComplexTypeDefinition=6/XSDParticle/XSDModelGroup/XSDParticle=1"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//Publisher/unpublish"/>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//Publisher;XSDComplexTypeDefinition=6/XSDAttributeUse"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//Publisher/id"/>
- </nested>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//ServerRuntime;XSDComplexTypeDefinition"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//ServerRuntime">
- <nested inputs="ServerTypeDefinitionSchema.xsd#//ServerRuntime;XSDComplexTypeDefinition/XSDParticle/XSDModelGroup/XSDParticle"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//ServerRuntime/group"/>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//ServerRuntime;XSDComplexTypeDefinition/XSDParticle/XSDModelGroup/XSDParticle/XSDModelGroup/XSDParticle"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//ServerRuntime/property"/>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//ServerRuntime;XSDComplexTypeDefinition/XSDParticle/XSDModelGroup/XSDParticle=1"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//ServerRuntime/group1"/>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//ServerRuntime;XSDComplexTypeDefinition/XSDParticle/XSDModelGroup/XSDParticle=1/XSDModelGroup/XSDParticle"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//ServerRuntime/port"/>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//ServerRuntime;XSDComplexTypeDefinition/XSDParticle/XSDModelGroup/XSDParticle=2"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//ServerRuntime/group2"/>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//ServerRuntime;XSDComplexTypeDefinition/XSDParticle/XSDModelGroup/XSDParticle=2/XSDModelGroup/XSDParticle"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//ServerRuntime/module"/>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//ServerRuntime;XSDComplexTypeDefinition/XSDParticle/XSDModelGroup/XSDParticle=3"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//ServerRuntime/project"/>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//ServerRuntime;XSDComplexTypeDefinition/XSDParticle/XSDModelGroup/XSDParticle=4"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//ServerRuntime/start"/>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//ServerRuntime;XSDComplexTypeDefinition/XSDParticle/XSDModelGroup/XSDParticle=5"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//ServerRuntime/stop"/>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//ServerRuntime;XSDComplexTypeDefinition/XSDParticle/XSDModelGroup/XSDParticle=6"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//ServerRuntime/group3"/>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//ServerRuntime;XSDComplexTypeDefinition/XSDParticle/XSDModelGroup/XSDParticle=6/XSDModelGroup/XSDParticle"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//ServerRuntime/publisher"/>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//ServerRuntime;XSDComplexTypeDefinition/XSDParticle/XSDModelGroup/XSDParticle=7"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//ServerRuntime/group4"/>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//ServerRuntime;XSDComplexTypeDefinition/XSDParticle/XSDModelGroup/XSDParticle=7/XSDModelGroup/XSDParticle"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//ServerRuntime/classpath"/>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//ServerRuntime;XSDComplexTypeDefinition/XSDAttributeUse"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//ServerRuntime/name"/>
- <nested inputs="ServerTypeDefinitionSchema.xsd#//ServerRuntime;XSDComplexTypeDefinition/XSDAttributeUse=1"
- outputs="org.eclipse.jst.server.generic.servertype.ecore#//ServerRuntime/version"/>
- </nested>
-</xsd2ecore:XSD2EcoreMappingRoot>
diff --git a/plugins/org.eclipse.jst.server.generic.modules/.classpath b/plugins/org.eclipse.jst.server.generic.modules/.classpath
deleted file mode 100644
index 065ac06..0000000
--- a/plugins/org.eclipse.jst.server.generic.modules/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/plugins/org.eclipse.jst.server.generic.modules/.cvsignore b/plugins/org.eclipse.jst.server.generic.modules/.cvsignore
deleted file mode 100644
index 42654c1..0000000
--- a/plugins/org.eclipse.jst.server.generic.modules/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
-bin
-build.xml
-commonmodules.jar
-org.eclipse.jst.server.generic.modules_1.0.0.jar
-temp.folder
diff --git a/plugins/org.eclipse.jst.server.generic.modules/.project b/plugins/org.eclipse.jst.server.generic.modules/.project
deleted file mode 100644
index af14ba8..0000000
--- a/plugins/org.eclipse.jst.server.generic.modules/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jst.server.generic.ui</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/plugins/org.eclipse.jst.server.generic.modules/build.properties b/plugins/org.eclipse.jst.server.generic.modules/build.properties
deleted file mode 100644
index 9815251..0000000
--- a/plugins/org.eclipse.jst.server.generic.modules/build.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-source.commonmodules.jar = src/
-output.commonmodules.jar = bin/
-bin.includes = plugin.xml,\
- commonmodules.jar
-src.includes = plugin.xml,\
- src/
diff --git a/plugins/org.eclipse.jst.server.generic.modules/plugin.xml b/plugins/org.eclipse.jst.server.generic.modules/plugin.xml
deleted file mode 100644
index 6401d80..0000000
--- a/plugins/org.eclipse.jst.server.generic.modules/plugin.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.jst.server.generic.modules"
- name="J2EE Common Modules Plug-in"
- version="1.0.0"
- provider-name="Eteration.com"
- class="org.eclipse.jst.server.generic.modules.ModulesPlugin">
-
- <runtime>
- <library name="commonmodules.jar">
- <export name="*"/>
- </library>
- </runtime>
-
- <requires>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.wst.server.core"/>
- <import plugin="org.eclipse.jst.server.core"/>
- </requires>
-
- <!-- <extension point="org.eclipse.wst.server.core.moduleFactories">
- <moduleFactory
- projects="true"
- class="org.eclipse.jst.server.generic.modules.J2eeSpecModuleFactoryDelegate"
- id="org.eclipse.jst.server.generic.modules.j2eeSpecModules">
- <moduleType
- types="j2ee.web,j2ee.ejb,j2ee.ear"
- versions="1.2,1.3,1.4">
- </moduleType>
- </moduleFactory>
- </extension>
-
- <extension point="org.eclipse.wst.server.core.moduleArtifactAdapters">
- <moduleArtifactAdapter
- id="org.eclipse.jst.server.generic.modules.j2eeSpecModuleObjectAdapter"
- class="org.eclipse.jst.server.generic.modules.J2EESpecModuleObjectAdapter"
- objectClass="org.eclipse.core.resources.IResource"/>
- </extension>-->
-</plugin>
diff --git a/plugins/org.eclipse.jst.server.generic.modules/src/org/eclipse/jst/server/generic/modules/EjbModule.java b/plugins/org.eclipse.jst.server.generic.modules/src/org/eclipse/jst/server/generic/modules/EjbModule.java
deleted file mode 100644
index 9b2fb0a..0000000
--- a/plugins/org.eclipse.jst.server.generic.modules/src/org/eclipse/jst/server/generic/modules/EjbModule.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Naci M. Dai - initial API and implementation
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-
-package org.eclipse.jst.server.generic.modules;
-
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jst.server.j2ee.IEJBModule;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IModuleArtifact;
-import org.eclipse.wst.server.core.IModuleType;
-import org.eclipse.wst.server.core.model.IModuleListener;
-
-
-public class EjbModule extends J2EEModule implements IEJBModule {
-
-
- public EjbModule(IFolder moduleFolder) {
- super(moduleFolder);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jst.server.j2ee.IEJBModule#getEJBSpecificationVersion()
- */
- public String getEJBSpecificationVersion() {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jst.server.j2ee.IJ2EEModule#isBinary()
- */
- public boolean isBinary() {
- // TODO Auto-generated method stub
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.IModule#members()
- */
- public IModuleArtifact[] members() throws CoreException {
- // TODO Auto-generated method stub
- return null;
- }
-
-
-
-
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.IModule#addModuleListener(org.eclipse.wst.server.core.model.IModuleListener)
- */
- public void addModuleListener(IModuleListener listener) {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.IModule#removeModuleListener(org.eclipse.wst.server.core.model.IModuleListener)
- */
- public void removeModuleListener(IModuleListener listener) {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.IModuleType#getType()
- */
- public String getType() {
- return "j2ee.ejb";
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.IModule#validate(org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus validate(IProgressMonitor monitor) {
- try {
- if(Utils.isValidEjbModule(this.getFolder()))
- return new Status(IStatus.OK,ModulesPlugin.ID, 0,"",null);
- } catch (Exception e) {
- Trace.trace("Unale to validate EJB Module", e);
- }
- return new Status(IStatus.ERROR,ModulesPlugin.ID, 0,"",null);
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.IModule#getModuleType()
- */
- public IModuleType getModuleType() {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.IModule#getChildModules(org.eclipse.core.runtime.IProgressMonitor)
- */
- public IModule[] getChildModules(IProgressMonitor monitor) {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- // TODO Auto-generated method stub
- return null;
- }
-}
diff --git a/plugins/org.eclipse.jst.server.generic.modules/src/org/eclipse/jst/server/generic/modules/EnterpriseApplication.java b/plugins/org.eclipse.jst.server.generic.modules/src/org/eclipse/jst/server/generic/modules/EnterpriseApplication.java
deleted file mode 100644
index db314cd..0000000
--- a/plugins/org.eclipse.jst.server.generic.modules/src/org/eclipse/jst/server/generic/modules/EnterpriseApplication.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Naci M. Dai - initial API and implementation
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-
-package org.eclipse.jst.server.generic.modules;
-
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jst.server.j2ee.IEnterpriseApplication;
-import org.eclipse.jst.server.j2ee.IJ2EEModule;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IModuleArtifact;
-import org.eclipse.wst.server.core.IModuleType;
-import org.eclipse.wst.server.core.model.IModuleListener;
-
-
-public class EnterpriseApplication extends J2EEModule implements IEnterpriseApplication{
-
-
- public EnterpriseApplication(IFolder moduleFolder) {
- super(moduleFolder);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jst.server.j2ee.IEnterpriseApplication#getModules()
- */
- public IJ2EEModule[] getModules() {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jst.server.j2ee.IEnterpriseApplication#getURI(org.eclipse.jst.server.j2ee.IJ2EEModule)
- */
- public String getURI(IJ2EEModule module) {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jst.server.j2ee.IEnterpriseApplication#containsLooseModules()
- */
- public boolean containsLooseModules() {
- // TODO Auto-generated method stub
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.IModule#members()
- */
- public IModuleArtifact[] members() throws CoreException {
- // TODO Auto-generated method stub
- return null;
- }
-
-
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.IModule#addModuleListener(org.eclipse.wst.server.core.model.IModuleListener)
- */
- public void addModuleListener(IModuleListener listener) {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.IModule#removeModuleListener(org.eclipse.wst.server.core.model.IModuleListener)
- */
- public void removeModuleListener(IModuleListener listener) {
- // TODO Auto-generated method stub
-
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.IModuleType#getType()
- */
- public String getType() {
- return "j2ee.ear";
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.IModule#validate(org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus validate(IProgressMonitor monitor) {
- try {
- if(Utils.isValidEarModule(this.getFolder()))
- return new Status(IStatus.OK,ModulesPlugin.ID, 0,"",null);
- } catch (Exception e) {
- Trace.trace("Unale to validate EAR Module", e);
- }
- return new Status(IStatus.ERROR,ModulesPlugin.ID, 0,"",null);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.IModule#getModuleType()
- */
- public IModuleType getModuleType() {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.IModule#getChildModules(org.eclipse.core.runtime.IProgressMonitor)
- */
- public IModule[] getChildModules(IProgressMonitor monitor) {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- // TODO Auto-generated method stub
- return null;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.server.generic.modules/src/org/eclipse/jst/server/generic/modules/J2EEModule.java b/plugins/org.eclipse.jst.server.generic.modules/src/org/eclipse/jst/server/generic/modules/J2EEModule.java
deleted file mode 100644
index e6710fd..0000000
--- a/plugins/org.eclipse.jst.server.generic.modules/src/org/eclipse/jst/server/generic/modules/J2EEModule.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Naci M. Dai - initial API and implementation
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-
-package org.eclipse.jst.server.generic.modules;
-
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IModuleArtifact;
-
-
-public abstract class J2EEModule implements IModule {
-
- private IFolder folder;
-
- public J2EEModule(IFolder moduleFolder) {
-
- this.folder = moduleFolder;
- }
-
- public String getJ2EESpecificationVersion() {
- return "1.2";
- }
-
- public IPath getLocation() {
- return this.folder.getLocation();
- }
-
- public IProject getProject() {
- return this.getFolder().getProject();
- }
-
-
- public IFolder getFolder() {
- return folder;
- }
-
- public String getFactoryId() {
- return "org.eclipse.jst.server.generic.modules.j2eeSpecModules";
- }
-
- public String getId() {
- return getName();
- }
-
- public IStatus canPublish() {
- return validate(new NullProgressMonitor());
- }
-
- public String getName() {
- return getFolder().getName();
- }
-
- public boolean exists() {
- return getFolder().exists();
- }
- public String getVersion() {
- return getJ2EESpecificationVersion();
- }
-
- /**
- * @param resource
- * @return
- */
- public IModuleArtifact getModuleObject(IResource resource) {
- return null;
- }
-
-
-
-
-}
diff --git a/plugins/org.eclipse.jst.server.generic.modules/src/org/eclipse/jst/server/generic/modules/J2EESpecModuleObjectAdapter.java b/plugins/org.eclipse.jst.server.generic.modules/src/org/eclipse/jst/server/generic/modules/J2EESpecModuleObjectAdapter.java
deleted file mode 100644
index 817ea91..0000000
--- a/plugins/org.eclipse.jst.server.generic.modules/src/org/eclipse/jst/server/generic/modules/J2EESpecModuleObjectAdapter.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Naci M. Dai - initial API and implementation
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-
-package org.eclipse.jst.server.generic.modules;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.wst.server.core.IModuleArtifact;
-import org.eclipse.wst.server.core.model.ModuleArtifactAdapterDelegate;
-
-public class J2EESpecModuleObjectAdapter extends ModuleArtifactAdapterDelegate{
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.ModuleObjectAdapterDelegate#getModuleObject(java.lang.Object)
- */
- public IModuleArtifact getModuleObject(Object obj) {
-
- if (!(obj instanceof IResource))
- return null;
- IResource resource = (IResource) obj;
- J2EEModule module = null;
- module = (J2EEModule)J2eeSpecModuleFactoryDelegate.getInstance().getModule(resource);
- if (module == null)
- return null;
-
- return module.getModuleObject(resource);
-
- }
-
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.generic.modules/src/org/eclipse/jst/server/generic/modules/J2eeSpecModuleFactoryDelegate.java b/plugins/org.eclipse.jst.server.generic.modules/src/org/eclipse/jst/server/generic/modules/J2eeSpecModuleFactoryDelegate.java
deleted file mode 100644
index 2169761..0000000
--- a/plugins/org.eclipse.jst.server.generic.modules/src/org/eclipse/jst/server/generic/modules/J2eeSpecModuleFactoryDelegate.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Naci M. Dai - initial API and implementation
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-
-package org.eclipse.jst.server.generic.modules;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceVisitor;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.model.IModuleFactoryListener;
-import org.eclipse.wst.server.core.model.ModuleDelegate;
-import org.eclipse.wst.server.core.model.ModuleFactoryDelegate;
-
-
-public class J2eeSpecModuleFactoryDelegate extends ModuleFactoryDelegate {
- protected static final IModule[] NO_MODULES = new IModule[0];
-
- protected static J2eeSpecModuleFactoryDelegate instance;
- protected IWorkspaceRoot root;
-
- public J2eeSpecModuleFactoryDelegate() {
- root = ResourcesPlugin.getWorkspace().getRoot();
- instance = this;
- }
-
- public static J2eeSpecModuleFactoryDelegate getInstance() {
- if (instance == null)
- new J2eeSpecModuleFactoryDelegate();
- return instance;
- }
-
- public IModule getModule(String memento) {
- if (memento == null)
- return null;
- try {
- IPath modulePath = new Path(memento);
- if(!modulePath.isAbsolute())
- return null;
- return getModule(root.getContainerForLocation(modulePath));
- } catch (Exception e) {
- Trace.trace("Could not create module: " + e.getMessage());
- }
- return null;
- }
-
-
- private IModule getModule(IContainer containerForLocation) {
- IModule module=null;
- if (Utils.isValidModule((IFolder)containerForLocation)) {
- try {
- module = createModule((IFolder)containerForLocation);
- } catch (Exception e) {
- Trace.trace("Unable to get module for container,",e);
- }
- }
- return module;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.IModuleFactoryDelegate#getModules()
- */
- public IModule[] getModules() {
- IProject[] projects = root.getProjects();
- if (projects == null)
- return NO_MODULES;
- List list = new ArrayList();
- int size = projects.length;
- for (int i = 0; i < size; i++) {
- this.initModules(projects[i],list);
- }
- return (IModule[])list.toArray(new IModule[list.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.IModuleFactoryDelegate#addModuleFactoryListener(org.eclipse.wst.server.core.model.IModuleFactoryListener)
- */
- public void addModuleFactoryListener(IModuleFactoryListener listener) {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.IModuleFactoryDelegate#removeModuleFactoryListener(org.eclipse.wst.server.core.model.IModuleFactoryListener)
- */
- public void removeModuleFactoryListener(IModuleFactoryListener listener) {
- // TODO Auto-generated method stub
-
- }
-
- private void initModules(IProject project, List list) {
- try {
- IResource[] res = project.members();
- initModulesIn(res,list);
- } catch (Exception e) {
- Trace.trace(e.getMessage(), e);
- }
- }
- private void initModulesIn(IResource[] res, List list) throws Exception {
- for (int j = 0; j < res.length; j++) {
- if (res[j].getType() != IResource.FOLDER)
- continue;
- IFolder moduleFolder = (IFolder) res[j];
- initModulesIn(moduleFolder,list);
- }
- }
- private void initModulesIn(IFolder moduleFolder, final List list) throws Exception {
- if (Utils.isValidModule(moduleFolder)) {
- IModule module = createModule(moduleFolder);
- if(module != null)
- list.add(module);
- }
-
- moduleFolder.accept(new IResourceVisitor() {
- public boolean visit(IResource resource) throws CoreException {
- if (resource.getType() != IResource.FOLDER)
- return false;
- IResource res[] = ((IFolder )resource).members();
-
- for (int j = 0; j < res.length; j++) {
- if (res[j].getType() != IResource.FOLDER)
- continue;
- IFolder moduleFolder = (IFolder) res[j];
- try {
- initModulesIn(moduleFolder,list);
- } catch (Exception e) {
- Trace.trace("Could not determine modules in folder", e);
- }
- }
-
- return true;
- }
- });
-
- }
- private IModule createModule(IFolder moduleFolder) throws Exception {
-
- IModule module = null;
- if (Utils.isValidWebModule(moduleFolder)) {
- module = new WebModule(moduleFolder);
- } else if (Utils.isValidEjbModule(moduleFolder)) {
- module = new EjbModule(moduleFolder);
- } else if (Utils.isValidEarModule(moduleFolder)) {
- module = new EnterpriseApplication(moduleFolder);
- }
- return module;
- }
-
- /**
- * @param resource
- * @return
- */
- public IModule getModule(IResource resource) {
-
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.ModuleFactoryDelegate#getModuleDelegate(org.eclipse.wst.server.core.IModule)
- */
- public ModuleDelegate getModuleDelegate(IModule module) {
- // TODO Auto-generated method stub
- return null;
- }
-
-
-
-
-}
diff --git a/plugins/org.eclipse.jst.server.generic.modules/src/org/eclipse/jst/server/generic/modules/ModulesPlugin.java b/plugins/org.eclipse.jst.server.generic.modules/src/org/eclipse/jst/server/generic/modules/ModulesPlugin.java
deleted file mode 100644
index 00e074a..0000000
--- a/plugins/org.eclipse.jst.server.generic.modules/src/org/eclipse/jst/server/generic/modules/ModulesPlugin.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Naci M. Dai - initial API and implementation
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-package org.eclipse.jst.server.generic.modules;
-
-import org.eclipse.ui.plugin.*;
-import org.osgi.framework.BundleContext;
-import java.util.*;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class ModulesPlugin extends AbstractUIPlugin {
- //The shared instance.
- private static ModulesPlugin plugin;
- //Resource bundle.
- private ResourceBundle resourceBundle;
-
- public final static String ID = "org.eclipse.jst.server.generic.modules";
-
- /**
- * The constructor.
- */
- public ModulesPlugin() {
- super();
- plugin = this;
- try {
- resourceBundle = ResourceBundle.getBundle("org.eclipse.jst.server.generic.modules.ModulesPluginResources");
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- }
-
- /**
- * Returns the shared instance.
- */
- public static ModulesPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns the string from the plugin's resource bundle,
- * or 'key' if not found.
- */
- public static String getResourceString(String key) {
- ResourceBundle bundle = ModulesPlugin.getDefault().getResourceBundle();
- try {
- return (bundle != null) ? bundle.getString(key) : key;
- } catch (MissingResourceException e) {
- return key;
- }
- }
-
- /**
- * Returns the plugin's resource bundle,
- */
- public ResourceBundle getResourceBundle() {
- return resourceBundle;
- }
-}
diff --git a/plugins/org.eclipse.jst.server.generic.modules/src/org/eclipse/jst/server/generic/modules/Trace.java b/plugins/org.eclipse.jst.server.generic.modules/src/org/eclipse/jst/server/generic/modules/Trace.java
deleted file mode 100644
index 76c57f9..0000000
--- a/plugins/org.eclipse.jst.server.generic.modules/src/org/eclipse/jst/server/generic/modules/Trace.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package org.eclipse.jst.server.generic.modules;
-/**********************************************************************
- * Copyright (c) 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- **********************************************************************/
-
-/**
- * Helper class to route trace output.
- */
-public class Trace {
- public static byte CONFIG = 0;
- public static byte WARNING = 1;
- public static byte SEVERE = 2;
- public static byte FINEST = 3;
-
- /**
- * Trace constructor comment.
- */
- private Trace() {
- super();
- }
-
- /**
- * Trace the given text.
- *
- * @param s java.lang.String
- */
- public static void trace(byte level, String s) {
- trace(level, s, null);
- }
-
- /**
- * Trace the given message and exception.
- *
- * @param s java.lang.String
- * @param t java.lang.Throwable
- */
- public static void trace(byte level, String s, Throwable t) {
- if (!ModulesPlugin.getDefault().isDebugging())
- return;
-
- System.out.println(s);
- if (t != null)
- t.printStackTrace();
- }
-
- /**
- * Trace the given text.
- *
- * @param s java.lang.String
- */
- public static void trace(String s) {
- trace(s, null);
- }
-
- /**
- * Trace the given message and exception.
- *
- * @param s java.lang.String
- * @param t java.lang.Throwable
- */
- public static void trace(String s, Throwable t) {
- trace(FINEST, s, t);
- }
-}
diff --git a/plugins/org.eclipse.jst.server.generic.modules/src/org/eclipse/jst/server/generic/modules/Utils.java b/plugins/org.eclipse.jst.server.generic.modules/src/org/eclipse/jst/server/generic/modules/Utils.java
deleted file mode 100644
index e404746..0000000
--- a/plugins/org.eclipse.jst.server.generic.modules/src/org/eclipse/jst/server/generic/modules/Utils.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Naci M. Dai - initial API and implementation
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-
-package org.eclipse.jst.server.generic.modules;
-
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-
-
-public class Utils {
-
- public static boolean isValidEarModule(IFolder folder) throws Exception {
- String ePath = "/META-INF/application.xml";
- String ePath2 = "/meta-inf/application.xml";
- return (pathExistsIn(folder, ePath) || pathExistsIn(folder, ePath2));
- }
-
- public static boolean isValidEjbModule(IFolder folder) throws Exception {
- String ePath = "/META-INF/ejb-jar.xml";
- String ePath2 = "/meta-inf/ejb-jar.xml";
- String bPath = "/META-INF/beans.xml";
- return (pathExistsIn(folder, ePath) || pathExistsIn(folder, ePath2) || pathExistsIn(
- folder, bPath));
- }
-
- public static boolean isValidModule(IFolder folder) {
- try {
- return (isValidWebModule(folder) || isValidEarModule(folder) || isValidEjbModule(folder));
- } catch (Exception e) {
- return false;
- }
- }
-
- public static boolean isValidWebModule(IFolder folder) throws Exception {
- String wPath = "/WEB-INF/web.xml";
- String wPath2 = "/web-inf/web.xml";
- return (pathExistsIn(folder, wPath) || pathExistsIn(folder, wPath2));
- }
-
- private static boolean pathExistsIn(IFolder folder, String addToPath) {
- IProject project = folder.getProject();
- IPath folderPath = folder.getProjectRelativePath();
- Path contP = new Path(folderPath.toString() + addToPath);
- IResource er = project.findMember(contP);
- return (er != null && er.exists());
- }
-
-}
diff --git a/plugins/org.eclipse.jst.server.generic.modules/src/org/eclipse/jst/server/generic/modules/WebModule.java b/plugins/org.eclipse.jst.server.generic.modules/src/org/eclipse/jst/server/generic/modules/WebModule.java
deleted file mode 100644
index 6b2fa18..0000000
--- a/plugins/org.eclipse.jst.server.generic.modules/src/org/eclipse/jst/server/generic/modules/WebModule.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Naci M. Dai - initial API and implementation
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-
-package org.eclipse.jst.server.generic.modules;
-
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jst.server.j2ee.IWebModule;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IModuleArtifact;
-import org.eclipse.wst.server.core.IModuleType;
-import org.eclipse.wst.server.core.internal.ModuleType;
-import org.eclipse.wst.server.core.model.IModuleListener;
-
-public class WebModule extends J2EEModule implements IWebModule {
-
- private String servletSpec = null;
- private String jspSpec = null;
-
- public WebModule(IFolder moduleFolder) {
- super(moduleFolder);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jst.server.j2ee.IWebModule#getServletSpecificationVersion()
- */
- public String getServletSpecificationVersion() {
-// web-app_2_4.xsd
-// web-app_2_3.dtd
-// else 2.2
- if(servletSpec == null)
- servletSpec = "2.2";
- return servletSpec;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jst.server.j2ee.IWebModule#getJSPSpecificationVersion()
- */
- public String getJSPSpecificationVersion() {
-// if servlet 2.4 -> 2.0
-// else servlet 2.3 -> 1.2
-// else 1.1;
- if(servletSpec == null)
- servletSpec = "1.1";
- return jspSpec;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.jst.server.j2ee.IWebModule#getContextRoot()
- */
- public String getContextRoot() {
- return this.getFolder().getName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jst.server.j2ee.IWebModule#isPublishRequired()
- */
- public boolean isPublishRequired() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jst.server.j2ee.IJ2EEModule#isBinary()
- */
- public boolean isBinary() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.IModule#members()
- */
- public IModuleArtifact[] members() throws CoreException {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.IModule#addModuleListener(org.eclipse.wst.server.core.model.IModuleListener)
- */
- public void addModuleListener(IModuleListener listener) {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.IModule#removeModuleListener(org.eclipse.wst.server.core.model.IModuleListener)
- */
- public void removeModuleListener(IModuleListener listener) {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.IModule#getChildModules()
- */
- public IModule[] getChildModules() {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.IModuleType#getType()
- */
- public String getType() {
- return "j2ee.web";
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.IModule#validate(org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus validate(IProgressMonitor monitor) {
- try {
- if(Utils.isValidWebModule(this.getFolder()))
- return new Status(IStatus.OK,ModulesPlugin.ID, 0,"",null);
- } catch (Exception e) {
- Trace.trace("Unale to validate Web Module", e);
- }
- return new Status(IStatus.ERROR,ModulesPlugin.ID, 0,"",null);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.IModule#getModuleType()
- */
- public IModuleType getModuleType() {
- // TODO Auto-generated method stub
- return new ModuleType(getType(), getJ2EESpecificationVersion());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.IModule#getChildModules(org.eclipse.core.runtime.IProgressMonitor)
- */
- public IModule[] getChildModules(IProgressMonitor monitor) {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- // TODO Auto-generated method stub
- return null;
- }
-}
diff --git a/plugins/org.eclipse.jst.server.generic.ui/.classpath b/plugins/org.eclipse.jst.server.generic.ui/.classpath
deleted file mode 100644
index 065ac06..0000000
--- a/plugins/org.eclipse.jst.server.generic.ui/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/plugins/org.eclipse.jst.server.generic.ui/.cvsignore b/plugins/org.eclipse.jst.server.generic.ui/.cvsignore
deleted file mode 100644
index 058a1b7..0000000
--- a/plugins/org.eclipse.jst.server.generic.ui/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
-bin
-build.xml
-genericui.jar
-org.eclipse.jst.server.generic.ui_1.0.0.jar
-temp.folder
diff --git a/plugins/org.eclipse.jst.server.generic.ui/.project b/plugins/org.eclipse.jst.server.generic.ui/.project
deleted file mode 100644
index af14ba8..0000000
--- a/plugins/org.eclipse.jst.server.generic.ui/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jst.server.generic.ui</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/plugins/org.eclipse.jst.server.generic.ui/build.properties b/plugins/org.eclipse.jst.server.generic.ui/build.properties
deleted file mode 100644
index 6b4a2a0..0000000
--- a/plugins/org.eclipse.jst.server.generic.ui/build.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-source.genericui.jar = src/
-output.genericui.jar = bin/
-bin.includes = plugin.xml,\
- genericui.jar,\
- icons/,\
- plugin.properties
-src.includes = icons/,\
- plugin.xml,\
- plugin.properties,\
- src/
diff --git a/plugins/org.eclipse.jst.server.generic.ui/icons/obj16/lomboz.gif b/plugins/org.eclipse.jst.server.generic.ui/icons/obj16/lomboz.gif
deleted file mode 100644
index 5b3a198..0000000
--- a/plugins/org.eclipse.jst.server.generic.ui/icons/obj16/lomboz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.server.generic.ui/icons/wizban/logo.gif b/plugins/org.eclipse.jst.server.generic.ui/icons/wizban/logo.gif
deleted file mode 100644
index 854d525..0000000
--- a/plugins/org.eclipse.jst.server.generic.ui/icons/wizban/logo.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.server.generic.ui/plugin.properties b/plugins/org.eclipse.jst.server.generic.ui/plugin.properties
deleted file mode 100644
index 8a61dcb..0000000
--- a/plugins/org.eclipse.jst.server.generic.ui/plugin.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-pluginName=Generic Server Plugin UI
-providerName=Eteration.com
-pluginDescription=UI Components for the generic server plugin.
-
diff --git a/plugins/org.eclipse.jst.server.generic.ui/plugin.xml b/plugins/org.eclipse.jst.server.generic.ui/plugin.xml
deleted file mode 100644
index bda1669..0000000
--- a/plugins/org.eclipse.jst.server.generic.ui/plugin.xml
+++ /dev/null
@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.jst.server.generic.ui"
- name="%pluginName"
- version="1.0.0"
- provider-name="%providerName"
- class="org.eclipse.jst.server.generic.ui.GenericUiPlugin"
- description="%pluginDescription">
-
- <runtime>
- <library name="genericui.jar">
- <export name="*"/>
- </library>
- </runtime>
-
- <requires>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.wst.server.ui"/>
- <import plugin="org.eclipse.debug.ui"/>
- <import plugin="org.eclipse.jdt.debug.ui"/>
- <import plugin="org.eclipse.jst.server.generic.core"/>
- <import plugin="org.eclipse.wst.server.core" />
- </requires>
-
- <extension
- point="org.eclipse.wst.server.ui.wizardFragments">
- <fragment
- id="org.eclipse.jst.server.generic.runtime"
- typeIds="org.eclipse.jst.server.generic.runtime"
- class="org.eclipse.jst.server.generic.internal.ui.GenericServerRuntimeWizardFragment"/>
- </extension>
-
-<extension
- point="org.eclipse.wst.server.ui.wizardFragments">
- <fragment
- id="org.eclipse.jst.server.generic.server"
- typeIds="org.eclipse.jst.server.generic"
- class="org.eclipse.jst.server.generic.internal.ui.GenericServerWizardFragment"/>
- </extension>
- <extension point="org.eclipse.wst.server.ui.editorPages">
- <page
- id="org.eclipse.jst.server.generic.configuration.editor.webmodule"
- order="20"
- name="Lomboz server Edit"
- typeIds="org.eclipse.jst.server.generic.*"
- class="org.eclipse.jst.server.generic.internal.ui.GenericServerEditorPartFactory"/>
- </extension>
-
- <extension point="org.eclipse.wst.server.ui.editorPageSections">
- <section
- id="org.eclipse.jst.server.generic.editor.general"
- order="0"
- insertionId="org.eclipse.wst.server.editor.overview.left"
- typeIds="org.eclipse.jst.server.generic.*"
- class="org.eclipse.jst.server.generic.internal.ui.GenericServerEditorSectionFactory"/>
- </extension>
- <extension point="org.eclipse.wst.server.ui.serverImages">
- <image
- id="org.eclipse.jst.server.generic.image"
- icon="icons/obj16/lomboz.gif"
- typeIds="org.eclipse.jst.server.generic.runtime"/>
- <image
- id="org.eclipse.jst.server.generic.image"
- icon="icons/obj16/lomboz.gif"
- typeIds="org.eclipse.jst.server.generic"/>
- </extension>
- <extension point="org.eclipse.debug.ui.launchConfigurationTypeImages">
- <launchConfigurationTypeImage
- id="org.eclipse.jst.server.generic.image.ui.launchConfigurationTypeImage"
- configTypeID="org.eclipse.jst.server.generic.core.launchConfigurationType"
- icon="icons/obj16/lomboz.gif">
- </launchConfigurationTypeImage>
- </extension>
-
- <extension point="org.eclipse.debug.ui.launchConfigurationTabGroups">
- <launchConfigurationTabGroup
- id="org.eclipse.jst.server.generic.internal.ui.launchConfigurationTabGroup"
- type="org.eclipse.jst.server.generic.core.launchConfigurationType"
- class="org.eclipse.jst.server.generic.internal.ui.GenericLaunchConfigurationTabGroup">
- </launchConfigurationTabGroup>
- </extension>
-
-
-</plugin>
diff --git a/plugins/org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/internal/ui/GenericLaunchConfigurationTabGroup.java b/plugins/org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/internal/ui/GenericLaunchConfigurationTabGroup.java
deleted file mode 100644
index b217b1f..0000000
--- a/plugins/org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/internal/ui/GenericLaunchConfigurationTabGroup.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Gorkem Ercan - initial API and implementation
- * Naci M. Dai
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-package org.eclipse.jst.server.generic.internal.ui;
-
-import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
-import org.eclipse.debug.ui.CommonTab;
-import org.eclipse.debug.ui.EnvironmentTab;
-import org.eclipse.debug.ui.ILaunchConfigurationDialog;
-import org.eclipse.debug.ui.ILaunchConfigurationTab;
-import org.eclipse.debug.ui.sourcelookup.SourceLookupTab;
-import org.eclipse.jdt.debug.ui.launchConfigurations.JavaArgumentsTab;
-import org.eclipse.jdt.debug.ui.launchConfigurations.JavaClasspathTab;
-import org.eclipse.jdt.debug.ui.launchConfigurations.JavaJRETab;
-import org.eclipse.wst.server.ui.ServerLaunchConfigurationTab;
-
-
-public class GenericLaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup{
- /**
- * @see org.eclipse.debug.ui.ILaunchConfigurationTabGroup ILaunchConfigurationTabGroup#createTabs(ILaunchConfigurationDialog, String)
- */
- public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
- ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[7];
- tabs[0] = new ServerLaunchConfigurationTab(new String[] { "org.eclipse.jst.server.generic" });
- tabs[0].setLaunchConfigurationDialog(dialog);
- tabs[1] = new JavaArgumentsTab();
- tabs[1].setLaunchConfigurationDialog(dialog);
- tabs[2] = new JavaClasspathTab();
- tabs[2].setLaunchConfigurationDialog(dialog);
- tabs[3] = new SourceLookupTab();
- tabs[3].setLaunchConfigurationDialog(dialog);
- tabs[4] = new EnvironmentTab();
- tabs[4].setLaunchConfigurationDialog(dialog);
- tabs[5] = new JavaJRETab();
- tabs[5].setLaunchConfigurationDialog(dialog);
- tabs[6] = new CommonTab();
- tabs[6].setLaunchConfigurationDialog(dialog);
- setTabs(tabs);
- }}
diff --git a/plugins/org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/internal/ui/GenericServerEditorPartFactory.java b/plugins/org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/internal/ui/GenericServerEditorPartFactory.java
deleted file mode 100644
index 6db0bc0..0000000
--- a/plugins/org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/internal/ui/GenericServerEditorPartFactory.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Gorkem Ercan - initial API and implementation
- * Naci M. Dai
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-package org.eclipse.jst.server.generic.internal.ui;
-
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.ui.editor.ServerEditorPartFactoryDelegate;
-
-
-public class GenericServerEditorPartFactory extends
- ServerEditorPartFactoryDelegate {
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.ui.editor.IServerEditorPartFactoryDelegate#shouldCreatePage(org.eclipse.wst.server.core.IServer, org.eclipse.wst.server.core.IServerConfiguration)
- */
- public boolean shouldCreatePage(IServer server) {
- // TODO Auto-generated method stub
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.ui.editor.IServerEditorPartFactoryDelegate#createPage()
- */
- public IEditorPart createPage() {
- // TODO Auto-generated method stub
- return null;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/internal/ui/GenericServerEditorSectionFactory.java b/plugins/org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/internal/ui/GenericServerEditorSectionFactory.java
deleted file mode 100644
index d7ad817..0000000
--- a/plugins/org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/internal/ui/GenericServerEditorSectionFactory.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package org.eclipse.jst.server.generic.internal.ui;
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Gorkem Ercan - initial API and implementation
- * Naci M. Dai
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.ui.editor.IServerEditorSection;
-import org.eclipse.wst.server.ui.editor.ServerEditorPageSectionFactoryDelegate;
-
-public class GenericServerEditorSectionFactory extends
- ServerEditorPageSectionFactoryDelegate {
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.ui.editor.IServerEditorPageSectionFactoryDelegate#shouldCreateSection(org.eclipse.wst.server.core.IServer, org.eclipse.wst.server.core.IServerConfiguration)
- */
- public boolean shouldCreateSection(IServer server) {
- // TODO Auto-generated method stub
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.ui.editor.IServerEditorPageSectionFactoryDelegate#createSection()
- */
- public IServerEditorSection createSection() {
- // TODO Auto-generated method stub
- return null;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/internal/ui/GenericServerRuntimeWizardFragment.java b/plugins/org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/internal/ui/GenericServerRuntimeWizardFragment.java
deleted file mode 100644
index 7b4d5df..0000000
--- a/plugins/org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/internal/ui/GenericServerRuntimeWizardFragment.java
+++ /dev/null
@@ -1,291 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Gorkem Ercan - initial API and implementation
- * Naci M. Dai
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-package org.eclipse.jst.server.generic.internal.ui;
-
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.dialogs.IMessageProvider;
-import org.eclipse.jst.server.generic.internal.core.GenericServerRuntime;
-import org.eclipse.jst.server.generic.servertype.definition.ServerRuntime;
-import org.eclipse.jst.server.generic.ui.GenericServerUIMessages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.IRuntimeType;
-import org.eclipse.wst.server.core.IRuntimeWorkingCopy;
-import org.eclipse.wst.server.core.ITaskModel;
-import org.eclipse.wst.server.core.ServerCore;
-import org.eclipse.wst.server.core.model.RuntimeDelegate;
-import org.eclipse.wst.server.ui.wizard.IWizardHandle;
-
-/**
- * A serverDefinitionType aware wizard for defining runtimes.
- *
- * @author Gorkem Ercan
- */
-public class GenericServerRuntimeWizardFragment extends ServerDefinitionTypeAwareWizardFragment {
-
-
- private Group selectionBar;
- private Combo fServerCombo;
- private ServerTypeDefinitionGroup fServerPanel;
- private RuntimeDelegate fRuntimeDelegate;
- private Map fServerRuntimeProperties;
- private String fSelectedServerType;
-
-
- /**
- * Constructor
- */
- public GenericServerRuntimeWizardFragment() {
- super();
- }
- /* (non-Javadoc)
- * @see com.ibm.wtp.server.ui.wizard.IWizardFragment#isComplete()
- */
- public boolean isComplete() {
- RuntimeDelegate runtime = getRuntimeDelegate();
- if (runtime == null)
- return false;
- IStatus status = runtime.validate();
- return (status != null && status.isOK());
- }
-
- public void createContent(Composite parent, IWizardHandle handle) {
- fRuntimeDelegate=null;
- createSelectionBar(parent);
- createServerDefinitionTypeComposite(parent);
- }
-
-
- private void swapBody()
- {
- this.fRuntimeDelegate=null;
- String selected = fServerCombo == null ? null : fServerCombo
- .getItem(fServerCombo.getSelectionIndex());
- Map properties = null;
- ServerRuntime definition = getServerTypeDefinition(selected,properties);
- fServerPanel.reset(definition,ServerTypeDefinitionGroup.CONTEXT_RUNTIME, properties);
- }
- /**
- * @param selected
- */
- private void createServerDefinitionTypeComposite(Composite parent) {
- String selected = fServerCombo==null?null:fServerCombo.getItem(fServerCombo.getSelectionIndex());
- if(getServerDefinitionId()!=null)
- selected=getServerDefinitionId();
- Map properties= null;
- if(getRuntimeDelegate()!=null)
- properties = getRuntimeDelegate().getAttribute(GenericServerRuntime.SERVER_INSTANCE_PROPERTIES,(Map)null);
- ServerRuntime definition = getServerTypeDefinition(selected,properties);
- fServerPanel = new ServerTypeDefinitionGroup(this,definition,ServerTypeDefinitionGroup.CONTEXT_RUNTIME,properties,parent);
- }
- private void createSelectionBar(Composite content) {
- selectionBar = new Group(content, SWT.SHADOW_ETCHED_IN);
- selectionBar.setLayout(new GridLayout(2,false));
- selectionBar.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- Label label = new Label(selectionBar, SWT.NONE);
- label.setText(GenericServerUIMessages.getString("runtimeWizard.label.serverType"));
- label.setLayoutData(new GridData());
- fServerCombo = new Combo(selectionBar, SWT.BORDER |SWT.READ_ONLY);
- ServerRuntime[] servers = getAllServerDefinitionTypes();
- for(int i=0; i<servers.length; i++){
- fServerCombo.add(servers[i].getName());
- }
- fServerCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
- if(fServerCombo.getItemCount()>0)
- {
- if(getServerDefinitionId()!=null)
- {
- selectServerDefinition();
- }
- fServerCombo.select(0);
- }
- fServerCombo.addSelectionListener(
- new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- swapBody();
- serverDefinitionTypePropertiesChanged();
- }
- public void widgetDefaultSelected(SelectionEvent e) {}
- }
- );
- }
-
-
- private String getServerDefinitionId()
- {
- String currentDefinition= null;
- if(getRuntimeDelegate()!=null)
- currentDefinition = getRuntimeDelegate().getAttribute(GenericServerRuntime.SERVER_DEFINITION_ID,"");
- if(currentDefinition!= null && currentDefinition.length()>0)
- {
- return currentDefinition;
- }
- return null;
- }
-
- private void selectServerDefinition()
- {
- String currentDefinition = getServerDefinitionId();
- int selectIndex = 0;
- if(currentDefinition != null)
- {
- selectIndex = fServerCombo.indexOf(currentDefinition);
- if(selectIndex<0)
- selectIndex =0;
- }
- fServerCombo.select(selectIndex);
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.ui.wizard.IWizardFragment#enter()
- */
- public void enter() {
- String serverDefinition = getServerDefinitionId();
- if(serverDefinition!=null && serverDefinition.length()>0)
- {
- selectServerDefinition();
- Map properties = null;
- if (getRuntimeDelegate() != null) {
- properties = getRuntimeDelegate().getAttribute(GenericServerRuntime.SERVER_INSTANCE_PROPERTIES,(Map) null);
- }
- ServerRuntime definition = getServerTypeDefinition(serverDefinition,properties);
- fServerPanel.reset(definition,ServerTypeDefinitionGroup.CONTEXT_RUNTIME, properties);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.ui.wizard.IWizardFragment#exit()
- */
- public void exit() {
- try {
- getRuntimeDelegate().getRuntimeWorkingCopy().save(true,new NullProgressMonitor());
- }
- catch(Exception e){//unhandled
- }
- fRuntimeDelegate=null;
-
- }
- protected String getSelectedServerType(){
- return fSelectedServerType;
- }
- protected Map getServerRuntimeProperties(){
- return fServerRuntimeProperties;
- }
-
- private String createName()
- {
- String selected = getSelectedServerType();
- RuntimeDelegate dl = getRuntimeDelegate();
- IRuntimeType runtimeType = dl.getRuntime().getRuntimeType();
- String name = GenericServerUIMessages.getFormattedString("runtimeName", new String[] {selected,runtimeType.getName()});
-
-
- IRuntime[] list = ServerCore.getRuntimes();
-
- int suffix = 1;
- String suffixName=name;
- for(int i=0;i<list.length;i++)
- {
- if(list[i].getName().equals(name)|| list[i].getName().equals(suffixName))
- suffix++;
- suffixName= name+" "+suffix;
- }
-
- if(suffix>1)
- return suffixName;
- return name;
- }
-
- private RuntimeDelegate getRuntimeDelegate()
- {
- if(fRuntimeDelegate == null)
- {
- IRuntimeWorkingCopy wc = (IRuntimeWorkingCopy)getTaskModel().getObject(ITaskModel.TASK_RUNTIME);
- if(wc==null)
- return null;
- fRuntimeDelegate = (RuntimeDelegate)wc.getAdapter(RuntimeDelegate.class);
- }
- return fRuntimeDelegate;
- }
- /* (non-Javadoc)
- * @see org.eclipse.jst.server.generic.internal.ui.ServerDefinitionTypeAwareWizardFragment#description()
- */
- public String description() {
- return GenericServerUIMessages.getString("runtimeWizardDescription");
- }
- /* (non-Javadoc)
- * @see org.eclipse.jst.server.generic.internal.ui.ServerDefinitionTypeAwareWizardFragment#title()
- */
- public String title() {
- return GenericServerUIMessages.getString("runtimeWizardTitle");
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jst.server.generic.internal.ui.ServerDefinitionTypeAwareWizardFragment#serverDefinitionTypePropertiesChanged()
- */
- public void serverDefinitionTypePropertiesChanged() {
- fSelectedServerType = fServerCombo.getItem(fServerCombo.getSelectionIndex());
- fServerRuntimeProperties = fServerPanel.getProperties();
- String selected = getSelectedServerType();
- Map properties = getServerRuntimeProperties();
- RuntimeDelegate dl = getRuntimeDelegate();
- dl.setAttribute(GenericServerRuntime.SERVER_DEFINITION_ID, selected);
- dl.setAttribute(GenericServerRuntime.SERVER_INSTANCE_PROPERTIES,properties);
- dl.getRuntimeWorkingCopy().setName(createName());
-
- validate();
- }
-
- private void validate()
- {
- if (getRuntimeDelegate() == null) {
- this.getWizard().setMessage("", IMessageProvider.ERROR);
- return;
- }
- IStatus status = getRuntimeDelegate().validate();
- if (status == null || status.isOK())
- getWizard().setMessage(null, IMessageProvider.NONE);
- else
- getWizard().setMessage(status.getMessage(), IMessageProvider.ERROR);
- getWizard().update();
- }
-}
diff --git a/plugins/org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/internal/ui/GenericServerWizardFragment.java b/plugins/org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/internal/ui/GenericServerWizardFragment.java
deleted file mode 100644
index 96af454..0000000
--- a/plugins/org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/internal/ui/GenericServerWizardFragment.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Gorkem Ercan - initial API and implementation
- * Naci M. Dai
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-package org.eclipse.jst.server.generic.internal.ui;
-
-import java.util.Map;
-import org.eclipse.jst.server.generic.internal.core.GenericServerRuntime;
-import org.eclipse.jst.server.generic.servertype.definition.ServerRuntime;
-import org.eclipse.jst.server.generic.ui.GenericServerUIMessages;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.wst.server.core.IRuntimeWorkingCopy;
-import org.eclipse.wst.server.core.IServerWorkingCopy;
-import org.eclipse.wst.server.core.ITaskModel;
-import org.eclipse.wst.server.core.model.RuntimeDelegate;
-import org.eclipse.wst.server.core.model.ServerDelegate;
-import org.eclipse.wst.server.ui.wizard.IWizardHandle;
-/**
- *
- *
- * @author Gorkem Ercan
- */
-public class GenericServerWizardFragment extends ServerDefinitionTypeAwareWizardFragment
-{
-
- private ServerTypeDefinitionGroup fComposite;
- private Map fProperties;
- /* (non-Javadoc)
- * @see com.ibm.wtp.server.ui.wizard.IWizardFragment#isComplete()
- */
- public boolean isComplete() {
-
- ServerRuntime serverRuntime = getServerTypeDefinitionFor(getServer());
- if(serverRuntime==null)
- return false;
- return true;
- }
-
- public void createContent(Composite parent, IWizardHandle handle){
- createBody(parent,handle);
- }
- /**
- *
- */
- private void createBody(Composite parent, IWizardHandle handle)
- {
- IServerWorkingCopy server = getServer();
- ServerRuntime definition = getServerTypeDefinitionFor(server);
- fComposite = new ServerTypeDefinitionGroup(this, definition,ServerTypeDefinitionGroup.CONTEXT_SERVER, null,parent);
-
- }
-
- /**
- * @param server
- * @return
- */
- private ServerRuntime getServerTypeDefinitionFor(IServerWorkingCopy server) {
-
- RuntimeDelegate runtime = (RuntimeDelegate)server.getRuntime().getAdapter(RuntimeDelegate.class);
- if(runtime==null){
- IRuntimeWorkingCopy wc = (IRuntimeWorkingCopy)getTaskModel().getObject(ITaskModel.TASK_RUNTIME);
-
- runtime= (RuntimeDelegate)wc.getAdapter(RuntimeDelegate.class);
- }
- String id = runtime.getAttribute(GenericServerRuntime.SERVER_DEFINITION_ID,(String)null);
- if(id==null){
- return null;
- }
- Map runtimeProperties = runtime.getAttribute(GenericServerRuntime.SERVER_INSTANCE_PROPERTIES,(Map)null);
- ServerRuntime definition = getServerTypeDefinition(id,runtimeProperties);
- return definition;
- }
-
- /**
- * @return
- */
- private IServerWorkingCopy getServer() {
- IServerWorkingCopy server = (IServerWorkingCopy)getTaskModel().getObject(ITaskModel.TASK_SERVER);
- return server;
- }
-
- public void enter() {
- IServerWorkingCopy server = getServer();
- ServerRuntime definition = getServerTypeDefinitionFor(server);
- if(definition != null && fComposite!=null)
- fComposite.reset(definition,ServerTypeDefinitionGroup.CONTEXT_SERVER,null);
- }
- public void exit(){
- fProperties = fComposite.getProperties();
- serverDefinitionTypePropertiesChanged();
- }
-
- protected Map getServerProperties(){
- return fProperties;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jst.server.generic.internal.ui.ServerDefinitionTypeAwareWizardFragment#description()
- */
- public String description() {
- return GenericServerUIMessages.getString("serverWizardDescription");
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jst.server.generic.internal.ui.ServerDefinitionTypeAwareWizardFragment#title()
- */
- public String title() {
- return GenericServerUIMessages.getString("serverWizardTitle");
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jst.server.generic.internal.ui.ServerDefinitionTypeAwareWizardFragment#serverDefinitionTypePropertiesChanged()
- */
- public void serverDefinitionTypePropertiesChanged() {
- fProperties = fComposite.getProperties();
- IServerWorkingCopy serverWorkingCopy = getServer();
- ServerRuntime definition = getServerTypeDefinitionFor(serverWorkingCopy);
-
- serverWorkingCopy.setName(GenericServerUIMessages.getFormattedString("serverName",new String[] {definition.getName()}));
- ServerDelegate dl= (ServerDelegate)serverWorkingCopy.getAdapter(ServerDelegate.class);
- dl.setAttribute(GenericServerRuntime.SERVER_INSTANCE_PROPERTIES,getServerProperties());
- }
-}
diff --git a/plugins/org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/internal/ui/ServerDefinitionTypeAwareWizardFragment.java b/plugins/org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/internal/ui/ServerDefinitionTypeAwareWizardFragment.java
deleted file mode 100644
index 2b8413c..0000000
--- a/plugins/org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/internal/ui/ServerDefinitionTypeAwareWizardFragment.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Created on Oct 19, 2004
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.server.generic.internal.ui;
-
-import java.util.Map;
-import org.eclipse.jst.server.generic.core.CorePlugin;
-import org.eclipse.jst.server.generic.servertype.definition.ServerRuntime;
-import org.eclipse.jst.server.generic.ui.GenericUiPlugin;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.wst.server.ui.wizard.IWizardHandle;
-import org.eclipse.wst.server.ui.wizard.WizardFragment;
-
-/**
- *
- *
- * @author Gorkem Ercan
- */
-public abstract class ServerDefinitionTypeAwareWizardFragment extends WizardFragment {
-
- private IWizardHandle fWizard;
- public boolean hasComposite() {
- return true;
- }
-
- public Composite createComposite(Composite parent, IWizardHandle handle) {
-
- this.fWizard = handle;
- Composite container = new Composite(parent, SWT.NONE);
- container.setLayoutData(new GridData(GridData.FILL_BOTH));
- GridLayout grid = new GridLayout(1,false);
- container.setLayout(grid);
- handle.setImageDescriptor(GenericUiPlugin.getDefault().imageDescriptor(GenericUiPlugin.WIZBAN_IMAGE));
- handle.setTitle(title());
- handle.setDescription(description());
- createContent(container,handle);
- return container;
- }
- public IWizardHandle getWizard(){
- return fWizard;
- }
- /**
- * Returns the description to be displayed on the wizard head.
- * @return
- */
- public abstract String description();
- /**
- * Returns the title of the wizard.
- * @return
- */
- public abstract String title();
-
- public abstract void createContent(Composite parent, IWizardHandle handle);
-
- public abstract void serverDefinitionTypePropertiesChanged();
-
- protected ServerRuntime getServerTypeDefinition(String definitionID, Map properties)
- {
- return CorePlugin.getDefault().getServerTypeDefinitionManager().getServerRuntimeDefinition(definitionID,properties);
- }
-
- protected ServerRuntime[] getAllServerDefinitionTypes()
- {
- return CorePlugin.getDefault().getServerTypeDefinitionManager().getServerTypeDefinitions();
- }
-
-}
diff --git a/plugins/org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/internal/ui/ServerTypeDefinitionGroup.java b/plugins/org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/internal/ui/ServerTypeDefinitionGroup.java
deleted file mode 100644
index 8d1b91b..0000000
--- a/plugins/org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/internal/ui/ServerTypeDefinitionGroup.java
+++ /dev/null
@@ -1,332 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Gorkem Ercan - initial API and implementation
- * Naci M. Dai
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-package org.eclipse.jst.server.generic.internal.ui;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.jst.server.generic.servertype.definition.Property;
-import org.eclipse.jst.server.generic.servertype.definition.ServerRuntime;
-import org.eclipse.jst.server.generic.ui.GenericServerUIMessages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.DirectoryDialog;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-
-public class ServerTypeDefinitionGroup
-{
- public static final String CONTEXT_SERVER = Property.CONTEXT_SERVER;
- public static final String CONTEXT_RUNTIME = Property.CONTEXT_RUNTIME;
-
- private ServerRuntime fServerTypeDefinition;
- private List fPropertyControls = new ArrayList();
- private Map fPropertyMap =new HashMap();
- private String fContext="undefined";
- private Group fDefinitionGroup;
- private ServerDefinitionTypeAwareWizardFragment fAwareWizardFragment;
- private class PropertyModifyListener implements ModifyListener
- {
- /* (non-Javadoc)
- * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent)
- */
- public void modifyText(ModifyEvent e) {
- fAwareWizardFragment.serverDefinitionTypePropertiesChanged();
-
- }
-
- }
-
- /**
- * Construct a composite for the given ServerTypeDefinition
- *
- * @param definition
- * @param initialProperties initial values null means use default
- * @param parent
- * @param style
- */
- public ServerTypeDefinitionGroup(ServerDefinitionTypeAwareWizardFragment fragment, ServerRuntime definition, String context, Map initialProperties, Composite parent)
- {
- fAwareWizardFragment = fragment;
- initServerTypeDefinition(definition,context,initialProperties);
- createControl(parent);
- }
- private void initProperties(Map initialProperties)
- {
- if(initialProperties!= null)
- this.fPropertyMap=initialProperties;
- else
- fPropertyMap=new HashMap();
- }
- /**
- * Changes the values with the given ones. Renders the UI
- * with the given new values.
- *
- * @param definition
- * @param context
- * @param initialProperties
- */
- public void reset(ServerRuntime definition, String context, Map initialProperties)
- {
- initServerTypeDefinition(definition, context, initialProperties);
- fDefinitionGroup.setText(definition.getName());
- Control[] allControls = fDefinitionGroup.getChildren();
- for(int i= 0; i<allControls.length;i++)
- {
- Control c = allControls[i];
- c.dispose();
- }
- fPropertyControls.clear();
- createPropertyControls(fDefinitionGroup);
-
- fDefinitionGroup.layout(true);
-
- }
-
- /**
- * @param definition
- * @param context
- * @param initialProperties
- */
- private void initServerTypeDefinition(ServerRuntime definition, String context, Map initialProperties) {
- fServerTypeDefinition = definition;
- initProperties(initialProperties);
- this.fContext = context;
- }
- /**
- * @param parent
- */
- private void createControl(Composite parent) {
-
- fDefinitionGroup = new Group(parent, SWT.SHADOW_ETCHED_IN);
- fDefinitionGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
- fDefinitionGroup.setLayout(new GridLayout(3,false));
- if(fServerTypeDefinition!=null)
- {
- fDefinitionGroup.setText(fServerTypeDefinition.getName());
-
- createPropertyControls(fDefinitionGroup);
- }
- }
- /**
- * @param defPanel
- */
- private void createPropertyControls(Composite definitionComposite) {
- List properties = fServerTypeDefinition.getProperty();
- for(int i = 0; i<properties.size(); i++)
- {
- Property property = (Property)properties.get(i);
- if(this.fContext.equals(property.getContext()))
- createPropertyControl(definitionComposite,property);
- }
-
- }
-
- private void createPropertyControl(Composite parent, Property property)
- {
- if( "directory".equals(property.getType())) {
- Text path = createLabeledPath(property.getLabel(),getPropertyValue(property),parent);
- path.setData(property);
- fPropertyControls.add(path);
- } else if( "file".equals(property.getType())) {
- Text file = createLabeledFile(property.getLabel(),getPropertyValue(property),parent);
- file.setData(property);
- fPropertyControls.add(file);
- } else if( "string".equals(property.getType())) {
- Text str = createLabeledText(property.getLabel(),getPropertyValue(property),parent);
- str.setData(property);
- fPropertyControls.add(str);
- } else if( "boolean".equals(property.getType())) {
- Button bool =createLabeledCheck(property.getLabel(),("true".equals( getPropertyValue(property))), parent);
- bool.setData(property);
- fPropertyControls.add(bool);
- } else {
- Text defaultText= createLabeledText(property.getLabel(),getPropertyValue(property),parent);
- defaultText.setData(property);
- fPropertyControls.add(defaultText);
- }
- }
- private String getPropertyValue(Property property)
- {
- String value = property.getDefault();
- if(fPropertyMap!=null && fPropertyMap.isEmpty()==false)
- value=(String)fPropertyMap.get(property.getId());
- return value;
- }
- protected Button createLabeledCheck(String title, boolean value,
- Composite defPanel) {
- GridData gridData;
- Label label = new Label(defPanel, SWT.WRAP);
- gridData = new GridData();
- label.setLayoutData(gridData);
- label.setText(title);
-
- Button fButton = new Button(defPanel, SWT.CHECK);
-
- gridData = new GridData(GridData.FILL_HORIZONTAL
- | GridData.GRAB_HORIZONTAL);
- gridData.horizontalSpan = 2;
- fButton.setLayoutData(gridData);
- fButton.setSelection(value);
- fButton.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- fAwareWizardFragment.serverDefinitionTypePropertiesChanged();
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- // TODO Auto-generated method stub
-
- }
- });
-
- return fButton;
- }
- protected Text createLabeledFile(String title, String value,
- Composite defPanel) {
- GridData gridData;
- Label label = new Label(defPanel, SWT.WRAP);
- gridData = new GridData();
- label.setLayoutData(gridData);
- label.setText(title);
-
- final Text fText = new Text(defPanel, SWT.SHADOW_IN | SWT.BORDER);
- gridData = new GridData(GridData.FILL_HORIZONTAL
- | GridData.GRAB_HORIZONTAL);
- gridData.horizontalSpan = 1;
- fText.setLayoutData(gridData);
- fText.setText(value);
- fText.addModifyListener(new PropertyModifyListener());
- Button fButton = new Button(defPanel, SWT.PUSH);
- fButton.setText(GenericServerUIMessages.getString("serverTypeGroup.label.browse"));
- fButton.setLayoutData(new GridData());
- fButton.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- FileDialog dlg = new FileDialog(fDefinitionGroup.getShell());
- dlg.setFileName(fText.getText());
- String res = dlg.open();
- if (res != null) {
- fText.setText(res);
- }
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- widgetSelected(e);
- }
-
- });
-
- return fText;
- }
- protected Text createLabeledPath(String title, String value,
- Composite parent) {
- GridData gridData;
- Label label = new Label(parent, SWT.WRAP);
- gridData = new GridData();
- label.setLayoutData(gridData);
- label.setText(title);
-
- final Text fText = new Text(parent, SWT.SHADOW_IN | SWT.BORDER);
- gridData = new GridData(GridData.FILL_HORIZONTAL);
- gridData.horizontalSpan = 1;
- fText.setLayoutData(gridData);
- fText.setText(value);
- fText.addModifyListener(new PropertyModifyListener());
- Button fButton = new Button(parent, SWT.PUSH);
- fButton.setText(GenericServerUIMessages.getString("serverTypeGroup.label.browse"));
- fButton.setLayoutData(new GridData());
- fButton.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- DirectoryDialog dlg = new DirectoryDialog(fDefinitionGroup.getShell());
- dlg.setFilterPath(fText.getText());
- String res = dlg.open();
- if (res != null) {
- fText.setText(res);
- }
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- widgetSelected(e);
- }
-
- });
-
- return fText;
- }
- protected Text createLabeledText(String title, String value,
- Composite defPanel) {
- GridData gridData;
- Label label = new Label(defPanel, SWT.WRAP);
- gridData = new GridData();
- label.setLayoutData(gridData);
- label.setText(title);
-
- Text fText = new Text(defPanel, SWT.SHADOW_IN | SWT.BORDER);
- gridData = new GridData(GridData.FILL_HORIZONTAL
- | GridData.GRAB_HORIZONTAL);
- gridData.horizontalSpan = 2;
- fText.setLayoutData(gridData);
- fText.setText(value);
- fText.addModifyListener(new PropertyModifyListener());
- return fText;
- }
- public Map getProperties()
- {
- for(int i=0; i<fPropertyControls.size();i++)
- {
- if(fPropertyControls.get(i)instanceof Button)
- {
- Button button = (Button)fPropertyControls.get(i);
- Property prop = (Property)button.getData();
- fPropertyMap.put(prop.getId(),Boolean.toString(button.getSelection()));
- }
- else
- {
- Text text = (Text)fPropertyControls.get(i);
- Property prop = (Property)text.getData();
- fPropertyMap.put(prop.getId(),text.getText());
- }
- }
- return fPropertyMap;
- }
-}
diff --git a/plugins/org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/ui/GenericServerUIMessages.java b/plugins/org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/ui/GenericServerUIMessages.java
deleted file mode 100644
index b1a5537..0000000
--- a/plugins/org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/ui/GenericServerUIMessages.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package org.eclipse.jst.server.generic.ui;
-
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/**
- * Helper class to get messages
- *
- * @author Gorkem Ercan
- */
-public class GenericServerUIMessages {
-
- private static final String RESOURCE_BUNDLE= "org.eclipse.jst.server.generic.ui.GenericServerUIMessages";//$NON-NLS-1$
-
- private static ResourceBundle fResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);
-
- private GenericServerUIMessages() {
- }
-
- /**
- * Return string from the resource bundle.
- *
- * @param key the string used to get the bundle value, must not be <code>null</code>
- * @return the string from the resource bundle
- */
- public static String getString(String key) {
- try {
- return fResourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return "!" + key + "!";
- }
- }
-
- /**
- * Gets a string from the resource bundle that is
- * formatted it with the given argument.
- *
- * @param key the string used to get the bundle value, must not be null
- * @param arg the argument used to format the string
- * @return the formatted string
- */
- public static String getFormattedString(String key, Object[] arg) {
- String format= null;
- try {
- format= fResourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return "!" + key + "!";
- }
- if (arg == null)
- arg= new Object[0];
- return MessageFormat.format(format,arg );
- }
-
- /**
- * Returns a resource bundle.
- *
- * @return the resource bundle
- */
- public static ResourceBundle getResourceBundle() {
- return fResourceBundle;
- }
-}
diff --git a/plugins/org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/ui/GenericServerUIMessages.properties b/plugins/org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/ui/GenericServerUIMessages.properties
deleted file mode 100644
index 7d6b62a..0000000
--- a/plugins/org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/ui/GenericServerUIMessages.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-serverWizardTitle=New Generic Server
-serverWizardDescription=Create a new server of the selected server type
-runtimeWizardTitle=New Generic Server Runtime
-runtimeWizardDescription=Define a new Generic Runtime for your server type
-runtimeWizard.label.serverType=Server types:
-serverTypeGroup.label.browse=Browse...
-serverName = {0}(Generic)
-runtimeName= {0}({1})
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/ui/GenericUiPlugin.java b/plugins/org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/ui/GenericUiPlugin.java
deleted file mode 100644
index 0de4415..0000000
--- a/plugins/org.eclipse.jst.server.generic.ui/src/org/eclipse/jst/server/generic/ui/GenericUiPlugin.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Gorkem Ercan - initial API and implementation
- * Naci M. Dai
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-package org.eclipse.jst.server.generic.ui;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.ui.plugin.*;
-import org.osgi.framework.BundleContext;
-import java.util.*;
-
-/**
- * The main plugin class to be used in the desktop.
- *
- * @author Gorkem Ercan
- */
-public class GenericUiPlugin extends AbstractUIPlugin {
-
- public static final String WIZBAN_IMAGE = "genericlogo";
- //The shared instance.
- private static GenericUiPlugin plugin;
- //Resource bundle.
- private ResourceBundle resourceBundle;
-
- /**
- * The constructor.
- */
- public GenericUiPlugin() {
- super();
- plugin = this;
- try {
- resourceBundle = ResourceBundle.getBundle("org.eclipse.jst.server.generic.ui.GenericUiPluginResources");
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- }
-
- /**
- * Returns the shared instance.
- */
- public static GenericUiPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns the string from the plugin's resource bundle,
- * or 'key' if not found.
- */
- public static String getResourceString(String key) {
- ResourceBundle bundle = GenericUiPlugin.getDefault().getResourceBundle();
- try {
- return (bundle != null) ? bundle.getString(key) : key;
- } catch (MissingResourceException e) {
- return key;
- }
- }
-
- protected ImageRegistry createImageRegistry() {
- ImageRegistry registry = new ImageRegistry();
- ImageDescriptor desc = ImageDescriptor.createFromURL(getDefault().getBundle().getEntry("/icons/wizban/logo.gif"));
- registry.put(WIZBAN_IMAGE,desc);
- return registry;
- }
- public ImageDescriptor imageDescriptor(String key){
- return getImageRegistry().getDescriptor(key);
- }
- /**
- * Returns the plugin's resource bundle,
- */
- public ResourceBundle getResourceBundle() {
- return resourceBundle;
- }
-}
diff --git a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/MimeMappingDialog.java b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/MimeMappingDialog.java
index 2695231..f986b84 100644
--- a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/MimeMappingDialog.java
+++ b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/MimeMappingDialog.java
@@ -37,7 +37,7 @@
* MimeMappingDialog constructor comment.
* @param parentShell org.eclipse.swt.widgets.Shell
*/
- public MimeMappingDialog(Shell parentShell) {
+ protected MimeMappingDialog(Shell parentShell) {
this(parentShell, new MimeMapping("", ""));
isEdit = false;
}
@@ -46,7 +46,7 @@
* SystemPropertyDialog constructor comment.
* @param parentShell org.eclipse.swt.widgets.Shell
*/
- public MimeMappingDialog(Shell parentShell, MimeMapping map) {
+ protected MimeMappingDialog(Shell parentShell, MimeMapping map) {
super(parentShell);
this.map = map;
isEdit = true;
diff --git a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/WebModuleDialog.java b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/WebModuleDialog.java
index 4eb377a..25af3d8 100644
--- a/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/WebModuleDialog.java
+++ b/plugins/org.eclipse.jst.server.tomcat.ui/tomcatui/org/eclipse/jst/server/tomcat/ui/internal/editor/WebModuleDialog.java
@@ -60,7 +60,7 @@
* WebModuleDialog constructor comment.
* @param parentShell org.eclipse.swt.widgets.Shell
*/
- public WebModuleDialog(Shell parentShell, IServerAttributes server2, ITomcatServer server, ITomcatConfiguration config, WebModule module) {
+ protected WebModuleDialog(Shell parentShell, IServerAttributes server2, ITomcatServer server, ITomcatConfiguration config, WebModule module) {
super(parentShell);
this.module = module;
this.server2 = server2;
@@ -73,7 +73,7 @@
* WebModuleDialog constructor comment.
* @param parentShell org.eclipse.swt.widgets.Shell
*/
- public WebModuleDialog(Shell parentShell, IServerAttributes server2, ITomcatServer server, ITomcatConfiguration config, boolean isProject) {
+ protected WebModuleDialog(Shell parentShell, IServerAttributes server2, ITomcatServer server, ITomcatConfiguration config, boolean isProject) {
this(parentShell, server2, server, config, new WebModule("/", "", null, true));
isEdit = false;
this.isProject = isProject;
diff --git a/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/internal/ui/ImageResource.java b/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/internal/ui/ImageResource.java
index 8db75b3..27d23c0 100644
--- a/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/internal/ui/ImageResource.java
+++ b/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/internal/ui/ImageResource.java
@@ -17,6 +17,7 @@
import org.eclipse.swt.graphics.Image;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.wst.server.ui.internal.Trace;
/**
* Utility class to handle image resources.
*/
@@ -64,14 +65,14 @@
*/
protected static void dispose() {
try {
- Trace.trace(Trace.FINEST, "Disposing of element images");
+ Trace.trace("Disposing of element images");
Iterator iterator = elementImages.values().iterator();
while (iterator.hasNext()) {
Image image = (Image) iterator.next();
image.dispose();
}
} catch (Exception e) {
- Trace.trace(Trace.WARNING, "Could not dispose of images");
+ Trace.trace("Could not dispose of images");
}
}
@@ -125,7 +126,7 @@
imageRegistry.put(key, id);
imageDescriptors.put(key, id);
} catch (Exception e) {
- Trace.trace(Trace.WARNING, "Error registering image " + key + " from " + partialURL, e);
+ Trace.trace("Error registering image " + key + " from " + partialURL, e);
}
}
}
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/internal/ui/SWTUtil.java b/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/internal/ui/SWTUtil.java
index 87fe7a9..1b12e86 100644
--- a/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/internal/ui/SWTUtil.java
+++ b/plugins/org.eclipse.jst.server.ui/sjavaui/org/eclipse/jst/server/internal/ui/SWTUtil.java
@@ -49,6 +49,7 @@
initializeDialogUnits(comp);
GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
data.widthHint = getButtonWidthHint(b);
+ data.heightHint = Dialog.convertVerticalDLUsToPixels(fontMetrics, IDialogConstants.BUTTON_HEIGHT);
b.setLayoutData(data);
return b;
}
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/.classpath b/plugins/org.eclipse.wst.internet.monitor.core/.classpath
deleted file mode 100644
index 1d974a9..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="monitorcore/"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/.cvsignore b/plugins/org.eclipse.wst.internet.monitor.core/.cvsignore
deleted file mode 100644
index 8ca260d..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
-bin
-monitorcore.jar
-build.xml
-temp.folder
-org.eclipse.wst.internet.monitor.core_3.0.0.jar
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/.options b/plugins/org.eclipse.wst.internet.monitor.core/.options
deleted file mode 100644
index 3d70459..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/.options
+++ /dev/null
@@ -1,6 +0,0 @@
-# Debugging options for the org.eclipse.wst.internet.monitor.core plugin
-
-# Turn on general debugging
-org.eclipse.wst.internet.monitor.core/debug=false
-
-org.eclipse.wst.internet.monitor.core/parsing=false
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/.project b/plugins/org.eclipse.wst.internet.monitor.core/.project
deleted file mode 100644
index 93b239c..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.internet.monitor.core</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/build.properties b/plugins/org.eclipse.wst.internet.monitor.core/build.properties
deleted file mode 100644
index f8cb62c..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = plugin.xml,\
- *.jar,\
- monitorcore.jar,\
- plugin.properties,\
- .options
-jars.compile.order =
-src.includes = build.properties,\
- schema/
-output.monitorcore.jar = bin/
-source.monitorcore.jar = monitorcore/
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/ContentFilterDelegate.java b/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/ContentFilterDelegate.java
deleted file mode 100644
index 2137876..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/ContentFilterDelegate.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.internet.monitor.core;
-
-import java.io.IOException;
-/**
- * A content filter that filters contents from the monitor traffic on a request.
- * <p>
- * This abstract class is intended to be extended only by clients
- * to extend the <code>contentFilters</code> extension point.
- * </p>
- *
- * @since 1.0
- */
-public abstract class ContentFilterDelegate {
- /**
- * Filter the given content from the given request. The content that has been filtered out will
- * not be shown to clients of the TCP/IP monitor.
- *
- * @param request the request that the filter will be performed on
- * @param isRequest set to true if the content filter applies to request monitor traffic,
- * or set to false if the content filter applies to the response monitor traffic
- * @param content the message content to be filtered out
- * @return the filtered content
- * @throws IOException if there is an error while parsing or filtering the content
- */
- public abstract byte[] filter(IRequest request, boolean isRequest, byte[] content) throws IOException;
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/IContentFilter.java b/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/IContentFilter.java
deleted file mode 100644
index 894787e..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/IContentFilter.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.internet.monitor.core;
-
-import java.io.IOException;
-/**
- * A content filter that filters specific contents from the monitor traffic
- * of a request.
- * The global list of known content filters is available via
- * {@link MonitorCore.getContentFilters()}.
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
- * @since 1.0
- */
-public interface IContentFilter {
- /**
- * Returns the id of this filter.
- * Each filter has a distinct, fixed id. Ids are intended to be used internally as keys;
- * they are not intended to be shown to end users.
- *
- * @return the element id
- */
- public String getId();
-
- /**
- * Returns the displayable (translated) name for this filter.
- *
- * @return a displayable name
- */
- public String getName();
-
- /**
- * Returns the relative order for this filter.
- * Each filter has a relative order that allows them to be applied in the correct
- * order relative to each other. Lower orders are processed first.
- *
- * @return the relative order
- */
- public int getOrder();
-
- /**
- * Filter the given content from the given request. The content that has been filtered out will
- * not be shown to clients of the TCP/IP monitor.
- *
- * @param request the request that the filter will be performed on
- * @param isRequest set to true if the content filter applies to request monitor traffic,
- * or set to false if the content filter applies to the response monitor traffic
- * @param content the message content to be filtered out
- * @return the filtered content
- * @throws IOException if there is an error while parsing or filtering the content
- */
- public byte[] filter(IRequest request, boolean isRequest, byte[] content) throws IOException;
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/IMonitor.java b/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/IMonitor.java
deleted file mode 100644
index f07de72..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/IMonitor.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.internet.monitor.core;
-/**
- * Represents the monitor that monitors the network traffic between a server and a client.
- * The global list of known monitors is available via {@link MonitorCore.getMonitors()}.
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
- * @see IMonitorWorkingCopy
- * @since 1.0
- */
-public interface IMonitor {
- /**
- * Returns the id of this monitor.
- * Each monitor has a distinct, fixed id. Ids are intended to be used internally as keys;
- * they are not intended to be shown to end users.
- *
- * @return the element id
- */
- public String getId();
-
- /**
- * Returns the remote host name of the server to be monitored.
- *
- * @return the remote host name
- */
- public String getRemoteHost();
-
- /**
- * Returns the remote port number of the server to be monitored.
- *
- * @return the remote port number
- */
- public int getRemotePort();
-
- /**
- * Returns the local port number of the client that monitor traffic will used.
- *
- * @return the local port number
- */
- public int getLocalPort();
-
- /**
- * Returns the protocol adapter that the monitor will be used to read the monitor traffic.
- *
- * @return the protocol adapter
- */
- public IProtocolAdapter getProtocolAdapter();
-
- /**
- * Returns whether this monitor is currently running.
- *
- * @return <code>true</code> if the monitor is currently running; otherwise, return <code>false</code>.
- */
- public boolean isRunning();
-
- /**
- * Deletes this monitor. The monitor will no longer be available to users.
- * This method has no effect if the monitor has already been deleted.
- */
- public void delete();
-
- /**
- * Returns whether this monitor is a working copy. Monitors which return
- * <code>true</code> to this method can be safely cast to
- * <code>org.eclipse.wst.internet.monitor.core.IMonitorWorkingCopy</code>
- *
- * @return whether this monitor is a working copy
- */
- public boolean isWorkingCopy();
-
- /**
- * Returns a working copy of this monitor. Changes to the working copy will be
- * applied to this monitor when saved.
- *
- * @return a working copy of this monitor
- */
- public IMonitorWorkingCopy getWorkingCopy();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/IMonitorListener.java b/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/IMonitorListener.java
deleted file mode 100644
index 3e4d107..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/IMonitorListener.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.internet.monitor.core;
-/**
- * Listener that listen to the monitor add, remove and changes.
- *
- * @since 1.0
- */
-public interface IMonitorListener {
- /**
- * This method is being called when a monitor is added.
- *
- * @param monitor the monitor that has been added
- */
- public void monitorAdded(IMonitor monitor);
-
- /**
- * This method is being called when a monitor is changed.
- *
- * @param monitor the monitor that has been changed
- */
- public void monitorChanged(IMonitor monitor);
-
- /**
- * This method is being called when a monitor is removed.
- *
- * @param monitor the monitor that has been removed
- */
- public void monitorRemoved(IMonitor monitor);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/IMonitorWorkingCopy.java b/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/IMonitorWorkingCopy.java
deleted file mode 100644
index ab49196..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/IMonitorWorkingCopy.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.internet.monitor.core;
-/**
- * Represents a working copy of a monitor. A working copy is a copy that the attributes can be changed.
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
- * @see IMonitor
- * @since 1.0
- */
-public interface IMonitorWorkingCopy extends IMonitor {
- /**
- * Set the remote (server) host name.
- *
- * @param host the new host name
- */
- public void setRemoteHost(String host);
-
- /**
- * Set the remote (server) host port number.
- *
- * @param port the new port number
- */
- public void setRemotePort(int port);
-
- /**
- * Set the local (client) port number.
- *
- * @param port the local (client) port number
- */
- public void setLocalPort(int port);
-
- /**
- * Set the protocol adapter. This protocol adapter is responsible for translating
- * network traffic between the server and the client.
- *
- * @param type the protocol adapter.
- *
- */
- public void setProtocolAdapter(IProtocolAdapter protocolAdapter);
-
- /**
- * Saves the changes to this working copy and returns the resulting monitor.
- *
- * @return the modified or created monitor
- */
- public IMonitor save();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/IProtocolAdapter.java b/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/IProtocolAdapter.java
deleted file mode 100644
index 62f1105..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/IProtocolAdapter.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.internet.monitor.core;
-/**
- * A protocol adapter allows the monitor to support a new protocol between a client
- * and server, and manages the message passing between the two.
- * The global list of known protocol adapters is available via
- * {@link MonitorCore.getProtocolAdapters()}.
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
- * @since 1.0
- */
-public interface IProtocolAdapter {
- /**
- * Returns the id of this adapter.
- * Each adapter has a distinct, fixed id. Ids are intended to be used internally as keys;
- * they are not intended to be shown to end users.
- *
- * @return the element id
- */
- public String getId();
-
- /**
- * Returns the displayable (translated) name for this adapter.
- *
- * @return a displayable name
- */
- public String getName();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/IRequest.java b/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/IRequest.java
deleted file mode 100644
index ab7e3de..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/IRequest.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.internet.monitor.core;
-
-import java.util.Date;
-
-import org.eclipse.core.runtime.IAdaptable;
-/**
- * Represents a request that has been made between the client and a server.
- * The global list of known requests is available via {@link MonitorCore.getRequests()}.
- *
- * @since 1.0
- */
-public interface IRequest extends IAdaptable {
- /**
- * Request content type (value 1) for the transport (header) of a request
- * or response.
- *
- * @see #getRequest(int)
- * @see #getResponse(int)
- */
- public static final int TRANSPORT = 1;
-
- /**
- * Request content type (value 2) for the content (body) of a request
- * or response.
- *
- * @see #getRequest(int)
- * @see #getResponse(int)
- */
- public static final int CONTENT = 2;
-
- /**
- * Request content type (value 3) for the entire content of a request
- * or response.
- *
- * @see #getRequest(int)
- * @see #getResponse(int)
- */
- public static final int ALL = 3;
-
- /**
- * Return the protocol adapter of the request.
- *
- * @return org.eclipse.wst.internet.monitor.core.IProtocolAdapter
- */
- public IProtocolAdapter getProtocolAdapter();
-
- /**
- * Return the date/time of this request.
- *
- * @return the timestamp
- */
- public Date getDate();
-
- /**
- * Returns the local (client) port.
- *
- * @return the local port number
- */
- public int getLocalPort();
-
- /**
- * Returns the remote (server) host.
- *
- * @return the remote host
- */
- public String getRemoteHost();
-
- /**
- * Returns the remote (server) port.
- *
- * @return the remote port number
- */
- public int getRemotePort();
-
- /**
- * Returns the request as a byte array.
- *
- * @param type the content type (IRequest.X)
- * @return the request content
- */
- public byte[] getRequest(int type);
-
- /**
- * Returns the response as a byte array.
- *
- * @param type the content type (IRequest.X)
- * @return the response content
- */
- public byte[] getResponse(int type);
-
- /**
- * Returns the response time in milliseconds.
- *
- * @return the server's response time
- */
- public long getResponseTime();
-
- /**
- * Returns a label for this request.
- *
- * @return the label
- */
- public String getLabel();
-
- /**
- * Add a property to the request.
- *
- * @param key the key of the property to be added
- * @param value the value of the property to be added
- */
- public void addProperty(String key, Object value);
-
- /**
- * Get a string property with a given key from the request.
- *
- * @param key the key of the property
- * @return the value of property
- */
- public String getStringProperty(String key);
-
- /**
- * Get a integer property with a given key from the request.
- *
- * @param key the key of the property
- * @return the value of property
- */
- public Integer getIntegerProperty(String key);
-
- /**
- * Get a property with a given key from the request.
- *
- * @param key the key of the property
- * @return the value of property
- */
- public Object getObjectProperty(String key);
-
- /**
- * Hook to allow other plugins that implement IRequest to fire a change event.
- * After the internal values have changed, call this method to invoke a request
- * change event to all registered listeners.
- */
- public void fireChangedEvent();
-
- /**
- * Add a resend request to this request.
- *
- * @param request the resend request to add
- */
- public void addResendRequest(IRequest request);
-
- /**
- * Returns an array of resend requests based on this request.
- *
- * @return The array of resend requests based on this request
- */
- public IResendRequest[] getResendRequests();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/IRequestListener.java b/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/IRequestListener.java
deleted file mode 100644
index 02dbb08..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/IRequestListener.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.internet.monitor.core;
-/**
- * A listener for changes to the requests.
- *
- * @since 1.0
- */
-public interface IRequestListener {
- /**
- * The given request has been added to the list.
- *
- * @param request the request that has been added
- */
- public void requestAdded(IRequest request);
-
- /**
- * The given request has been changed.
- *
- * @param request the request that has been changed
- */
- public void requestChanged(IRequest request);
-
- /**
- * The given request is been removed from the list.
- *
- * @param request the request that has been removed
- */
- public void requestRemoved(IRequest request);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/IResendRequest.java b/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/IResendRequest.java
deleted file mode 100644
index 6a6baaa..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/IResendRequest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.internet.monitor.core;
-/**
- * A representation of a request that is to be resent. This interface is not
- * meant to be implemented by clients.
- * <p>
- * Resend requests are used when a client wants to modify and resend a previously
- * monitored request back to the server.
- * </p>
- *
- * @since 1.0
- */
-public interface IResendRequest extends IRequest {
- /**
- * Send the request
- */
- public void sendRequest();
-
- /**
- * Returns <code>true</code> if this request has been sent, and
- * <code>false</code> otherwise.
- *
- * @return <code>true</code> if this request has been sent, <code>false</code> otherwise
- */
- public boolean hasBeenSent();
-
- /**
- * Set the request.
- *
- * @param request the request to set
- * @param type the type of the request to set
- */
- public void setRequest(byte[] request, int type);
-
- /**
- * Get the original request that this request is based on.
- *
- * @return the original request that this request is based on, or
- * <code>null</code> if there is none
- */
- public IRequest getOriginalRequest();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/MonitorCore.java b/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/MonitorCore.java
deleted file mode 100644
index a8c58f5..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/MonitorCore.java
+++ /dev/null
@@ -1,268 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.internet.monitor.core;
-
-import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
-import java.io.InputStreamReader;
-import java.util.List;
-
-import org.eclipse.wst.internet.monitor.core.internal.MonitorManager;
-import org.eclipse.wst.internet.monitor.core.internal.MonitorPlugin;
-import org.eclipse.wst.internet.monitor.core.internal.Trace;
-import org.eclipse.wst.internet.monitor.core.internal.http.ResendHTTPRequest;
-/**
- * Base class for obtaining references to monitor models. This class also provide methods
- * to do operations on a monitor.
- *
- * @since 1.0
- */
-public class MonitorCore {
- /**
- * Protocol adapter id (value "TCPIP") for TCP/IP. Provided here for convenience;
- * other protocol adapters may be available.
- *
- * @see #findProtocolAdapter(String)
- */
- public static String TCPIP_PROTOCOL_ID = "TCPIP";
-
- /**
- * Protocol adapter id (value "HTTP") for HTTP. Provided here for convenience;
- * other protocol adapters may be available.
- *
- * @see #findProtocolAdapter(String)
- */
- public static String HTTP_PROTOCOL_ID = "HTTP";
-
- private static MonitorManager manager = MonitorManager.getInstance();
-
- private static final String lineSeparator = System.getProperty("line.separator");
-
- /**
- * Returns an array of all known monitor instances. The list will not contain any
- * working copies.
- * <p>
- * A new array is returned on each call, so clients may store or modify the result.
- * </p>
- *
- * @return a possibly-empty array of monitor instances {@link IMonitor}
- */
- public static IMonitor[] getMonitors() {
- List list = manager.getMonitors();
- IMonitor[] m = new IMonitor[list.size()];
- list.toArray(m);
- return m;
- }
-
- /**
- * Create a new monitor. The monitor will not exist for use until
- * the save() method has been called.
- *
- * @return a working copy of the created monitor
- */
- public static IMonitorWorkingCopy createMonitor() {
- return manager.createMonitor();
- }
-
- /**
- * Start the given monitor listening on it's client port.
- * The monitor must not be null.
- *
- * @param monitor the monitor to be started
- * @throws Exception thrown if the monitor fails to start because the port
- * is in use or another problem occurs
- */
- public static void startMonitor(IMonitor monitor) throws Exception {
- if (monitor == null)
- throw new IllegalArgumentException();
- manager.startMonitor(monitor);
- }
-
- /**
- * Stop the given monitor and removes all resources.
- * The monitor must not be null.
- *
- * @param monitor the monitor to be stopped
- */
- public static void stopMonitor(IMonitor monitor) {
- if (monitor == null)
- throw new IllegalArgumentException();
- manager.stopMonitor(monitor);
- }
-
- /**
- * Returns an array of all known protocol adapter instances.
- * <p>
- * A new array is returned on each call, so clients may store or modify the result.
- * </p>
- *
- * @return a possibly-empty array of protocol adapter instances {@link IProtocolAdater}
- */
- public static IProtocolAdapter[] getProtocolAdapters() {
- return MonitorPlugin.getInstance().getProtocolAdapters();
- }
-
- /**
- * Returns the protocol adapter with the given id, or <code>null</code>
- * if none. This convenience method searches the list of known
- * protocol adapter ({@link #getProtocolAdapters()}) for the one with a
- * matching id ({@link IProtocolAdater#getId()}). The id may not be null.
- *
- * @param the protocol adapter id
- * @return the protocol adapter instance, or <code>null</code> if there
- * is no protocol adapter with the given id
- */
- public static IProtocolAdapter findProtocolAdapter(String id) {
- return MonitorPlugin.getInstance().getProtocolAdapter(id);
- }
-
- /**
- * Returns an array of all known content filters.
- * <p>
- * A new array is returned on each call, so clients may store or modify the result.
- * </p>
- *
- * @return a possibly-empty array of content filter instances {@link IContentFilter}
- */
- public static IContentFilter[] getContentFilters() {
- return MonitorPlugin.getInstance().getContentFilters();
- }
-
- /**
- * Returns the content filter with the given id, or <code>null</code>
- * if none. This convenience method searches the list of known
- * content filters ({@link #getContentFilters()}) for the one with a
- * matching id ({@link IContentFilter#getId()}). The id may not be null.
- *
- * @param the content filter id
- * @return the content filter instance, or <code>null</code> if there
- * is no content filter with the given id
- */
- public static IContentFilter findContentFilter(String id) {
- return MonitorPlugin.getInstance().getContentFilter(id);
- }
-
- /**
- * Add a monitor listener.
- * Once registered, a listener starts receiving notification of
- * changes to the monitors. The listener continues to receive
- * notifications until it is removed.
- * Has no effect if an identical listener is already registered.
- *
- * @param listener the monitor listener
- * @see #removeMonitorListener(IMonitorListener)
- */
- public static void addMonitorListener(IMonitorListener listener) {
- manager.addMonitorListener(listener);
- }
-
- /**
- * Removes the given monitor listener. Has no
- * effect if the listener is not registered.
- *
- * @param listener the listener
- * @see #addMonitorListener(IMonitorListener)
- */
- public static void removeMonitorListener(IMonitorListener listener) {
- manager.removeMonitorListener(listener);
- }
-
- /**
- * Returns an array of all known request instances.
- * <p>
- * A new array is returned on each call, so clients may store or modify the result.
- * </p>
- *
- * @return a possibly-empty array of request instances {@link IRequest}
- */
- public static IRequest[] getRequests() {
- List list = manager.getRequests();
- IRequest[] r = new IRequest[list.size()];
- list.toArray(r);
- return r;
- }
-
- /**
- * Remove all requests. This method clears all requests and their data
- * from the buffer and notifies the request listeners.
- */
- public static void removeAllRequests() {
- manager.removeAllRequests();
- }
-
- /**
- * Add a request listener.
- * Once registered, a listener starts receiving notification of
- * changes to the requests. The listener continues to receive
- * notifications until it is removed.
- * Has no effect if an identical listener is already registered.
- *
- * @param listener the request listener
- * @see #removeRequestListener(IRequestListener)
- */
- public static void addRequestListener(IRequestListener listener) {
- manager.addRequestListener(listener);
- }
-
- /**
- * Removes the given request listener. Has no
- * effect if the listener is not registered.
- *
- * @param listener the listener
- * @see #addRequestListener(IRequestListener)
- */
- public static void removeRequestListener(IRequestListener listener) {
- manager.removeRequestListener(listener);
- }
-
- /**
- * Convenience method to parse the given bytes into String form. The bytes
- * are parsed into a line delimited string. The byte array must not be null.
- *
- * @param b a byte array
- * @return the string after the conversion
- */
- public static String parse(byte[] b) {
- if (b == null)
- throw new IllegalArgumentException();
-
- ByteArrayInputStream bin = new ByteArrayInputStream(b);
- BufferedReader br = new BufferedReader(new InputStreamReader(bin));
- StringBuffer sb = new StringBuffer();
- try {
- String s = br.readLine();
-
- while (s != null) {
- sb.append(s);
- s = br.readLine();
- if (s != null)
- sb.append(lineSeparator);
- }
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error parsing input", e);
- }
-
- return sb.toString();
- }
-
- /**
- * Create and return an new IResendRequest from the specified request.
- * The request may not be null.
- *
- * @param request the request that is to be resent
- * @return a new IResendRequest based on the specified request
- */
- public static IResendRequest createResendRequest(IRequest request) {
- if (request == null)
- throw new IllegalArgumentException();
- return new ResendHTTPRequest(request);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/ProtocolAdapterDelegate.java b/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/ProtocolAdapterDelegate.java
deleted file mode 100644
index 7b10e7c..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/ProtocolAdapterDelegate.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.internet.monitor.core;
-
-import java.io.IOException;
-import java.net.Socket;
-/**
- * A protocol adapter allows the monitor to support a new protocol between a client
- * and server, and manages the message passing between the two.
- * <p>
- * This abstract class is intended to be extended only by clients
- * to extend the <code>protocolAdapters</code> extension point.
- * </p>
- *
- * @since 1.0
- */
-public abstract class ProtocolAdapterDelegate {
- /**
- * Attaches the protocol adapter to the given monitor using the input and output socket.
- * The adapter is responsible for:
- * * opening the input & output streams to pass information from the input socket
- * (the client) to the output socket (server).
- * * passing information from the output socket (server) back to the client.
- * * creating and populating new org.eclipse.wst.internet.monitor.core.IRequest objects as necessary.
- * * closing/cleanup on the input and output sockets.
- *
- * @param monitor the monitor that uses this protocol adapter
- * @param in the input socket of the monitor client
- * @param out the output socket of the monitor server
- * @throws IOException if an exception occur when opening the streams of the input or
- * output sockets.
- */
- public abstract void connect(IMonitor monitor, Socket in, Socket out) throws IOException;
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/AcceptThread.java b/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/AcceptThread.java
deleted file mode 100644
index 6f1eccb..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/AcceptThread.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.internet.monitor.core.internal;
-
-import java.io.InterruptedIOException;
-import java.net.*;
-
-import org.eclipse.wst.internet.monitor.core.IMonitor;
-/**
- * The actual TCP/IP monitoring server. This is a thread that
- * listens on a port and relays a call to another server.
- */
-public class AcceptThread {
- protected IMonitor monitor;
-
- protected boolean alive = true;
- protected ServerSocket serverSocket;
-
- protected Thread thread;
-
- class ServerThread extends Thread {
- /**
- * Actual running of the server proxy.
- */
- public void run() {
- // create a new server socket
- try {
- serverSocket = new ServerSocket(monitor.getLocalPort());
- serverSocket.setSoTimeout(2000);
-
- Trace.trace(Trace.FINEST, "Monitoring localhost:" + monitor.getLocalPort() + " -> " + monitor.getRemoteHost() + ":" + monitor.getRemotePort());
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Could not start monitoring");
- return;
- }
-
- while (alive) {
- try {
- // accept the connection from the client
- Socket localSocket = serverSocket.accept();
-
- // connect to the remote server
- Socket remoteSocket = new Socket(monitor.getRemoteHost(), monitor.getRemotePort());
-
- // relay the call through
- ProtocolAdapter adapter = (ProtocolAdapter) monitor.getProtocolAdapter();
- adapter.parse(monitor, localSocket, remoteSocket);
- } catch (InterruptedIOException e) {
- // do nothing
- } catch (Exception e) {
- if (alive)
- Trace.trace(Trace.SEVERE, "Error while monitoring", e);
- }
- }
- }
- }
-
- /**
- * ServerMonitorThread constructor comment.
- */
- public AcceptThread(IMonitor monitor) {
- super();
- this.monitor = monitor;
- }
-
- public void startServer() {
- if (thread != null)
- return;
- thread = new ServerThread();
- thread.setDaemon(true);
- thread.start();
- }
-
- public boolean isRunning() {
- return (thread != null);
- }
-
- /**
- * Correctly close the server socket and shut down the server.
- */
- public void stopServer() {
- try {
- alive = false;
- thread = null;
- serverSocket.close();
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error stopping server", e);
- }
- }
-
- /**
- * Returns true if this port is in use.
- *
- * @return boolean
- * @param port int
- */
- public static boolean isPortInUse(int port) {
- ServerSocket s = null;
- try {
- s = new ServerSocket(port);
- } catch (SocketException e) {
- return true;
- } catch (Exception e) {
- return true;
- } finally {
- if (s != null) {
- try {
- s.close();
- } catch (Exception e) {
- // ignore
- }
- }
- }
-
- return false;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/Connection.java b/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/Connection.java
deleted file mode 100644
index a11526d..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/Connection.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package org.eclipse.wst.internet.monitor.core.internal;
-
-import java.net.Socket;
-/**
- *
- */
-public class Connection {
- protected Socket in;
- protected Socket out;
-
- public Connection(Socket in, Socket out) {
- this.in = in;
- this.out = out;
- }
-
- public void close() {
- Trace.trace(Trace.FINEST, "Closing connection");
- try {
- in.getOutputStream().flush();
- in.shutdownInput();
- in.shutdownOutput();
-
- out.getOutputStream().flush();
- out.shutdownInput();
- out.shutdownOutput();
- Trace.trace(Trace.FINEST, "Connection closed");
- } catch (Exception ex) {
- Trace.trace(Trace.WARNING, "Error closing connection " + this + " " + ex.getMessage());
- }
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/ContentFilter.java b/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/ContentFilter.java
deleted file mode 100644
index 43a0a60..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/ContentFilter.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.internet.monitor.core.internal;
-
-import java.io.IOException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.wst.internet.monitor.core.ContentFilterDelegate;
-import org.eclipse.wst.internet.monitor.core.IContentFilter;
-import org.eclipse.wst.internet.monitor.core.IRequest;
-/**
- *
- */
-public class ContentFilter implements IContentFilter {
- protected IConfigurationElement element;
- protected ContentFilterDelegate delegate;
-
- protected ContentFilter(IConfigurationElement element) {
- this.element = element;
- }
-
- public String getId() {
- return element.getAttribute("id");
- }
-
- /*
- * [issue: I couldn't find any place that is using the order]
- */
- public int getOrder() {
- try {
- return Integer.parseInt(element.getAttribute("order"));
- } catch (Exception e) {
- return 0;
- }
- }
-
- public String getName() {
- return element.getAttribute("name");
- }
-
- public byte[] filter(IRequest request, boolean isRequest, byte[] content) throws IOException {
- if (delegate == null) {
- try {
- delegate = (ContentFilterDelegate) element.createExecutableExtension("class");
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Could not create content filter delegate: " + getId(), e);
- return new byte[0];
- }
- }
- return delegate.filter(request, isRequest, content);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/DefaultThread.java b/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/DefaultThread.java
deleted file mode 100644
index 78481a0..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/DefaultThread.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.internet.monitor.core.internal;
-
-import java.io.*;
-/**
- * Monitor server I/O thread.
- */
-public class DefaultThread extends Thread {
- private static final int BUFFER = 2048;
- protected InputStream in;
- protected OutputStream out;
- protected boolean isRequest;
-
- protected Connection conn;
- protected Request request;
-
- /**
- * MonitorThread constructor comment.
- */
- public DefaultThread(Connection conn, Request request, InputStream in, OutputStream out, boolean isRequest) {
- super();
- this.conn = conn;
- this.request = request;
- this.in = in;
- this.out = out;
- this.isRequest = isRequest;
- setPriority(Thread.NORM_PRIORITY + 1);
- setDaemon(true);
- }
-
- /**
- * Listen for input, save it, and pass to the output stream.
- */
- public void run() {
- try {
- byte[] b = new byte[BUFFER];
- int n = in.read(b);
- while (n > 0) {
- out.write(b, 0, n);
- if (b != null && n > 0) {
- byte[] x = null;
- if (n == BUFFER)
- x = b;
- else {
- x = new byte[n];
- System.arraycopy(b, 0, x, 0, n);
- }
- if (isRequest)
- request.addToRequest(x);
- else
- request.addToResponse(x);
- }
- n = in.read(b);
- Thread.yield();
- }
- out.flush();
- } catch (IOException e) {
- // ignore
- } finally {
- request.fireChangedEvent();
- if (!isRequest)
- conn.close();
- }
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/IMemento.java b/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/IMemento.java
deleted file mode 100644
index 40ad571..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/IMemento.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.internet.monitor.core.internal;
-
-import java.util.List;
-/**
- * Interface to a memento used for saving the important state of an object
- * in a form that can be persisted in the file system.
- * <p>
- * Mementos were designed with the following requirements in mind:
- * <ol>
- * <li>Certain objects need to be saved and restored across platform sessions.
- * </li>
- * <li>When an object is restored, an appropriate class for an object might not
- * be available. It must be possible to skip an object in this case.</li>
- * <li>When an object is restored, the appropriate class for the object may be
- * different from the one when the object was originally saved. If so, the
- * new class should still be able to read the old form of the data.</li>
- * </ol>
- * </p>
- * <p>
- * Mementos meet these requirements by providing support for storing a
- * mapping of arbitrary string keys to primitive values, and by allowing
- * mementos to have other mementos as children (arranged into a tree).
- * A robust external storage format based on XML is used.
- * </p><p>
- * The key for an attribute may be any alpha numeric value. However, the
- * value of <code>TAG_ID</code> is reserved for internal use.
- * </p><p>
- * This interface is not intended to be implemented by clients.
- * </p>
- *
- * @see IPersistableElement
- * @see IElementFactory
- */
-public interface IMemento {
- /**
- * Special reserved key used to store the memento id
- * (value <code>"org.eclipse.ui.id"</code>).
- *
- * @see #getId
- */
- public static final String TAG_ID = "IMemento.internal.id"; //$NON-NLS-1$
-
- /**
- * Creates a new child of this memento with the given type.
- * <p>
- * The <code>getChild</code> and <code>getChildren</code> methods
- * are used to retrieve children of a given type.
- * </p>
- *
- * @param type the type
- * @return a new child memento
- * @see #getChild
- * @see #getChildren
- */
- public IMemento createChild(String type);
-
- /**
- * Creates a new child of this memento with the given type and id.
- * The id is stored in the child memento (using a special reserved
- * key, <code>TAG_ID</code>) and can be retrieved using <code>getId</code>.
- * <p>
- * The <code>getChild</code> and <code>getChildren</code> methods
- * are used to retrieve children of a given type.
- * </p>
- *
- * @param type the type
- * @param id the child id
- * @return a new child memento with the given type and id
- * @see #getId
- */
- public IMemento createChild(String type, String id);
-
- /**
- * Returns the first child with the given type id.
- *
- * @param type the type id
- * @return the first child with the given type
- */
- public IMemento getChild(String type);
-
- /**
- * Returns all children with the given type id.
- *
- * @param type the type id
- * @return the list of children with the given type
- */
- public IMemento[] getChildren(String type);
-
- /**
- * Returns the floating point value of the given key.
- *
- * @param key the key
- * @return the value, or <code>null</code> if the key was not found or was found
- * but was not a floating point number
- */
- public Float getFloat(String key);
-
- /**
- * Returns the id for this memento.
- *
- * @return the memento id, or <code>null</code> if none
- * @see #createChild(java.lang.String,java.lang.String)
- */
- public String getId();
-
- /**
- * Returns the name for this memento.
- *
- * @return the memento name, or <code>null</code> if none
- * @see #createChild(java.lang.String,java.lang.String)
- */
- public String getName();
-
- /**
- * Returns the integer value of the given key.
- *
- * @param key the key
- * @return the value, or <code>null</code> if the key was not found or was found
- * but was not an integer
- */
- public Integer getInteger(String key);
-
- /**
- * Returns the string value of the given key.
- *
- * @param key the key
- * @return the value, or <code>null</code> if the key was not found or was found
- * but was not an integer
- */
- public String getString(String key);
-
- /**
- * Returns the boolean value of the given key.
- *
- * @param key the key
- * @return the value, or <code>null</code> if the key was not found or was found
- * but was not a boolean
- */
- public Boolean getBoolean(String key);
-
- public List getNames();
-
- /**
- * Sets the value of the given key to the given floating point number.
- *
- * @param key the key
- * @param value the value
- */
- public void putFloat(String key, float value);
-
- /**
- * Sets the value of the given key to the given integer.
- *
- * @param key the key
- * @param value the value
- */
- public void putInteger(String key, int value);
-
- /**
- * Sets the value of the given key to the given boolean value.
- *
- * @param key the key
- * @param value the value
- */
- public void putBoolean(String key, boolean value);
-
- /**
- * Copy the attributes and children from <code>memento</code>
- * to the receiver.
- *
- * @param memento the IMemento to be copied.
- */
- public void putMemento(IMemento memento);
-
- /**
- * Sets the value of the given key to the given string.
- *
- * @param key the key
- * @param value the value
- */
- public void putString(String key, String value);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/Monitor.java b/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/Monitor.java
deleted file mode 100644
index b191bc5..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/Monitor.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.internet.monitor.core.internal;
-
-import org.eclipse.wst.internet.monitor.core.*;
-/**
- *
- */
-public class Monitor implements IMonitor {
- private static final String MEMENTO_ID = "id";
- private static final String MEMENTO_LOCAL_PORT = "local-port";
- private static final String MEMENTO_REMOTE_HOST = "remote-host";
- private static final String MEMENTO_REMOTE_PORT = "remote-port";
- private static final String MEMENTO_TYPE_ID = "type-id";
-
- protected String id;
- protected String remoteHost;
- protected int remotePort = 80;
- protected int localPort = 80;
- protected IProtocolAdapter type;
-
- public Monitor() {
- type = MonitorPlugin.getInstance().getDefaultType();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.internet.monitor.internal.IMonitor#getId()
- */
- public String getId() {
- return id;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.internet.monitor.internal.IMonitor#getRemoteHost()
- */
- public String getRemoteHost() {
- return remoteHost;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.internet.monitor.internal.IMonitor#getRemotePort()
- */
- public int getRemotePort() {
- return remotePort;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.internet.monitor.internal.IMonitor#getLocalPort()
- */
- public int getLocalPort() {
- return localPort;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.internet.monitor.internal.IMonitor#isHTTPEnabled()
- */
- public IProtocolAdapter getProtocolAdapter() {
- return type;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.internet.monitor.internal.IMonitor#isRunning()
- */
- public boolean isRunning() {
- return MonitorManager.getInstance().isRunning(this);
- }
-
- public void delete() {
- MonitorManager.getInstance().removeMonitor(this);
- }
-
- public boolean isWorkingCopy() {
- return false;
- }
-
- public IMonitorWorkingCopy getWorkingCopy() {
- return new MonitorWorkingCopy(this);
- }
-
- protected void setInternal(IMonitor monitor) {
- id = monitor.getId();
- remoteHost = monitor.getRemoteHost();
- remotePort = monitor.getRemotePort();
- localPort = monitor.getLocalPort();
- type = monitor.getProtocolAdapter();
- }
-
- protected void save(IMemento memento) {
- memento.putString(MEMENTO_ID, id);
- memento.putString(MEMENTO_TYPE_ID, type.getId());
- memento.putInteger(MEMENTO_LOCAL_PORT, localPort);
- memento.putString(MEMENTO_REMOTE_HOST, remoteHost);
- memento.putInteger(MEMENTO_REMOTE_PORT, remotePort);
- }
-
- protected void load(IMemento memento) {
- id = memento.getString(MEMENTO_ID);
- type = MonitorPlugin.getInstance().getProtocolAdapter(memento.getString(MEMENTO_TYPE_ID));
- Integer temp = memento.getInteger(MEMENTO_LOCAL_PORT);
- if (temp != null)
- localPort = temp.intValue();
- remoteHost = memento.getString(MEMENTO_REMOTE_HOST);
- temp = memento.getInteger(MEMENTO_REMOTE_PORT);
- if (temp != null)
- remotePort = temp.intValue();
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/MonitorManager.java b/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/MonitorManager.java
deleted file mode 100644
index 2e87eba..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/MonitorManager.java
+++ /dev/null
@@ -1,301 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.internet.monitor.core.internal;
-
-import java.io.ByteArrayInputStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.wst.internet.monitor.core.*;
-/**
- *
- */
-public class MonitorManager {
- private static final int ADD = 0;
- private static final int CHANGE = 1;
- private static final int REMOVE = 2;
-
- // monitors
- protected List monitors;
- protected Map threads = new HashMap();
-
- protected List monitorListeners = new ArrayList();
-
- // requests
- protected List requests = new ArrayList();
-
- protected List requestListeners = new ArrayList();
-
- private Preferences.IPropertyChangeListener pcl;
- protected boolean ignorePreferenceChanges = false;
-
- protected static MonitorManager instance;
-
- public static MonitorManager getInstance() {
- if (instance == null)
- instance = new MonitorManager();
- return instance;
- }
-
- private MonitorManager() {
- loadMonitors();
-
- pcl = new Preferences.IPropertyChangeListener() {
- public void propertyChange(Preferences.PropertyChangeEvent event) {
- if (ignorePreferenceChanges)
- return;
- String property = event.getProperty();
- if (property.equals("monitors")) {
- loadMonitors();
- }
- }
- };
-
- MonitorPlugin.getInstance().getPluginPreferences().addPropertyChangeListener(pcl);
- }
-
- protected void dispose() {
- MonitorPlugin.getInstance().getPluginPreferences().removePropertyChangeListener(pcl);
- }
-
- public IMonitorWorkingCopy createMonitor() {
- return new MonitorWorkingCopy();
- }
-
- public List getMonitors() {
- return new ArrayList(monitors);
- }
-
- protected void addMonitor(IMonitor monitor) {
- if (!monitors.contains(monitor))
- monitors.add(monitor);
- fireMonitorEvent(monitor, ADD);
- saveMonitors();
- }
-
- protected boolean isRunning(IMonitor monitor) {
- return (threads.get(monitor) != null);
- }
-
- public void startMonitor(IMonitor monitor) throws Exception {
- if (!monitors.contains(monitor))
- return;
-
- if (AcceptThread.isPortInUse(monitor.getLocalPort()))
- throw new Exception(MonitorPlugin.getString("%errorPortInUse"));
-
- AcceptThread thread = new AcceptThread(monitor);
- thread.startServer();
- threads.put(monitor, thread);
- }
-
- public void stopMonitor(IMonitor monitor) {
- if (!monitors.contains(monitor))
- return;
-
- AcceptThread thread = (AcceptThread) threads.get(monitor);
- if (thread != null) {
- thread.stopServer();
- threads.remove(monitor);
- }
- }
-
- protected void removeMonitor(IMonitor monitor) {
- if (monitor.isRunning())
- stopMonitor(monitor);
- monitors.remove(monitor);
- fireMonitorEvent(monitor, REMOVE);
- saveMonitors();
- }
-
- protected void monitorChanged(IMonitor monitor) {
- fireMonitorEvent(monitor, CHANGE);
- saveMonitors();
- }
-
- /**
- * Add monitor listener.
- *
- * @param listener
- */
- public void addMonitorListener(IMonitorListener listener) {
- monitorListeners.add(listener);
- }
-
- /**
- * Remove monitor listener.
- *
- * @param listener
- */
- public void removeMonitorListener(IMonitorListener listener) {
- monitorListeners.remove(listener);
- }
-
- /**
- * Fire a monitor event.
- * @param rr
- * @param type
- */
- protected void fireMonitorEvent(IMonitor monitor, int type) {
- Object[] obj = monitorListeners.toArray();
-
- int size = obj.length;
- for (int i = 0; i < size; i++) {
- IMonitorListener listener = (IMonitorListener) obj[i];
- if (type == ADD)
- listener.monitorAdded(monitor);
- else if (type == CHANGE)
- listener.monitorChanged(monitor);
- else if (type == REMOVE)
- listener.monitorRemoved(monitor);
- }
- }
-
- /**
- * Returns a list of the current requests.
- *
- * @return java.util.List
- */
- public List getRequests() {
- return requests;
- }
-
- /**
- * Add a new request response pair.
- *
- * @param pair org.eclipse.tcpip.monitor.RequestResponse
- */
- public void addRequest(IRequest rr) {
- if (requests.contains(rr))
- return;
-
- requests.add(rr);
- fireRequestEvent(rr, ADD);
- }
-
- public void requestChanged(IRequest rr) {
- fireRequestEvent(rr, CHANGE);
- }
-
- public void removeRequest(IRequest rr) {
- if (!requests.contains(rr))
- return;
-
- requests.remove(rr);
- fireRequestEvent(rr, REMOVE);
- }
-
- public void removeAllRequests() {
- int size = requests.size();
- IRequest[] rrs = new IRequest[size];
- requests.toArray(rrs);
-
- for (int i = 0; i < size; i++) {
- removeRequest(rrs[i]);
- }
- }
-
- /**
- * Add request listener.
- *
- * @param listener
- */
- public void addRequestListener(IRequestListener listener) {
- requestListeners.add(listener);
- }
-
- /**
- * Remove request listener.
- *
- * @param listener
- */
- public void removeRequestListener(IRequestListener listener) {
- requestListeners.remove(listener);
- }
-
- /**
- * Fire a request event.
- * @param rr
- * @param type
- */
- protected void fireRequestEvent(IRequest rr, int type) {
- int size = requestListeners.size();
- IRequestListener[] xrl = MonitorPlugin.getInstance().getRequestListeners();
- int size2 = xrl.length;
-
- IRequestListener[] rl = new IRequestListener[size + size2];
- System.arraycopy(xrl, 0, rl, 0, size2);
- for (int i = 0; i < size; i++)
- rl[size2 + i] = (IRequestListener) requestListeners.get(i);
-
- for (int i = 0; i < size + size2; i++) {
- IRequestListener listener = rl[i];
- if (type == ADD)
- listener.requestAdded(rr);
- else if (type == CHANGE)
- listener.requestChanged(rr);
- else if (type == REMOVE)
- listener.requestRemoved(rr);
- }
- }
-
- protected void loadMonitors() {
- Trace.trace(Trace.FINEST, "Loading monitors");
-
- monitors = new ArrayList();
- Preferences prefs = MonitorPlugin.getInstance().getPluginPreferences();
- String xmlString = prefs.getString("monitors");
- if (xmlString != null && xmlString.length() > 0) {
- try {
- ByteArrayInputStream in = new ByteArrayInputStream(xmlString.getBytes());
- IMemento memento = XMLMemento.loadMemento(in);
-
- IMemento[] children = memento.getChildren("monitor");
- if (children != null) {
- int size = children.length;
- for (int i = 0; i < size; i++) {
- Monitor monitor = new Monitor();
- monitor.load(children[i]);
- monitors.add(monitor);
- }
- }
- } catch (Exception e) {
- Trace.trace(Trace.WARNING, "Could not load monitors: " + e.getMessage());
- }
- }
- }
-
- protected void saveMonitors() {
- try {
- ignorePreferenceChanges = true;
- XMLMemento memento = XMLMemento.createWriteRoot("monitors");
-
- Iterator iterator = monitors.iterator();
- while (iterator.hasNext()) {
- Monitor monitor = (Monitor) iterator.next();
- IMemento child = memento.createChild("monitor");
- monitor.save(child);
- }
-
- String xmlString = memento.saveToString();
- Preferences prefs = MonitorPlugin.getInstance().getPluginPreferences();
- prefs.setValue("monitors", xmlString);
- MonitorPlugin.getInstance().savePluginPreferences();
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Could not save browsers", e);
- }
- ignorePreferenceChanges = false;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/MonitorPlugin.java b/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/MonitorPlugin.java
deleted file mode 100644
index 370920f..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/MonitorPlugin.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.internet.monitor.core.internal;
-
-import java.util.*;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.wst.internet.monitor.core.IContentFilter;
-import org.eclipse.wst.internet.monitor.core.IProtocolAdapter;
-import org.eclipse.wst.internet.monitor.core.IRequestListener;
-/**
- * The monitor core plugin.
- */
-public class MonitorPlugin extends Plugin {
- public static final String PLUGIN_ID = "org.eclipse.wst.internet.monitor.core";
-
- private static MonitorPlugin singleton;
-
- protected Map protocolAdapters;
- protected Map contentFilters;
- protected IRequestListener[] requestListeners;
-
- /**
- * MonitorPlugin constructor comment.
- */
- public MonitorPlugin() {
- super();
- singleton = this;
- loadProtocolAdapters();
- loadContentFilters();
- }
-
- /**
- * Returns the singleton instance of this plugin.
- *
- * @return org.eclipse.wst.internet.monitor.core.MonitorPlugin
- */
- public static MonitorPlugin getInstance() {
- return singleton;
- }
-
- /**
- * Returns the translated String found with the given key.
- *
- * @return java.lang.String
- * @param key java.lang.String
- */
- public static String getString(String key) {
- try {
- return Platform.getResourceString(getInstance().getBundle(), key);
- } catch (Exception e) {
- return key;
- }
- }
-
- public IProtocolAdapter getDefaultType() {
- return (ProtocolAdapter) protocolAdapters.get("HTTP");
- }
-
- public IProtocolAdapter getProtocolAdapter(String id) {
- return (ProtocolAdapter) protocolAdapters.get(id);
- }
-
- public IProtocolAdapter[] getProtocolAdapters() {
- List list = new ArrayList();
- Iterator iterator = protocolAdapters.values().iterator();
- while (iterator.hasNext()) {
- list.add(iterator.next());
- }
- IProtocolAdapter[] types = new IProtocolAdapter[list.size()];
- list.toArray(types);
- return types;
- }
-
- public IContentFilter[] getContentFilters() {
- List list = new ArrayList();
- Iterator iterator = contentFilters.values().iterator();
- while (iterator.hasNext()) {
- list.add(iterator.next());
- }
- IContentFilter[] cf = new IContentFilter[list.size()];
- list.toArray(cf);
- return cf;
- }
-
- public IContentFilter getContentFilter(String id) {
- return (IContentFilter) contentFilters.get(id);
- }
-
- public IRequestListener[] getRequestListeners() {
- if (requestListeners == null)
- loadRequestListeners();
- return requestListeners;
- }
-
- protected synchronized void loadProtocolAdapters() {
- if (protocolAdapters != null)
- return;
- Trace.trace(Trace.CONFIG, "Loading protocol adapters");
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IConfigurationElement[] cf = registry.getConfigurationElementsFor(MonitorPlugin.PLUGIN_ID, "protocolAdapters");
-
- int size = cf.length;
- protocolAdapters = new HashMap(size);
- for (int i = 0; i < size; i++) {
- String id = cf[i].getAttribute("id");
- Trace.trace(Trace.CONFIG, "Loading adapter: " + id);
- protocolAdapters.put(id, new ProtocolAdapter(cf[i]));
- }
- }
-
- protected synchronized void loadContentFilters() {
- if (contentFilters != null)
- return;
- Trace.trace(Trace.CONFIG, "Loading content filters");
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IConfigurationElement[] cf = registry.getConfigurationElementsFor(MonitorPlugin.PLUGIN_ID, "contentFilters");
-
- int size = cf.length;
- contentFilters = new HashMap(size);
- for (int i = 0; i < size; i++) {
- String id = cf[i].getAttribute("id");
- Trace.trace(Trace.CONFIG, "Loading filter: " + id);
- contentFilters.put(id, new ContentFilter(cf[i]));
- }
- }
-
- protected synchronized void loadRequestListeners() {
- if (requestListeners != null)
- return;
- Trace.trace(Trace.CONFIG, "Loading request listeners");
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IConfigurationElement[] cf = registry.getConfigurationElementsFor(MonitorPlugin.PLUGIN_ID, "requestListeners");
-
- int size = cf.length;
- List list = new ArrayList();
- for (int i = 0; i < size; i++) {
- String id = cf[i].getAttribute("id");
- Trace.trace(Trace.CONFIG, "Loading request listener: " + id);
- try {
- IRequestListener rl = (IRequestListener) cf[i].createExecutableExtension("class");
- list.add(rl);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Could not create request listener: " + id, e);
- return;
- }
- }
-
- size = list.size();
- requestListeners = new IRequestListener[size];
- list.toArray(requestListeners);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/MonitorWorkingCopy.java b/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/MonitorWorkingCopy.java
deleted file mode 100644
index 460ef28..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/MonitorWorkingCopy.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.internet.monitor.core.internal;
-
-import org.eclipse.wst.internet.monitor.core.*;
-/**
- *
- */
-public class MonitorWorkingCopy extends Monitor implements IMonitorWorkingCopy {
- protected Monitor monitor;
-
- // creation
- public MonitorWorkingCopy() {
- // do nothing
- }
-
- // working copy
- public MonitorWorkingCopy(Monitor monitor) {
- this.monitor = monitor;
- setInternal(monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.internet.monitor.internal.IMonitorWorkingCopy#setRemoteHost(java.lang.String)
- */
- public void setId(String newId) {
- id = newId;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.internet.monitor.internal.IMonitorWorkingCopy#setRemoteHost(java.lang.String)
- */
- public void setRemoteHost(String host) {
- remoteHost = host;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.internet.monitor.internal.IMonitorWorkingCopy#setRemotePort(int)
- */
- public void setRemotePort(int port) {
- remotePort = port;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.internet.monitor.internal.IMonitorWorkingCopy#setLocalPort(int)
- */
- public void setLocalPort(int port) {
- localPort = port;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.internet.monitor.internal.IMonitorWorkingCopy#setProtocolAdapter(IProtocolAdapter)
- */
- public void setProtocolAdapter(IProtocolAdapter protocolAdapter) {
- type = protocolAdapter;
- }
-
- public boolean isWorkingCopy() {
- return true;
- }
-
- public IMonitorWorkingCopy getWorkingCopy() {
- return this;
- }
-
- public IMonitor save() {
- MonitorManager mm = MonitorManager.getInstance();
- if (monitor != null) {
- //boolean restart = false;
- if (monitor.isRunning()) {
- //restart = true;
- mm.stopMonitor(monitor);
- }
- monitor.setInternal(this);
- mm.monitorChanged(monitor);
- //if (restart)
- // mm.startMonitor(monitor);
- } else {
- monitor = new Monitor();
- monitor.setInternal(this);
- mm.addMonitor(monitor);
- }
- return monitor;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/ProtocolAdapter.java b/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/ProtocolAdapter.java
deleted file mode 100644
index bf8da15..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/ProtocolAdapter.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.internet.monitor.core.internal;
-
-import java.io.IOException;
-import java.net.Socket;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.wst.internet.monitor.core.IMonitor;
-import org.eclipse.wst.internet.monitor.core.IProtocolAdapter;
-import org.eclipse.wst.internet.monitor.core.ProtocolAdapterDelegate;
-/**
- *
- */
-public class ProtocolAdapter implements IProtocolAdapter {
- protected IConfigurationElement element;
- protected ProtocolAdapterDelegate delegate;
-
- protected ProtocolAdapter(IConfigurationElement element) {
- this.element = element;
- }
-
- public String getId() {
- return element.getAttribute("id");
- }
-
- public String getName() {
- return element.getAttribute("name");
- }
-
- public void parse(IMonitor monitor, Socket in, Socket out) throws IOException {
- if (delegate == null) {
- try {
- delegate = (ProtocolAdapterDelegate) element.createExecutableExtension("class");
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Could not create protocol adapter delegate: " + getId(), e);
- return;
- }
- }
- delegate.connect(monitor, in, out);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/Request.java b/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/Request.java
deleted file mode 100644
index b483973..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/Request.java
+++ /dev/null
@@ -1,294 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.internet.monitor.core.internal;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Properties;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.wst.internet.monitor.core.IProtocolAdapter;
-import org.eclipse.wst.internet.monitor.core.IRequest;
-import org.eclipse.wst.internet.monitor.core.IResendRequest;
-/**
- * A single TCP/IP request/response pair.
- */
-public class Request implements IRequest {
- protected Date date;
- protected long responseTime = -1;
- protected int localPort;
- protected String remoteHost;
- protected int remotePort;
- protected byte[] request;
- protected byte[] response;
-
- protected String label;
- protected IProtocolAdapter type;
-
- protected Properties properties;
-
- protected List resendRequests = new ArrayList();
-
-
- /**
- * RequestResponse constructor comment.
- */
- public Request(IProtocolAdapter type, int localPort, String remoteHost, int remotePort) {
- super();
- this.type = type;
- this.localPort = localPort;
- this.remoteHost = remoteHost;
- this.remotePort = remotePort;
- date = new Date();
- properties = new Properties();
- MonitorManager.getInstance().addRequest(this);
- }
-
- public IProtocolAdapter getProtocolAdapter() {
- return type;
- }
-
- /**
- * Add to the request.
- *
- * @param addRequest byte[]
- */
- public void addToRequest(byte[] addRequest) {
- if (addRequest == null || addRequest.length == 0)
- return;
-
- if (request == null || request.length == 0) {
- setRequest(addRequest);
- return;
- }
-
- int size = request.length + addRequest.length;
- byte[] b = new byte[size];
- System.arraycopy(request, 0, b, 0, request.length);
- System.arraycopy(addRequest, 0, b, request.length, addRequest.length);
- request = b;
- }
-
- /**
- * Add to the response.
- *
- * @param addResponse byte[]
- */
- public void addToResponse(byte[] addResponse) {
- if (addResponse == null || addResponse.length == 0)
- return;
-
- if (response == null || response.length == 0) {
- setResponse(addResponse);
- return;
- }
-
- int size = response.length + addResponse.length;
- byte[] b = new byte[size];
- System.arraycopy(response, 0, b, 0, response.length);
- System.arraycopy(addResponse, 0, b, response.length, addResponse.length);
- response = b;
- }
-
- /**
- * Return the date/time of this request.
- *
- * @return java.util.Date
- */
- public Date getDate() {
- return date;
- }
-
- /**
- * Returns the local port.
- *
- * @return int
- */
- public int getLocalPort() {
- return localPort;
- }
-
- /**
- * Returns the remote host.
- *
- * @return java.lang.String
- */
- public String getRemoteHost() {
- return remoteHost;
- }
-
- /**
- * Returns the remote port.
- *
- * @return int
- */
- public int getRemotePort() {
- return remotePort;
- }
-
- /**
- * Returns the request as a byte array.
- *
- * @return byte[]
- */
- public byte[] getRequest(int type2) {
- return request;
- }
-
- /**
- * Returns the response as a byte array.
- *
- * @return byte[]
- */
- public byte[] getResponse(int type2) {
- return response;
- }
-
- /**
- * Returns the response time in milliseconds.
- *
- * @return long
- */
- public long getResponseTime() {
- return responseTime;
- }
-
- /**
- * Returns the title, if one exists.
- *
- * @return java.lang.String
- */
- public String getLabel() {
- if (label == null)
- return getRemoteHost() + ":" + getRemotePort();
-
- return label;
- }
-
- /**
- * Set the request.
- *
- * @param request byte[]
- */
- protected void setRequest(byte[] request) {
- if (request == null || request.length == 0)
- return;
-
- this.request = request;
-
- MonitorManager.getInstance().requestChanged(this);
- }
-
- /**
- * Set the response.
- *
- * @param response byte[]
- */
- protected void setResponse(byte[] response) {
- if (response == null || response.length == 0)
- return;
-
- this.response = response;
-
- responseTime = System.currentTimeMillis() - date.getTime();
-
- MonitorManager.getInstance().requestChanged(this);
- }
-
- /**
- * Sets the title.
- *
- * @param s java.lang.String
- */
- public void setLabel(String s) {
- // property can only be set once
- if (label != null)
- return;
-
- label = s;
- MonitorManager.getInstance().requestChanged(this);
- }
-
- /**
- *
- */
- public void addProperty(String key, Object value) {
- try {
- if (properties.containsKey(key))
- properties.remove(key);
- properties.put(key, value);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Could not add property", e);
- }
- }
-
- /**
- *
- */
- public String getStringProperty(String key) {
- try {
- return (String) properties.get(key);
- } catch (Exception e) {
- return "";
- }
- }
-
- /**
- *
- */
- public Integer getIntegerProperty(String key) {
- try {
- return (Integer) properties.get(key);
- } catch (Exception e) {
- return null;
- }
- }
-
- /**
- *
- */
- public Object getObjectProperty(String key) {
- try {
- return properties.get(key);
- } catch (Exception e) {
- return null;
- }
- }
-
- public void fireChangedEvent() {
- MonitorManager.getInstance().requestChanged(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.internet.monitor.core.IRequest#addResendRequest(org.eclipse.wst.internet.monitor.core.IRequest)
- */
- public void addResendRequest(IRequest resendReq) {
- if (resendReq != null)
- resendRequests.add(resendReq);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.internet.monitor.core.IRequest#getResendRequests()
- */
- public IResendRequest[] getResendRequests() {
- IResendRequest[] rr = new IResendRequest[resendRequests.size()];
- resendRequests.toArray(rr);
- return rr;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- return Platform.getAdapterManager().getAdapter(this, adapter);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/SocketWrapper.java b/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/SocketWrapper.java
deleted file mode 100644
index 7d0e17b..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/SocketWrapper.java
+++ /dev/null
@@ -1,346 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.internet.monitor.core.internal;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.InetAddress;
-import java.net.Socket;
-import java.net.SocketAddress;
-import java.net.SocketException;
-import java.nio.channels.SocketChannel;
-/**
- * A socket that is only used for resending requests. All input operations are
- * ignored.
- */
-public class SocketWrapper extends Socket {
- private InputStream inputStream;
- private OutputStream outputStream;
-
- public SocketWrapper(InputStream inputStream) {
- this.inputStream = inputStream;
- this.outputStream = new DummyOutputStream();
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#bind(java.net.SocketAddress)
- */
- public void bind(SocketAddress arg0) throws IOException {
- // do nothing
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#close()
- */
- public synchronized void close() throws IOException {
- // do nothing
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#connect(java.net.SocketAddress, int)
- */
- public void connect(SocketAddress arg0, int arg1) throws IOException {
- // do nothing
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#connect(java.net.SocketAddress)
- */
- public void connect(SocketAddress arg0) throws IOException {
- // do nothing
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#getChannel()
- */
- public SocketChannel getChannel() {
- return super.getChannel();
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#getInetAddress()
- */
- public InetAddress getInetAddress() {
- return super.getInetAddress();
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#getInputStream()
- */
- public InputStream getInputStream() throws IOException {
- return inputStream;
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#getKeepAlive()
- */
- public boolean getKeepAlive() throws SocketException {
- return false;
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#getLocalAddress()
- */
- public InetAddress getLocalAddress() {
- return super.getLocalAddress();
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#getLocalPort()
- */
- public int getLocalPort() {
- return super.getLocalPort();
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#getLocalSocketAddress()
- */
- public SocketAddress getLocalSocketAddress() {
- return super.getLocalSocketAddress();
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#getOOBInline()
- */
- public boolean getOOBInline() throws SocketException {
- return super.getOOBInline();
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#getOutputStream()
- */
- public OutputStream getOutputStream() throws IOException {
- return outputStream;
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#getPort()
- */
- public int getPort() {
- return super.getPort();
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#getReceiveBufferSize()
- */
- public synchronized int getReceiveBufferSize() throws SocketException {
- return super.getReceiveBufferSize();
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#getRemoteSocketAddress()
- */
- public SocketAddress getRemoteSocketAddress() {
- return super.getRemoteSocketAddress();
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#getReuseAddress()
- */
- public boolean getReuseAddress() throws SocketException {
- return super.getReuseAddress();
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#getSendBufferSize()
- */
- public synchronized int getSendBufferSize() throws SocketException {
- return super.getSendBufferSize();
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#getSoLinger()
- */
- public int getSoLinger() throws SocketException {
- return super.getSoLinger();
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#getSoTimeout()
- */
- public synchronized int getSoTimeout() throws SocketException {
- return super.getSoTimeout();
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#getTcpNoDelay()
- */
- public boolean getTcpNoDelay() throws SocketException {
- return super.getTcpNoDelay();
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#getTrafficClass()
- */
- public int getTrafficClass() throws SocketException {
- return super.getTrafficClass();
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#isBound()
- */
- public boolean isBound() {
- return super.isBound();
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#isClosed()
- */
- public boolean isClosed() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#isConnected()
- */
- public boolean isConnected() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#isInputShutdown()
- */
- public boolean isInputShutdown() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#isOutputShutdown()
- */
- public boolean isOutputShutdown() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#sendUrgentData(int)
- */
- public void sendUrgentData(int arg0) throws IOException {
- super.sendUrgentData(arg0);
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#setKeepAlive(boolean)
- */
- public void setKeepAlive(boolean arg0) throws SocketException {
- super.setKeepAlive(arg0);
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#setOOBInline(boolean)
- */
- public void setOOBInline(boolean arg0) throws SocketException {
- super.setOOBInline(arg0);
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#setReceiveBufferSize(int)
- */
- public synchronized void setReceiveBufferSize(int arg0) throws SocketException {
- super.setReceiveBufferSize(arg0);
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#setReuseAddress(boolean)
- */
- public void setReuseAddress(boolean arg0) throws SocketException {
- super.setReuseAddress(arg0);
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#setSendBufferSize(int)
- */
- public synchronized void setSendBufferSize(int arg0) throws SocketException {
- super.setSendBufferSize(arg0);
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#setSoLinger(boolean, int)
- */
- public void setSoLinger(boolean arg0, int arg1) throws SocketException {
- super.setSoLinger(arg0, arg1);
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#setSoTimeout(int)
- */
- public synchronized void setSoTimeout(int arg0) throws SocketException {
- super.setSoTimeout(arg0);
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#setTcpNoDelay(boolean)
- */
- public void setTcpNoDelay(boolean arg0) throws SocketException {
- super.setTcpNoDelay(arg0);
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#setTrafficClass(int)
- */
- public void setTrafficClass(int arg0) throws SocketException {
- super.setTrafficClass(arg0);
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#shutdownInput()
- */
- public void shutdownInput() throws IOException {
- inputStream.close();
- }
-
- /* (non-Javadoc)
- * @see java.net.Socket#shutdownOutput()
- */
- public void shutdownOutput() throws IOException {
- // do nothing
- }
-
- /**
- * A dummy OutputStream that allows us to fake output for a socket.
- */
- public class DummyOutputStream extends OutputStream {
- /* (non-Javadoc)
- * @see java.io.OutputStream#close()
- */
- public void close() throws IOException {
- // do nothing
- }
-
- /* (non-Javadoc)
- * @see java.io.OutputStream#flush()
- */
- public void flush() throws IOException {
- // do nothing
- }
-
- /* (non-Javadoc)
- * @see java.io.OutputStream#write(byte[], int, int)
- */
- public void write(byte[] arg0, int arg1, int arg2) throws IOException {
- // do nothing
- }
-
- /* (non-Javadoc)
- * @see java.io.OutputStream#write(byte[])
- */
- public void write(byte[] arg0) throws IOException {
- // do nothing
- }
-
- /* (non-Javadoc)
- * @see java.io.OutputStream#write(int)
- */
- public void write(int arg0) throws IOException {
- // do nothing
- }
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/TCPIPProtocolAdapter.java b/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/TCPIPProtocolAdapter.java
deleted file mode 100644
index b719157..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/TCPIPProtocolAdapter.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.internet.monitor.core.internal;
-
-import java.io.IOException;
-import java.net.Socket;
-
-import org.eclipse.wst.internet.monitor.core.IMonitor;
-import org.eclipse.wst.internet.monitor.core.MonitorCore;
-import org.eclipse.wst.internet.monitor.core.ProtocolAdapterDelegate;
-/**
- *
- */
-public class TCPIPProtocolAdapter extends ProtocolAdapterDelegate {
- public void connect(IMonitor monitor, Socket in, Socket out) throws IOException {
- Request request = new Request(MonitorCore.findProtocolAdapter("TCPIP"), monitor.getLocalPort(), monitor.getRemoteHost(), monitor.getRemotePort());
- Connection conn = new Connection(in, out);
- DefaultThread requestThread = new DefaultThread(conn, request, in.getInputStream(), out.getOutputStream(), true);
- requestThread.start();
- new DefaultThread(conn, request, out.getInputStream(), in.getOutputStream(), false).start();
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/Trace.java b/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/Trace.java
deleted file mode 100644
index 82c684a..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/Trace.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.internet.monitor.core.internal;
-/**
- * Helper class to route trace output.
- */
-public class Trace {
- public static byte CONFIG = 0;
- public static byte WARNING = 1;
- public static byte SEVERE = 2;
- public static byte FINEST = 3;
-
- public static byte PARSING = 4;
-
- /**
- * Trace constructor comment.
- */
- private Trace() {
- super();
- }
-
- /**
- * Trace the given text.
- *
- * @param s java.lang.String
- */
- public static void trace(byte level, String s) {
- trace(level, s, null);
- }
-
- /**
- * Trace the given message and exception.
- *
- * @param s java.lang.String
- * @param t java.lang.Throwable
- */
- public static void trace(byte level, String s, Throwable t) {
- if (!MonitorPlugin.getInstance().isDebugging())
- return;
-
- System.out.println(System.currentTimeMillis() + " " + s);
- if (t != null)
- t.printStackTrace();
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/XMLMemento.java b/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/XMLMemento.java
deleted file mode 100644
index a3d0067..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/XMLMemento.java
+++ /dev/null
@@ -1,460 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.internet.monitor.core.internal;
-
-import java.io.*;
-import java.util.*;
-import java.net.URL;
-import org.w3c.dom.*;
-import org.xml.sax.*;
-
-import javax.xml.parsers.*;
-import javax.xml.transform.*;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-/**
- * A Memento is a class independent container for persistence
- * info. It is a reflection of 3 storage requirements.
- *
- * 1) We need the ability to persist an object and restore it.
- * 2) The class for an object may be absent. If so we would
- * like to skip the object and keep reading.
- * 3) The class for an object may change. If so the new class
- * should be able to read the old persistence info.
- *
- * We could ask the objects to serialize themselves into an
- * ObjectOutputStream, DataOutputStream, or Hashtable. However
- * all of these approaches fail to meet the second requirement.
- *
- * Memento supports binary persistance with a version ID.
- */
-public final class XMLMemento implements IMemento {
- private Document factory;
- private Element element;
-
- /**
- * Answer a memento for the document and element. For simplicity
- * you should use createReadRoot and createWriteRoot to create the initial
- * mementos on a document.
- */
- public XMLMemento(Document doc, Element el) {
- factory = doc;
- element = el;
- }
-
- /**
- * @see IMemento.
- */
- public IMemento createChild(String type) {
- Element child = factory.createElement(type);
- element.appendChild(child);
- return new XMLMemento(factory, child);
- }
-
- /**
- * @see IMemento.
- */
- public IMemento createChild(String type, String id) {
- Element child = factory.createElement(type);
- child.setAttribute(TAG_ID, id);
- element.appendChild(child);
- return new XMLMemento(factory, child);
- }
-
- /**
- * Create a Document from a Reader and answer a root memento for reading
- * a document.
- */
- protected static XMLMemento createReadRoot(Reader reader) {
- Document document = null;
- try {
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- DocumentBuilder parser = factory.newDocumentBuilder();
- document = parser.parse(new InputSource(reader));
- Node node = document.getFirstChild();
- if (node instanceof Element)
- return new XMLMemento(document, (Element) node);
- } catch (ParserConfigurationException e) {
- // ignore
- } catch (IOException e) {
- // ignore
- } catch (SAXException e) {
- // ignore
- } finally {
- try {
- reader.close();
- } catch (Exception e) {
- // ignore
- }
- }
- return null;
- }
-
- /**
- * Answer a root memento for writing a document.
- */
- public static XMLMemento createWriteRoot(String type) {
- Document document;
- try {
- document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
- Element element = document.createElement(type);
- document.appendChild(element);
- return new XMLMemento(document, element);
- } catch (ParserConfigurationException e) {
- throw new Error(e);
- }
- }
-
- /**
- * @see IMemento.
- */
- public IMemento getChild(String type) {
- // Get the nodes.
- NodeList nodes = element.getChildNodes();
- int size = nodes.getLength();
- if (size == 0)
- return null;
-
- // Find the first node which is a child of this node.
- for (int nX = 0; nX < size; nX ++) {
- Node node = nodes.item(nX);
- if (node instanceof Element) {
- Element element2 = (Element)node;
- if (element2.getNodeName().equals(type))
- return new XMLMemento(factory, element2);
- }
- }
-
- // A child was not found.
- return null;
- }
-
- /**
- * @see IMemento.
- */
- public IMemento [] getChildren(String type) {
- // Get the nodes.
- NodeList nodes = element.getChildNodes();
- int size = nodes.getLength();
- if (size == 0)
- return new IMemento[0];
-
- // Extract each node with given type.
- ArrayList list = new ArrayList(size);
- for (int nX = 0; nX < size; nX ++) {
- Node node = nodes.item(nX);
- if (node instanceof Element) {
- Element element2 = (Element)node;
- if (element2.getNodeName().equals(type))
- list.add(element2);
- }
- }
-
- // Create a memento for each node.
- size = list.size();
- IMemento [] results = new IMemento[size];
- for (int x = 0; x < size; x ++) {
- results[x] = new XMLMemento(factory, (Element)list.get(x));
- }
- return results;
- }
-
- /**
- * Return the contents of this memento as a byte array.
- *
- * @return byte[]
- */
- public byte[] getContents() throws IOException {
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- save(out);
- return out.toByteArray();
- }
-
- /**
- * Returns an input stream for writing to the disk with a local locale.
- *
- * @return java.io.InputStream
- */
- public InputStream getInputStream() throws IOException {
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- save(out);
- return new ByteArrayInputStream(out.toByteArray());
- }
-
- /**
- * @see IMemento.
- */
- public Float getFloat(String key) {
- Attr attr = element.getAttributeNode(key);
- if (attr == null)
- return null;
- String strValue = attr.getValue();
- try {
- return new Float(strValue);
- } catch (NumberFormatException e) {
- return null;
- }
- }
-
- /**
- * @see IMemento.
- */
- public String getId() {
- return element.getAttribute(TAG_ID);
- }
-
- /**
- * @see IMemento.
- */
- public String getName() {
- return element.getNodeName();
- }
-
- /**
- * @see IMemento.
- */
- public Integer getInteger(String key) {
- Attr attr = element.getAttributeNode(key);
- if (attr == null)
- return null;
- String strValue = attr.getValue();
- try {
- return new Integer(strValue);
- } catch (NumberFormatException e) {
- return null;
- }
- }
-
- /**
- * @see IMemento.
- */
- public String getString(String key) {
- Attr attr = element.getAttributeNode(key);
- if (attr == null)
- return null;
- return attr.getValue();
- }
-
- public List getNames() {
- NamedNodeMap map = element.getAttributes();
- int size = map.getLength();
- List list = new ArrayList();
- for (int i = 0; i < size; i++) {
- Node node = map.item(i);
- String name = node.getNodeName();
- list.add(name);
- }
- return list;
- }
-
- /**
- * Loads a memento from the given filename.
- *
- * @param in java.io.InputStream
- * @return org.eclipse.ui.IMemento
- * @exception java.io.IOException
- */
- public static IMemento loadMemento(InputStream in) {
- return createReadRoot(new InputStreamReader(in));
- }
-
- /**
- * Loads a memento from the given filename.
- *
- * @param in java.io.InputStream
- * @return org.eclipse.ui.IMemento
- * @exception java.io.IOException
- */
- public static IMemento loadCorruptMemento(InputStream in) {
- Document document = null;
- try {
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- DocumentBuilder parser = factory.newDocumentBuilder();
- document = parser.parse(in);
- Node node = document.getFirstChild();
- if (node instanceof Element)
- return new XMLMemento(document, (Element) node);
- } catch (ParserConfigurationException e) {
- // ignore
- } catch (IOException e) {
- // ignore
- } catch (SAXException e) {
- // ignore
- } finally {
- try {
- in.close();
- } catch (Exception e) {
- // ignore
- }
- }
- return null;
- }
-
- /**
- * Loads a memento from the given filename.
- *
- * @param filename java.lang.String
- * @return org.eclipse.ui.IMemento
- * @exception java.io.IOException
- */
- public static IMemento loadMemento(String filename) throws IOException {
- return XMLMemento.createReadRoot(new FileReader(filename));
- }
-
- /**
- * Loads a memento from the given filename.
- *
- * @param url java.net.URL
- * @return org.eclipse.ui.IMemento
- * @exception java.io.IOException
- */
- public static IMemento loadMemento(URL url) throws IOException {
- return XMLMemento.createReadRoot(new InputStreamReader(url.openStream()));
- }
-
- /**
- * @see IMemento.
- */
- private void putElement(Element element2) {
- NamedNodeMap nodeMap = element2.getAttributes();
- int size = nodeMap.getLength();
- for (int i = 0; i < size; i++){
- Attr attr = (Attr)nodeMap.item(i);
- putString(attr.getName(),attr.getValue());
- }
-
- NodeList nodes = element2.getChildNodes();
- size = nodes.getLength();
- for (int i = 0; i < size; i ++) {
- Node node = nodes.item(i);
- if (node instanceof Element) {
- XMLMemento child = (XMLMemento)createChild(node.getNodeName());
- child.putElement((Element)node);
- }
- }
- }
-
- /**
- * @see IMemento.
- */
- public void putFloat(String key, float f) {
- element.setAttribute(key, String.valueOf(f));
- }
-
- /**
- * @see IMemento.
- */
- public void putInteger(String key, int n) {
- element.setAttribute(key, String.valueOf(n));
- }
-
- /**
- * @see IMemento.
- */
- public void putMemento(IMemento memento) {
- XMLMemento xmlMemento = (XMLMemento) memento;
- putElement(xmlMemento.element);
- }
-
- /**
- * @see IMemento.
- */
- public void putString(String key, String value) {
- if (value == null)
- return;
- element.setAttribute(key, value);
- }
-
- /**
- * Save this Memento to a Writer.
- */
- public void save(Writer writer) throws IOException {
- Result result = new StreamResult(writer);
- Source source = new DOMSource(factory);
- try {
- Transformer transformer = TransformerFactory.newInstance().newTransformer();
- transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$
- transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
- transformer.transform(source, result);
- } catch (Exception e) {
- throw (IOException) (new IOException().initCause(e));
- }
- }
-
- /**
- * Save this Memento to a Writer.
- */
- public void save(OutputStream os) throws IOException {
- Result result = new StreamResult(os);
- Source source = new DOMSource(factory);
- try {
- Transformer transformer = TransformerFactory.newInstance().newTransformer();
- transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$
- transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
- transformer.transform(source, result);
- } catch (Exception e) {
- throw (IOException) (new IOException().initCause(e));
- }
- }
-
- /**
- * Saves the memento to the given file.
- *
- * @param filename java.lang.String
- * @exception java.io.IOException
- */
- public void saveToFile(String filename) throws IOException {
- Writer w = null;
- try {
- w = new FileWriter(filename);
- save(w);
- } catch (IOException e) {
- throw e;
- } catch (Exception e) {
- throw new IOException(e.getLocalizedMessage());
- } finally {
- if (w != null) {
- try {
- w.close();
- } catch (Exception e) {
- // ignore
- }
- }
- }
- }
-
- public String saveToString() throws IOException {
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- save(out);
- return out.toString("UTF-8");
- }
-
- /*
- * @see IMemento#getBoolean(String)
- */
- public Boolean getBoolean(String key) {
- Attr attr = element.getAttributeNode(key);
- if (attr == null)
- return null;
- String strValue = attr.getValue();
- if ("true".equalsIgnoreCase(strValue))
- return new Boolean(true);
-
- return new Boolean(false);
- }
-
- /*
- * @see IMemento#putBoolean(String, boolean)
- */
- public void putBoolean(String key, boolean value) {
- element.setAttribute(key, value ? "true" : "false");
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/http/HTTPConnection.java b/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/http/HTTPConnection.java
deleted file mode 100644
index 6a208fb..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/http/HTTPConnection.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.internet.monitor.core.internal.http;
-
-import org.eclipse.wst.internet.monitor.core.IMonitor;
-import org.eclipse.wst.internet.monitor.core.IRequest;
-import org.eclipse.wst.internet.monitor.core.internal.Trace;
-
-import java.util.List;
-import java.util.ArrayList;
-/**
- * Manages a monitor server connection between two hosts. This
- * connection may spawn one or more TCP/IP pairs to be displayed
- * in the monitor server view.
- */
-public class HTTPConnection {
- protected IMonitor monitor;
-
- protected int req = -1;
- protected int resp = -1;
-
- protected List calls = new ArrayList();
-
- /**
- * MonitorHTTPConnection constructor comment.
- */
- public HTTPConnection(IMonitor monitor) {
- super();
- this.monitor = monitor;
- Trace.trace(Trace.PARSING, "TCP/IP monitor connection opened " + monitor);
- }
-
- /**
- * Add a request.
- * @param req byte[]
- * @param isNew boolean
- */
- public void addRequest(byte[] request, boolean isNew) {
- if (isNew)
- req ++;
- HTTPRequest pair = (HTTPRequest) getRequestResponse(req);
- pair.addToRequest(request);
- }
-
- /**
- * Add a response.
- * @param req byte[]
- * @param isNew boolean
- */
- public void addResponse(byte[] response, boolean isNew) {
- if (isNew)
- resp ++;
- HTTPRequest pair = (HTTPRequest) getRequestResponse(resp);
- pair.addToResponse(response);
- }
-
- /**
- *
- */
- public void addProperty(String key, Object value) {
- IRequest pair = getRequestResponse(req);
- pair.addProperty(key, value);
- }
-
- /**
- *
- */
- public IRequest getRequestResponse(boolean isRequest) {
- if (isRequest)
- return getRequestResponse(req);
-
- return getRequestResponse(resp);
- }
-
- /**
- *
- */
- protected IRequest getRequestResponse(int i) {
- synchronized (this) {
- while (i >= calls.size()) {
- IRequest rr = new HTTPRequest(monitor.getLocalPort(), monitor.getRemoteHost(), monitor.getRemotePort());
- calls.add(rr);
- return rr;
- }
- return (IRequest) calls.get(i);
- }
- }
-
- /**
- * Set the title
- * @param req byte[]
- * @param isNew boolean
- */
- public void setLabel(String title, boolean isNew) {
- if (isNew)
- req ++;
- HTTPRequest pair = (HTTPRequest) getRequestResponse(req);
- pair.setLabel(title);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/http/HTTPProtocolAdapter.java b/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/http/HTTPProtocolAdapter.java
deleted file mode 100644
index 00b3b1d..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/http/HTTPProtocolAdapter.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.internet.monitor.core.internal.http;
-
-import java.io.IOException;
-import java.net.Socket;
-
-import org.eclipse.wst.internet.monitor.core.IMonitor;
-import org.eclipse.wst.internet.monitor.core.ProtocolAdapterDelegate;
-import org.eclipse.wst.internet.monitor.core.internal.Connection;
-/**
- *
- */
-public class HTTPProtocolAdapter extends ProtocolAdapterDelegate {
- public void connect(IMonitor monitor, Socket in, Socket out) throws IOException {
- Connection conn2 = new Connection(in, out);
- HTTPConnection conn = new HTTPConnection(monitor);
- HTTPThread request = new HTTPThread(conn2, in.getInputStream(), out.getOutputStream(), conn, true, monitor.getRemoteHost(), monitor.getRemotePort());
- HTTPThread response = new HTTPThread(conn2, out.getInputStream(), in.getOutputStream(), conn, false, "localhost", monitor.getLocalPort(), request);
- request.start();
- response.start();
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/http/HTTPRequest.java b/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/http/HTTPRequest.java
deleted file mode 100644
index d9ffd37..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/http/HTTPRequest.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.internet.monitor.core.internal.http;
-
-import org.eclipse.wst.internet.monitor.core.MonitorCore;
-import org.eclipse.wst.internet.monitor.core.internal.Request;
-/**
- *
- */
-public class HTTPRequest extends Request {
- protected static final String HTTP_REQUEST_HEADER = "request-header";
- protected static final String HTTP_RESPONSE_HEADER = "response-header";
-
- protected static final String HTTP_REQUEST_BODY = "request-body";
- protected static final String HTTP_RESPONSE_BODY = "response-body";
-
- protected static final byte[] EMPTY = new byte[0];
-
- /**
- * HTTPRequestResponse constructor comment.
- */
- public HTTPRequest(int localPort, String remoteHost, int remotePort) {
- super(MonitorCore.findProtocolAdapter(MonitorCore.HTTP_PROTOCOL_ID), localPort, remoteHost, remotePort);
- }
-
- public byte[] getRequest(byte type2) {
- if (type2 == ALL)
- return request;
- else if (type2 == TRANSPORT)
- return getRequestHeader();
- else
- return getRequestContent();
- }
-
- public byte[] getResponse(byte type2) {
- if (type2 == ALL)
- return response;
- else if (type2 == TRANSPORT)
- return getResponseHeader();
- else
- return getResponseContent();
- }
-
- protected byte[] getRequestHeader() {
- Object obj = getObjectProperty(HTTP_REQUEST_HEADER);
- if (obj == null || !(obj instanceof byte[]))
- return null;
- return (byte[]) obj;
- }
-
- protected byte[] getRequestContent() {
- Object obj = getObjectProperty(HTTP_REQUEST_BODY);
- if (obj == null || !(obj instanceof byte[]))
- return null;
- return (byte[]) obj;
- }
-
- protected byte[] getResponseHeader() {
- Object obj = getObjectProperty(HTTP_RESPONSE_HEADER);
- if (obj == null || !(obj instanceof byte[]))
- return null;
- return (byte[]) obj;
- }
-
- protected byte[] getResponseContent() {
- Object obj = getObjectProperty(HTTP_RESPONSE_BODY);
- if (obj == null || !(obj instanceof byte[]))
- return null;
- return (byte[]) obj;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/http/HTTPThread.java b/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/http/HTTPThread.java
deleted file mode 100644
index 901cb84..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/http/HTTPThread.java
+++ /dev/null
@@ -1,608 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.internet.monitor.core.internal.http;
-
-import java.io.*;
-import org.eclipse.wst.internet.monitor.core.IRequest;
-import org.eclipse.wst.internet.monitor.core.internal.Connection;
-import org.eclipse.wst.internet.monitor.core.internal.Trace;
-/**
- * Monitor server I/O thread.
- */
-public class HTTPThread extends Thread {
- private static final int BUFFER = 2048;
- private static final byte CR = (byte) '\r';
- private static final byte LF = (byte) '\n';
- protected static int threadCount = 0;
-
- private byte[] readBuffer = new byte[BUFFER];
-
- // buffer and index
- protected byte[] buffer = new byte[0];
- protected int bufferIndex = 0;
-
- protected InputStream in;
- protected OutputStream out;
- protected HTTPConnection conn;
- protected boolean isRequest;
- protected Connection conn2;
-
- protected HTTPThread request;
- protected boolean isWaiting;
-
- // user to translate the Host: header
- protected String host;
- protected int port;
-
- protected int contentLength = -1;
- protected byte transferEncoding = -1;
- protected String responseType = null;
- protected boolean keepAlive = false;
-
- protected static final String[] ENCODING_STRING = new String[] {
- "chunked", "identity", "gzip", "compressed", "deflate"};
-
- protected static final byte ENCODING_CHUNKED = 0;
- protected static final byte ENCODING_IDENTITY = 1;
- protected static final byte ENCODING_GZIP = 2;
- protected static final byte ENCODING_COMPRESSED = 3;
- protected static final byte ENCODING_DEFLATE = 4;
-
-/* change:
-Referer: http://localhost:8081/index.html
-Host: localhost:8081
-*/
-/* The Connection header has the following grammar:
-
- Connection = "Connection" ":" 1#(connection-token)
- connection-token = token
-
- HTTP/1.1 proxies MUST parse the Connection header field before a
- message is forwarded and, for each connection-token in this field,
- remove any header field(s) from the message with the same name as the
- connection-token. */
-
- /**
- * MonitorThread constructor comment.
- */
- public HTTPThread(Connection conn2, InputStream in, OutputStream out, HTTPConnection conn, boolean isRequest, String host, int port) {
- super();
- this.conn2 = conn2;
- this.in = in;
- this.out = out;
- this.conn = conn;
- this.isRequest = isRequest;
- this.host = host;
- this.port = port;
-
- setName("HTTP (" + host + ":" + port + ") " + (isRequest ? "REQUEST" : "RESPONSE") + " " + (threadCount++));
- setPriority(Thread.NORM_PRIORITY + 1);
- setDaemon(true);
-
- Trace.trace(Trace.PARSING, "Started: " + this);
- }
-
- /**
- * MonitorThread constructor comment.
- */
- public HTTPThread(Connection conn2, InputStream in, OutputStream out, HTTPConnection conn, boolean isRequest, String host, int port, HTTPThread request) {
- this(conn2, in, out, conn, isRequest, host, port);
-
- this.request = request;
- }
-
- /**
- * Add a line feed to the end of the byte array.
- * @return byte[]
- * @param b byte[]
- */
- protected static byte[] convert(byte[] b) {
- if (b == null || b.length == 0)
- return b;
-
- int size = b.length;
- byte[] x = new byte[size + 2];
- System.arraycopy(b, 0, x, 0, size);
- x[size] = (byte) '\r'; // CR
- x[size + 1] = (byte) '\n'; // LF
- return x;
- }
-
- /**
- * Read more data into the buffer.
- *
- * @return byte[]
- */
- protected void fillBuffer() throws IOException {
- int n = in.read(readBuffer);
-
- if (n <= 0)
- throw new IOException("End of input");
-
- // add to full buffer
- int len = buffer.length - bufferIndex;
- if (len < 0)
- len = 0;
- byte[] x = new byte[n + len];
- System.arraycopy(buffer, bufferIndex, x, 0, len);
- System.arraycopy(readBuffer, 0, x, len, n);
- bufferIndex = 0;
- buffer = x;
- }
-
- /**
- * Returns the first location of a CRLF.
- *
- * @return int
- */
- protected int getFirstCRLF() {
- int size = buffer.length;
- int i = bufferIndex + 1;
- while (i < size) {
- if (buffer[i - 1] == CR && buffer[i] == LF)
- return i;
- i++;
- }
- return -1;
- }
-
- /**
- * Output the given bytes.
- * @param b byte[]
- */
- protected void outputBytes(byte[] b, boolean isNew) throws IOException {
- out.write(b);
- if (isRequest)
- conn.addRequest(b, isNew);
- else
- conn.addResponse(b, isNew);
- }
-
- /**
- * Parse the HTTP body.
- */
- public void parseBody() throws IOException {
- Trace.trace(Trace.PARSING, "Parsing body for: " + this);
-
- if (isRequest) {
- if (contentLength != -1) {
- byte[] b = readBytes(contentLength);
- out.write(b);
- conn.addRequest(b, false);
- setHTTPBody(b);
- } else if (transferEncoding != -1 && transferEncoding != ENCODING_IDENTITY) {
- parseChunk();
- }
-
- Trace.trace(Trace.PARSING, "Done parsing request body for: " + this);
- return;
- }
-
- // just return body for HTTP 1.0 responses
- if (!isRequest && !keepAlive && contentLength == -1 && transferEncoding == -1) {
- Trace.trace(Trace.PARSING, "Assuming HTTP 1.0 for: " + this);
- int n = buffer.length - bufferIndex;
- byte[] b = readBytes(n);
- byte[] body = new byte[0];
- while (n >= 0) {
- Trace.trace(Trace.PARSING, "Bytes read: " + n + " " + this);
- if (b != null && n > 0) {
- byte[] x = null;
- if (n == b.length)
- x = b;
- else {
- x = new byte[n];
- System.arraycopy(b, 0, x, 0, n);
- }
- outputBytes(x, false);
-
- // copy to HTTP body
- byte[] temp = new byte[body.length + x.length];
- System.arraycopy(body, 0, temp, 0, body.length);
- System.arraycopy(x, 0, temp, body.length, x.length);
- body = temp;
- }
- if (b.length < BUFFER)
- b = new byte[BUFFER];
- n = in.read(b);
- Thread.yield();
- }
- out.flush();
- setHTTPBody(body);
- return;
- }
-
- // spec 4.4.1
- if (responseType != null && (responseType.startsWith("1") || "204".equals(responseType) || "304".equals(responseType))) {
- setHTTPBody(new byte[0]);
- return;
- }
-
- // spec 4.4.2
- if (transferEncoding != -1 && transferEncoding != ENCODING_IDENTITY) {
- parseChunk();
- return;
- }
-
- // spec 4.4.3
- if (contentLength != -1) {
- byte[] b = readBytes(contentLength);
- out.write(b);
- if (isRequest)
- conn.addRequest(b, false);
- else
- conn.addResponse(b, false);
- setHTTPBody(b);
- return;
- }
-
- // spec 4.4.4 (?)
-
- Trace.trace(Trace.PARSING, "Unknown body for: " + this);
- }
-
- /**
- * Parse an HTTP chunk.
- */
- public void parseChunk() throws IOException {
- Trace.trace(Trace.PARSING, "Parsing chunk for: " + this);
- boolean done = false;
- byte[] body = new byte[0];
-
- while (!done) {
- // read chunk size
- byte[] b = readLine();
-
- String s = new String(b);
- int index = s.indexOf(" ");
- int length = -1;
- try {
- if (index > 0)
- s = s.substring(0, index);
- length = Integer.parseInt(s.trim(), 16);
- } catch (Exception e) {
- Trace.trace(Trace.PARSING, "Error chunk for: " + this, e);
- }
-
- // output bytes
- outputBytes(b, false);
-
- if (length <= 0)
- done = true;
- else {
- // read and output chunk data plus CRLF
- b = readBytes(length + 2);
- outputBytes(b, false);
-
- // copy to HTTP body
- byte[] temp = new byte[body.length + b.length - 2];
- System.arraycopy(body, 0, temp, 0, body.length);
- System.arraycopy(b, 0, temp, body.length, b.length - 2);
- body = temp;
- }
- }
-
- // read trailer
- byte[] b = readLine();
- while (b.length > 2) {
- outputBytes(b, false);
- b = readLine();
- }
-
- outputBytes(b, false);
- setHTTPBody(body);
- }
-
- /**
- * Parse an HTTP header.
- */
- public void parseHeader() throws IOException {
- Trace.trace(Trace.PARSING, "Parsing header for: " + this);
-
- // read until first blank line
- boolean isFirstLine = true;
- boolean isNew = true;
-
- byte[] b = readLine();
- while (b.length > 5) {
- Trace.trace(Trace.PARSING, "Parsing header line: '" + new String(b) + "'");
-
- if (isFirstLine) {
- String s = new String(b);
- if (isRequest) {
- setLabel(s);
- isNew = false;
- }
-
- if (!isRequest) {
- int index1 = s.indexOf(' ');
- int index2 = s.indexOf(' ', index1 + 1);
-
- try {
- responseType = s.substring(index1 + 1, index2).trim();
- Trace.trace(Trace.PARSING, "Response Type: " + this + " " + responseType);
- } catch (Exception e) {
- Trace.trace(Trace.PARSING, "Error parsing response type for: " + this, e);
- }
- if (responseType != null && responseType.equals("100")) {
- outputBytes(b, isNew);
- isNew = false;
-
- b = readLine();
- outputBytes(b, false);
-
- b = readLine();
-
- index1 = s.indexOf(' ');
- index2 = s.indexOf(' ', index1 + 1);
-
- try {
- responseType = s.substring(index1 + 1, index2).trim();
- Trace.trace(Trace.PARSING, "Response Type: " + this + " " + responseType);
- } catch (Exception e) {
- Trace.trace(Trace.PARSING, "Error parsing response type for: " + this, e);
- }
- }
- }
- isFirstLine = false;
- }
-
- // translate
- b = translateHeaderLine(b);
-
- outputBytes(b, isNew);
- isNew = false;
-
- b = readLine();
- }
-
- Trace.trace(Trace.PARSING, "Parsing final header line: '" + new String(b) + "'");
-
- outputBytes(b, false);
-
- IRequest rr = conn.getRequestResponse(isRequest);
- Trace.trace(Trace.PARSING, "Setting header length: " + rr.getRequest(IRequest.ALL).length);
-
- setHTTPHeader(rr);
- }
-
- /**
- * Read bytes from the stream.
- * @return byte[]
- */
- protected byte[] readBytes(int n) throws IOException {
- Trace.trace(Trace.PARSING, "readBytes() " + n + " for: " + this);
- while (buffer.length - bufferIndex < n)
- fillBuffer();
-
- return removeFromBuffer(bufferIndex + n);
- }
-
- /**
- * Read and return the next full line.
- *
- * @return byte[]
- */
- protected byte[] readLine() throws IOException {
- Trace.trace(Trace.PARSING, "readLine() for: " + this);
-
- int n = getFirstCRLF();
- while (n < 0) {
- fillBuffer();
- n = getFirstCRLF();
- }
- return removeFromBuffer(n + 1);
- }
-
- /**
- * Remove data from the buffer up to the absolute index n.
- * Return the data from between bufferIndex and n.
- *
- * @return byte[]
- * @param index int
- */
- protected byte[] removeFromBuffer(int n) {
- // copy line out of buffer
- byte[] b = new byte[n - bufferIndex];
- System.arraycopy(buffer, bufferIndex, b, 0, n - bufferIndex);
-
- if (buffer.length > BUFFER * 2 || bufferIndex > BUFFER) {
- // remove line from buffer
- int size = buffer.length;
- byte[] x = new byte[size - n];
- System.arraycopy(buffer, n, x, 0, size - n);
- buffer = x;
- bufferIndex = 0;
- } else
- bufferIndex = n;
-
- return b;
- }
-
- /**
- * Listen for input, save it, and pass to the output stream.
- * Philosophy: Read a single line separately and translate.
- * When blank line is reached, just pass all other data through.
- */
- public void run() {
- try {
- try {
- while (true) {
- contentLength = -1;
- transferEncoding = -1;
- keepAlive = false;
-
- parseHeader();
- parseBody();
-
- if (isRequest && keepAlive)
- waitForResponse();
-
- IRequest r = conn.getRequestResponse(true);
- r.fireChangedEvent();
-
- Trace.trace(Trace.PARSING, "Done HTTP request for " + this + " " + keepAlive);
- if (!isRequest && !request.keepAlive) {
- conn2.close();
- break;
- }
-
- if (!isRequest)
- notifyRequest();
-
- Thread.yield();
- }
- } catch (IOException e) {
- // reached end of input
- Trace.trace(Trace.PARSING, "End of buffer for: " + this + " " + e.getMessage());
- }
-
- // send rest of buffer
- out.write(buffer, bufferIndex, buffer.length - bufferIndex);
- out.flush();
- } catch (Exception e) {
- Trace.trace(Trace.PARSING, "Error in: " + this, e);
- }
- //if (!isRequest)
- // conn2.close();
-
- Trace.trace(Trace.PARSING, "Closing thread " + this);
- }
-
- /**
- * Sets the title of the call.
- *
- * @param s java.lang.String
- */
- protected void setLabel(String s) {
- try {
- int index1 = s.indexOf(' ');
- if (index1 < 0 || index1 > 15)
- return;
- int index2 = s.indexOf(' ', index1 + 1);
- if (index2 < 0)
- return;
-
- conn.setLabel(s.substring(index1 + 1, index2), true);
- } catch (Exception e) {
- // ignore
- }
- }
-
- /**
- * Translate the header line.
- *
- * @return byte[]
- * @param b byte[]
- */
- protected byte[] translateHeaderLine(byte[] b) {
- String s = new String(b);
-
- if (isRequest && s.startsWith("Host: ")) {
- String t = "Host: " + host;
- if (port != 80)
- t += ":" + port;
- return convert(t.getBytes());
- } else if (s.startsWith("Content-Length: ")) {
- try {
- contentLength = Integer.parseInt(s.substring(16).trim());
- Trace.trace(Trace.PARSING, "Content length: " + this + " " + contentLength);
- } catch (Exception e) {
- Trace.trace(Trace.PARSING, "Content length error", e);
- }
- } else if (s.startsWith("Connection: ")) {
- try {
- String t = s.substring(11).trim();
- if (t.equalsIgnoreCase("Keep-Alive"))
- keepAlive = true;
- Trace.trace(Trace.PARSING, "Keep alive: " + keepAlive);
- } catch (Exception e) {
- Trace.trace(Trace.PARSING, "Error getting Connection: from header", e);
- }
- } else if (s.startsWith("Transfer-Encoding: ")) {
- String t = s.substring(19).trim();
- int size = ENCODING_STRING.length;
- for (int i = 0; i < size; i++) {
- if (ENCODING_STRING[i].equalsIgnoreCase(t)) {
- transferEncoding = (byte) i;
- Trace.trace(Trace.PARSING, "Transfer encoding: " + ENCODING_STRING[i]);
- }
- }
- }
-
- return b;
- }
-
- protected void close() {
- try {
- Trace.trace(Trace.PARSING, "Closing: " + this);
- out.close();
- } catch (Exception e) {
- Trace.trace(Trace.PARSING, "Error closing connection " + this + " " + e.getMessage());
- }
- }
-
- protected void waitForResponse() {
- Trace.trace(Trace.PARSING, "Waiting for response " + this);
- synchronized (this) {
- try {
- isWaiting = true;
- wait();
- } catch (Exception e) {
- Trace.trace(Trace.PARSING, "Error in waitForResponse() " + this + " " + e.getMessage());
- }
- isWaiting = false;
- }
- Trace.trace(Trace.PARSING, "Done waiting for response " + this);
- }
-
- protected void notifyRequest() {
- Trace.trace(Trace.PARSING, "Notifying request " + this);
- while (request.keepAlive && !request.isWaiting) {
- Trace.trace(Trace.PARSING, "Waiting for request " + this);
- try {
- Thread.sleep(100);
- } catch (Exception e) {
- // ignore
- }
- }
- synchronized (request) {
- try {
- request.notify();
- } catch (Exception e) {
- Trace.trace(Trace.PARSING, "Error in notifyRequest() " + this + " " + e.getMessage());
- }
- }
- Trace.trace(Trace.PARSING, "Done notifying request " + this);
- }
-
- protected void setHTTPHeader(IRequest rr) {
- if (isRequest) {
- byte[] b = rr.getRequest(IRequest.ALL);
- byte[] h = new byte[b.length];
- System.arraycopy(b, 0, h, 0, b.length);
- rr.addProperty(HTTPRequest.HTTP_REQUEST_HEADER, h);
- } else {
- byte[] b = rr.getResponse(IRequest.ALL);
- byte[] h = new byte[b.length];
- System.arraycopy(b, 0, h, 0, b.length);
- rr.addProperty(HTTPRequest.HTTP_RESPONSE_HEADER, h);
- }
- }
-
- protected void setHTTPBody(byte[] b) {
- IRequest rr = conn.getRequestResponse(isRequest);
- if (isRequest)
- rr.addProperty(HTTPRequest.HTTP_REQUEST_BODY, b);
- else
- rr.addProperty(HTTPRequest.HTTP_RESPONSE_BODY, b);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/http/ResendHTTPConnection.java b/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/http/ResendHTTPConnection.java
deleted file mode 100644
index 904f75f..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/http/ResendHTTPConnection.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.internet.monitor.core.internal.http;
-
-import org.eclipse.wst.internet.monitor.core.IRequest;
-/**
- * A resend HTTP connection wraps an HTTP connection to send an existing request.
- */
-public class ResendHTTPConnection extends HTTPConnection{
- protected IRequest existingRequest;
-
- public ResendHTTPConnection(IRequest request) {
- super(null);
- this.existingRequest = request;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.internet.monitor.core.internal.http.HTTPConnection#getRequestResponse(int)
- */
- protected IRequest getRequestResponse(int i) {
- return existingRequest;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/http/ResendHTTPRequest.java b/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/http/ResendHTTPRequest.java
deleted file mode 100644
index 98fc8a6..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/monitorcore/org/eclipse/wst/internet/monitor/core/internal/http/ResendHTTPRequest.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.internet.monitor.core.internal.http;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.net.Socket;
-
-import org.eclipse.wst.internet.monitor.core.IRequest;
-import org.eclipse.wst.internet.monitor.core.IResendRequest;
-import org.eclipse.wst.internet.monitor.core.internal.Connection;
-import org.eclipse.wst.internet.monitor.core.internal.SocketWrapper;
-/**
- * Wraps an existing request to create an HTTP request that can be sent. The
- * response is ignored. Only the request is important in this case.
- */
-public class ResendHTTPRequest extends HTTPRequest implements IResendRequest {
- private boolean sent = false;
-
- private byte[] header;
-
- private byte[] content;
-
- private IRequest originalRequest = null;
-
- /**
- * Constructor.
- *
- * @param req the request that is to be resent.
- */
- public ResendHTTPRequest(IRequest req) {
- super(req.getLocalPort(), req.getRemoteHost(), req.getRemotePort());
- addProperty(HTTP_REQUEST_HEADER, req
- .getObjectProperty(HTTP_REQUEST_HEADER));
- addProperty(HTTP_REQUEST_BODY, req.getObjectProperty(HTTP_REQUEST_BODY));
- header = req.getRequest(TRANSPORT);
- content = req.getRequest(CONTENT);
- request = req.getRequest(ALL);
- label = req.getLabel();
- this.originalRequest = req;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.internet.monitor.core.IResendRequest#sendRequest()
- */
- public void sendRequest() {
- try {
- Socket inSocket = new SocketWrapper(new ByteArrayInputStream(
- request));
- Socket outSocket = new Socket(remoteHost, remotePort);
- //Connection conn = new Connection(inSocket, outSocket);
- //DefaultThread requestThread = new DefaultThread(conn, this, in,
- // outSocket.getOutputStream(), true);
- //requestThread.start();
- //new DefaultThread(conn, this, outSocket.getInputStream(),
- // inSocket.getOutputStream(), false).start();
- Connection conn2 = new Connection(inSocket, outSocket);
- ResendHTTPConnection conn = new ResendHTTPConnection(this);
-
- HTTPThread request2 = new HTTPThread(conn2, inSocket
- .getInputStream(), outSocket.getOutputStream(), conn, true,
- remoteHost, remotePort);
- HTTPThread response2 = new HTTPThread(conn2, outSocket
- .getInputStream(), inSocket.getOutputStream(), conn, false,
- "localhost", localPort, request2);
- request2.start();
- response2.start();
- } catch (IOException e) {
- response = ("Unable to resend to server.\n" + e).getBytes();
- }
- sent = true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.internet.monitor.core.internal.Request#addToRequest(byte[])
- */
- public void addToRequest(byte[] addRequest) {
- // Don't want to add to the request as we already have the request.
- }
-
- public boolean hasBeenSent() {
- return sent;
- }
-
- public void setRequest(byte[] request, int type) {
- if (type == TRANSPORT && request != null)
- header = request;
- else if (type == CONTENT)
- content = request;
-
- int length = 0;
- int headerLength = 0;
- if (header != null) {
- length += header.length;
- headerLength = length;
- }
- if (content != null)
- length += content.length;
- byte[] newRequest = new byte[length];
- if (header != null)
- System.arraycopy(header, 0, newRequest, 0, header.length);
- if (content != null)
- System.arraycopy(content, 0, newRequest, headerLength, content.length);
- super.setRequest(newRequest);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.internet.monitor.core.internal.http.HTTPRequest#getRequestContent()
- */
- protected byte[] getRequestContent() {
- return content;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.internet.monitor.core.internal.http.HTTPRequest#getRequestHeader()
- */
- protected byte[] getRequestHeader() {
- return header;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.internet.monitor.core.IResendRequest#getOriginalRequest()
- */
- public IRequest getOriginalRequest() {
- return originalRequest;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/plugin.properties b/plugins/org.eclipse.wst.internet.monitor.core/plugin.properties
deleted file mode 100644
index ec8d3af..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/plugin.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-pluginName=Monitor
-providerName=Eclipse.org
-
-# --------------- Errors ---------------
-errorPortInUse=The TCP/IP monitor could not start because the port is in use.
-
-extensionPointProtocolAdapters=Protocol Adapters
-extensionPointContentFilters=Content Filters
-extensionPointRequestListeners=Request Listeners
-
-HTTP=HTTP
-TCPIP=TCP/IP
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/plugin.xml b/plugins/org.eclipse.wst.internet.monitor.core/plugin.xml
deleted file mode 100644
index 214f354..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/plugin.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-
-<plugin id="org.eclipse.wst.internet.monitor.core"
- name="%pluginName"
- version="1.0.0"
- provider-name="%providerName"
- class="org.eclipse.wst.internet.monitor.core.internal.MonitorPlugin">
-
-<requires>
- <import plugin="org.eclipse.core.runtime"/>
-</requires>
-
-<runtime>
- <library name="monitorcore.jar">
- <export name="*"/>
- </library>
-</runtime>
-
-<extension-point name="%extensionPointProtocolAdapters" id="protocolAdapters" schema="schema/protocolAdapters.exsd"/>
-<extension-point name="%extensionPointContentFilters" id="contentFilters" schema="schema/contentFilters.exsd"/>
-<extension-point name="%extensionPointRequestListeners" id="requestListeners" schema="schema/requestListeners.exsd"/>
-
-<extension point="org.eclipse.wst.internet.monitor.core.protocolAdapters">
- <protocolAdapter
- id="TCPIP"
- class="org.eclipse.wst.internet.monitor.core.internal.TCPIPProtocolAdapter"
- name="%TCPIP"/>
- <protocolAdapter
- id="HTTP"
- class="org.eclipse.wst.internet.monitor.core.internal.http.HTTPProtocolAdapter"
- name="%HTTP"/>
-</extension>
-
-</plugin>
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/schema/contentFilters.exsd b/plugins/org.eclipse.wst.internet.monitor.core/schema/contentFilters.exsd
deleted file mode 100644
index 84a5626..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/schema/contentFilters.exsd
+++ /dev/null
@@ -1,128 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.wst.internet.monitor.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.wst.internet.monitor.core" id="contentFilters" name="Content Filters"/>
- </appInfo>
- <documentation>
- This extension point is used to filter content received in a monitor.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="filter" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="filter">
- <annotation>
- <appInfo>
- <meta.element labelAttribute="name"/>
- </appInfo>
- </annotation>
- <complexType>
- <sequence>
- </sequence>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- specifies a unique identifier for this extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- specifies the fully qualified name of a Java class that extends <samp>org.eclipse.wst.internet.monitor.core.ContentFilterDelegate</samp>.
-Content filter instances of this type will delegate to instances of this class.
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.wst.internet.monitor.core.ContentFilterDelegate"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- a translatable name used to identify the filter
- </documentation>
- </annotation>
- </attribute>
- <attribute name="order" type="string">
- <annotation>
- <documentation>
- an integer used to order filters relative to each other. Lower orders are processed first
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is an example of a content filter extension point:
-
-<p>
-<pre>
- <extension point="org.eclipse.wst.internet.monitor.core.contentFilter">
- <filter
- id="com.example.ExampleIdentifier"
- name="%exampleName"
- class="com.example.ExampleContentFilter"/>
- </extension>
-</pre>
-</p>
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- Value of the attribute <b>class</b> must be a fully qualified name of a Java class that extends the abstract class <b>org.eclipse.wst.internet.monitor.core.ContentFilterDelegate</b>.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2003, 2004 IBM Corporation and others.<br>
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Common Public License v1.0 which accompanies
-this distribution, and is available at
-<a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/schema/protocolAdapters.exsd b/plugins/org.eclipse.wst.internet.monitor.core/schema/protocolAdapters.exsd
deleted file mode 100644
index 0a770a7..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/schema/protocolAdapters.exsd
+++ /dev/null
@@ -1,121 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.wst.internet.monitor.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.wst.internet.monitor.core" id="protocolAdapters" name="Protocol Adapters"/>
- </appInfo>
- <documentation>
- This extension point is used to provide an adapter for a new protocol (e.g. HTTP). This allows different types of protocols to be monitored.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="protocolAdapter" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="protocolAdapter">
- <annotation>
- <appInfo>
- <meta.element labelAttribute="name"/>
- </appInfo>
- </annotation>
- <complexType>
- <sequence>
- </sequence>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- specifies a unique identifier for this extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- specifies the fully qualified name of the Java class that extends <samp>org.eclipse.wst.internet.monitor.core.ProtocolAdapterDelegate</samp>
-Protocol adapter instances of this type will delegate to instances of this class.
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.wst.internet.monitor.core.ProtocolAdapterDelegate"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- a translatable name used to identify the protocol adapter
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is an example of a protocol adapter extension point to define a protocol adapter for TCP/IP:
-
-<p>
-<pre>
-<extension point="org.eclipse.wst.internet.monitor.core.protocolAdapters">
- <protocolAdapter
- id="TCPIP"
- class="com.example.TCPIPProtocolAdapter"
- name="%TCPIP"/>
-</extension>
-</pre>
-</p>
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- Value of the attribute <b>class</b> must be a fully qualified name of a Java class that extends the abstract class <b>org.eclipse.wst.internet.monitor.core.ProtocolAdapterDelegate</b>.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2003, 2004 IBM Corporation and others.<br>
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Common Public License v1.0 which accompanies
-this distribution, and is available at
-<a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/plugins/org.eclipse.wst.internet.monitor.core/schema/requestListeners.exsd b/plugins/org.eclipse.wst.internet.monitor.core/schema/requestListeners.exsd
deleted file mode 100644
index f09f007..0000000
--- a/plugins/org.eclipse.wst.internet.monitor.core/schema/requestListeners.exsd
+++ /dev/null
@@ -1,113 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.wst.internet.monitor.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.wst.internet.monitor.core" id="requestListeners" name="Request Listeners"/>
- </appInfo>
- <documentation>
- This extension point is used to listen for new monitor traffic (requests), or changes to existing requests. The extension point will be called whenever the monitor adds, changes, or removes a request.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="requestListener" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="requestListener">
- <annotation>
- <appInfo>
- <meta.element labelAttribute="name"/>
- </appInfo>
- </annotation>
- <complexType>
- <sequence>
- </sequence>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- specifies a unique identifier for this extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- specifies the fully qualified name of the Java class that implements <samp>org.eclipse.wst.internet.monitor.core.IRequestListener</samp>
-RequestListener instances of this type will delegate to instances of this class.
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.wst.internet.monitor.core.IRequestListener"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is an example of a request listener extension point:
-
-<p>
-<pre>
-<extension point="org.eclipse.wst.internet.monitor.core.requestListeners">
- <requestListener
- id="com.example.requestListener"
- class="com.example.MyRequestListener"/>
-</extension>
-</pre>
-</p>
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- Value of the attribute <b>class</b> must be a fully qualified name of a Java class that implements the interface <b>org.eclipse.wst.internet.monitor.core.IRequestListener</b>.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2003, 2004 IBM Corporation and others.<br>
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Common Public License v1.0 which accompanies
-this distribution, and is available at
-<a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/plugins/org.eclipse.wst.server.core/.classpath b/plugins/org.eclipse.wst.server.core/.classpath
deleted file mode 100644
index cf5d302..0000000
--- a/plugins/org.eclipse.wst.server.core/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="servercore/"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/plugins/org.eclipse.wst.server.core/.cvsignore b/plugins/org.eclipse.wst.server.core/.cvsignore
deleted file mode 100644
index dd71f75..0000000
--- a/plugins/org.eclipse.wst.server.core/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
-bin
-temp.folder
-build.xml
-servercore.jar
-org.eclipse.wst.server.core_3.0.0.jar
diff --git a/plugins/org.eclipse.wst.server.core/.options b/plugins/org.eclipse.wst.server.core/.options
deleted file mode 100644
index 3f8479c..0000000
--- a/plugins/org.eclipse.wst.server.core/.options
+++ /dev/null
@@ -1,7 +0,0 @@
-# Debugging options for the org.eclipse.wst.server.core plugin
-
-# Turn on general debugging
-org.eclipse.wst.server.core/debug=false
-
-# Prints out values
-org.eclipse.wst.server.core/resources=false
diff --git a/plugins/org.eclipse.wst.server.core/.project b/plugins/org.eclipse.wst.server.core/.project
deleted file mode 100644
index bf1e7ef..0000000
--- a/plugins/org.eclipse.wst.server.core/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.server.core</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/plugins/org.eclipse.wst.server.core/build.properties b/plugins/org.eclipse.wst.server.core/build.properties
deleted file mode 100644
index a3c08db..0000000
--- a/plugins/org.eclipse.wst.server.core/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = plugin.xml,\
- *.jar,\
- plugin.properties,\
- servercore.jar,\
- .options
-jars.compile.order =
-src.includes = schema/,\
- build.properties
-source.servercore.jar = servercore/
-output.servercore.jar = bin/
diff --git a/plugins/org.eclipse.wst.server.core/plugin.properties b/plugins/org.eclipse.wst.server.core/plugin.properties
deleted file mode 100644
index 3d277a4..0000000
--- a/plugins/org.eclipse.wst.server.core/plugin.properties
+++ /dev/null
@@ -1,83 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-pluginName=Server Core
-providerName=Eclipse.org
-
-extensionPointServerStartup=Server Startup
-extensionPointModuleTypes=Module Types
-extensionPointRuntimeTypes=Runtime Types
-extensionPointRuntimeTargetHandlers=Runtime Target Handlers
-extensionPointRuntimeLocators=Runtime Locators
-extensionPointServerTypes=Server Types
-extensionPointServerLocators=Server Locators
-extensionPointServerConfigurationTypes=Server Configuration Types
-extensionPointModuleFactories=Module Factories
-extensionPointModuleObjectAdapters=Module Artifact Adapters
-extensionPointLaunchableAdapters=Launchable Adapters
-extensionPointClients=Clients
-extensionPointServerTasks=Server Tasks
-extensionPointServerMonitors=Server Monitors
-
-# --------------- Tasks (progress monitors) ---------------
-
-# General tasks
-copyingTask=Copying from {0} to {1}
-unZippingTask=Unzipping {0}
-expandingTask=Expanding {0}
-savingTask=Saving {0}
-deletingTask=Deleting {0}
-copyingTask=File copied successfully to {0}
-
-taskPerforming=Performing Tasks
-taskModifyModules=Adding and/or removing projects.
-
-publishingTask=Publishing to {0}...
-publishingStatus=Publishing status
-publishingStop=Disconnecting from server
-
-publishingProject=Publishing: {0}
-
-publishingCancelled=Publishing cancelled
-
-# --------------- Misc UI ---------------
-
-# Error Messages
-errorPublishing=Could not publish to the server.
-errorNoConfiguration=The server has no configuration.
-errorLoading=Error loading from {0}.
-errorSaving=Could not save to {0}.
-errorCopyingFile=Error copying file to {0}: {1}
-errorModuleRestartFailed=Could not restart the module.
-errorWorkingCopyTimestamp=Could not save because the file has been modified since the start of editting.
-errorRuntimeName=Enter a name for the runtime.
-errorDuplicateRuntimeName=Name is already in use.
-errorStartFailed=Could not start the server.
-
-# Default server creation names
-# {0} will be replaced by a number if the given name is already being used
-defaultServerProjectName=Servers{0}
-defaultRuntimeName={0}
-defaultRuntimeName2={0} ({1})
-defaultServerName={0} @ {1}
-defaultServerName2={0} @ {1} ({2})
-defaultServerName3={0}
-defaultServerName4={0} ({1})
-defaultServerConfigurationName={0}
-defaultServerConfigurationName2={0} ({1})
-
-# Used when a name can't be found
-defaultVendor=Basic
-defaultVersion=Basic
-moduleTypeUnknown=Unknown module
-
-# null launchable
-nullLaunchableClient=Do nothing
-nullLaunchableClientDescription=Do not launch anything after starting the server.
diff --git a/plugins/org.eclipse.wst.server.core/plugin.xml b/plugins/org.eclipse.wst.server.core/plugin.xml
deleted file mode 100644
index 15fb959..0000000
--- a/plugins/org.eclipse.wst.server.core/plugin.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-
-<plugin id="org.eclipse.wst.server.core"
- name="%pluginName"
- version="1.0.0"
- provider-name="%providerName"
- class="org.eclipse.wst.server.core.internal.ServerPlugin">
-
- <requires>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.debug.core"/>
- </requires>
-
- <runtime>
- <library name="servercore.jar">
- <export name="*"/>
- </library>
- </runtime>
-
- <extension-point id="startup" name="%extensionPointServerStartup" schema="schema/startup.exsd"/>
- <extension-point id="moduleTypes" name="%extensionPointModuleTypes" schema="schema/moduleTypes.exsd"/>
- <extension-point id="runtimeTypes" name="%extensionPointRuntimeTypes" schema="schema/runtimeTypes.exsd"/>
- <extension-point id="runtimeTargetHandlers" name="%extensionPointRuntimeTargetHandlers" schema="schema/runtimeTargetHandlers.exsd"/>
- <extension-point id="runtimeLocators" name="%extensionPointRuntimeLocators" schema="schema/runtimeLocators.exsd"/>
- <extension-point id="serverTypes" name="%extensionPointServerTypes" schema="schema/serverTypes.exsd"/>
- <extension-point id="serverLocators" name="%extensionPointServerLocators" schema="schema/serverLocators.exsd"/>
- <extension-point id="moduleFactories" name="%extensionPointModuleFactories" schema="schema/moduleFactories.exsd"/>
- <extension-point id="moduleArtifactAdapters" name="%extensionPointModuleArtifactAdapters" schema="schema/moduleArtifactAdapters.exsd"/>
- <extension-point id="launchableAdapters" name="%extensionPointLaunchableAdapters" schema="schema/launchableAdapters.exsd"/>
- <extension-point id="clients" name="%extensionPointClients" schema="schema/clients.exsd"/>
- <extension-point id="serverTasks" name="%extensionPointServerTasks" schema="schema/serverTasks.exsd"/>
- <extension-point id="serverMonitors" name="%extensionPointServerMonitors" schema="schema/serverMonitors.exsd"/>
-
- <extension point="org.eclipse.wst.server.core.moduleTypes">
- <moduleType
- id="*"
- name="%moduleTypeUnknown"/>
- </extension>
-</plugin>
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/schema/clients.exsd b/plugins/org.eclipse.wst.server.core/schema/clients.exsd
deleted file mode 100644
index fd60465..0000000
--- a/plugins/org.eclipse.wst.server.core/schema/clients.exsd
+++ /dev/null
@@ -1,129 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.wst.server.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.wst.server.core" id="clients" name="Clients"/>
- </appInfo>
- <documentation>
- This extension point provides a way to launch a client for a specific type of resource that is being run on a server.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="client" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="client">
- <annotation>
- <appInfo>
- <meta.element labelAttribute="name"/>
- </appInfo>
- </annotation>
- <complexType>
- <sequence>
- </sequence>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- specifies a unique identifier for this extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- specifies the fully qualified name of the Java class that extend <samp>ClientDelegate</samp>.
-Clieint instances of this type will delegate to instances of this class to launch.
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.wst.server.core.model.StartupDelegate"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- a translatable name used to identify the client
- </documentation>
- </annotation>
- </attribute>
- <attribute name="description" type="string">
- <annotation>
- <documentation>
- a translatable description of this client
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is an example of a client extension point:
-
-<p>
-<pre>
-<extension point="org.eclipse.wst.server.core.clients">
- <client
- id="com.example.clients"
- name="%clientName"
- description="%clientDescription"
- class="com.example.ExampleClient"/>
-</extension>
-</pre>
-</p>
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- Value of the attribute <b>class</b> must be a fully qualified name of a Java class that extends <b>org.eclipse.wst.server.core.model.ClientDelegate</b> and contains a public 0-arg constructor.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2000, 2003 IBM Corporation and others.<br>
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Common Public License v1.0 which accompanies
-this distribution, and is available at
-<a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/plugins/org.eclipse.wst.server.core/schema/launchableAdapters.exsd b/plugins/org.eclipse.wst.server.core/schema/launchableAdapters.exsd
deleted file mode 100644
index 620bfb0..0000000
--- a/plugins/org.eclipse.wst.server.core/schema/launchableAdapters.exsd
+++ /dev/null
@@ -1,113 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.wst.server.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.wst.server.core" id="launchableAdapters" name="Launchable Adapters"/>
- </appInfo>
- <documentation>
- This extension point provides a way to invoke code during the server core plugin startup. Use sparingly.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="launchableAdapter" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="launchableAdapter">
- <annotation>
- <appInfo>
- <meta.element labelAttribute="name"/>
- </appInfo>
- </annotation>
- <complexType>
- <sequence>
- </sequence>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- specifies a unique identifier for this extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- specifies the fully qualified name of the Java class that extends <samp>LaunchableAdapterDelegate</samp>.
-Launchable adapter instances of this type will delegate to instances of this class.
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.wst.server.core.model.StartupDelegate"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is an example of a launchable adapter extension point:
-
-<p>
-<pre>
- <extension point="org.eclipse.wst.server.core.launchableAdapters">
- <launchableAdapter
- id="com.example.launchableAdapter"
- class="com.example.ExampleLaunchableAdapterDelegate"/>
- </extension>
-</pre>
-</p>
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- Value of the attribute <b>class</b> must be a fully qualified name of a Java class that extends <b>org.eclipse.wst.server.core.model.LaunchableAdapterDelegate</b> and contains a public 0-arg constructor.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2000, 2003 IBM Corporation and others.<br>
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Common Public License v1.0 which accompanies
-this distribution, and is available at
-<a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/plugins/org.eclipse.wst.server.core/schema/moduleArtifactAdapters.exsd b/plugins/org.eclipse.wst.server.core/schema/moduleArtifactAdapters.exsd
deleted file mode 100644
index c2cd833..0000000
--- a/plugins/org.eclipse.wst.server.core/schema/moduleArtifactAdapters.exsd
+++ /dev/null
@@ -1,116 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.wst.server.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.wst.server.core" id="moduleArtifactAdapters" name="Module Artifact Adapters"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="moduleArtifactAdapter" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="moduleArtifactAdapter">
- <annotation>
- <appInfo>
- <meta.element labelAttribute="name"/>
- </appInfo>
- </annotation>
- <complexType>
- <sequence>
- </sequence>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- specifies a unique identifier for this extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- specifies the fully qualified name of the Java class that extends <samp>ModuleArtifactAdapterDelegate</samp>.
-Module object adapter instances of this type will delegate to instances of this class.
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.wst.server.core.model.StartupDelegate"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="objectClass" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is an example of a module object adapter extension point:
-
-<p>
-<pre>
-
-</pre>
-</p>
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- Value of the attribute <b>class</b> must be a fully qualified name of a Java class that extends <b>org.eclipse.wst.server.core.model.ModuleArtifactAdapterDelegate</b> and contains a public 0-arg constructor.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2000, 2003 IBM Corporation and others.<br>
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Common Public License v1.0 which accompanies
-this distribution, and is available at
-<a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/plugins/org.eclipse.wst.server.core/schema/moduleFactories.exsd b/plugins/org.eclipse.wst.server.core/schema/moduleFactories.exsd
deleted file mode 100644
index 7b12d06..0000000
--- a/plugins/org.eclipse.wst.server.core/schema/moduleFactories.exsd
+++ /dev/null
@@ -1,143 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.wst.server.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.wst.server.core" id="moduleFactories" name="Module Factories"/>
- </appInfo>
- <documentation>
- This extension point is used to provide a factory for modules that can be used by servers.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="moduleFactory" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="moduleFactory">
- <annotation>
- <appInfo>
- <meta.element labelAttribute="name"/>
- </appInfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="moduleType" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- specifies a unique identifier for this extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- specifies the fully qualified name of the Java class that extends <samp>ModuleFactoryDelegate</samp>.
-Module factory instances of this type will delegate to instances of this class.
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.wst.server.core.model.StartupDelegate"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="projects" type="boolean">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="order" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="moduleType">
- <complexType>
- <attribute name="types" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="versions" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is an example of a module factory extension point:
-
-<p>
-<pre>
-
-</pre>
-</p>
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- Value of the attribute <b>class</b> must be a fully qualified name of a Java class that extends <b>org.eclipse.wst.server.core.model.ModuleFactoryDelegate</b> and contains a public 0-arg constructor.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2000, 2003 IBM Corporation and others.<br>
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Common Public License v1.0 which accompanies
-this distribution, and is available at
-<a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/plugins/org.eclipse.wst.server.core/schema/moduleTypes.exsd b/plugins/org.eclipse.wst.server.core/schema/moduleTypes.exsd
deleted file mode 100644
index e59234c..0000000
--- a/plugins/org.eclipse.wst.server.core/schema/moduleTypes.exsd
+++ /dev/null
@@ -1,110 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.wst.server.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.wst.server.core" id="moduleTypes" name="Module Types"/>
- </appInfo>
- <documentation>
- This extension point is used to provide a new module type.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="moduleType" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="moduleType">
- <annotation>
- <appInfo>
- <meta.element labelAttribute="name"/>
- </appInfo>
- </annotation>
- <complexType>
- <sequence>
- </sequence>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- specifies a unique identifier for this extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- a translatable name used to identify the module type
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is an example of a module type extension point:
-
-<p>
-<pre>
- <extension point="org.eclipse.wst.server.core.moduleTypes">
- <moduleType
- id="com.example"
- name="%moduleTypeName"
- description="%moduleTypeDescription"/>
- </extension>
-</pre>
-</p>
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2000, 2003 IBM Corporation and others.<br>
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Common Public License v1.0 which accompanies
-this distribution, and is available at
-<a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/plugins/org.eclipse.wst.server.core/schema/runtimeLocators.exsd b/plugins/org.eclipse.wst.server.core/schema/runtimeLocators.exsd
deleted file mode 100644
index c8194a2..0000000
--- a/plugins/org.eclipse.wst.server.core/schema/runtimeLocators.exsd
+++ /dev/null
@@ -1,131 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.wst.server.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.wst.server.core" id="runtimeLocators" name="Runtime Locators"/>
- </appInfo>
- <documentation>
- This extension point is used to locate new runtimes on the local machine.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="runtimeLocator" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="runtimeLocator">
- <annotation>
- <appInfo>
- <meta.element labelAttribute="name"/>
- </appInfo>
- </annotation>
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- specifies a unique identifier for this extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- a translatable name used to identify the locator
- </documentation>
- </annotation>
- </attribute>
- <attribute name="description" type="string" use="required">
- <annotation>
- <documentation>
- a translatable description of the locator
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- specifies the fully qualified name of the Java class that extends <samp>RuntimeLocatorDelegate</samp>.
-Runtime locator instances of this type will delegate to instances of this class.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="typeIds" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is an example of a runtime locator extension point:
-
-<p>
-<pre>
- <extension point="org.eclipse.wst.server.core.runtimeLocators">
- <runtimeLocator
- id="com.example.locator"
- name="%runtimeLocatorName"
- description="%runtimeLocatorDescription"
- class="com.example.ExampleRuntimeLocator"/>
- </extension>
-</pre>
-</p>
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- Value of the attribute <b>class</b> must be a fully qualified name of a Java class that extends <b>org.eclipse.wst.server.core.model.RuntimeLocatorDelegate</b> and contains a public 0-arg constructor.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2000, 2003 IBM Corporation and others.<br>
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Common Public License v1.0 which accompanies
-this distribution, and is available at
-<a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/plugins/org.eclipse.wst.server.core/schema/runtimeTargetHandlers.exsd b/plugins/org.eclipse.wst.server.core/schema/runtimeTargetHandlers.exsd
deleted file mode 100644
index edc641b..0000000
--- a/plugins/org.eclipse.wst.server.core/schema/runtimeTargetHandlers.exsd
+++ /dev/null
@@ -1,128 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.wst.server.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.wst.server.core" id="runtimeTypes" name="Runtime Types"/>
- </appInfo>
- <documentation>
- This extension point is used to provide a new runtime target handler. Runtime target handlers are called whenever a runtime target is added or removed from a project. They can be used to switch Java classpaths, setup default resources, etc.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="runtimeTargetHandler" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="runtimeTargetHandler">
- <annotation>
- <appInfo>
- <meta.element labelAttribute="name"/>
- </appInfo>
- </annotation>
- <complexType>
- <sequence>
- </sequence>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- specifies a unique identifier for this extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="runtimeTypeIds" type="string" use="required">
- <annotation>
- <documentation>
- a comma separated list of runtime type ids that this handler may support. Used for memory & performance reasons
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- specifies the fully qualified name of the Java class that extends <samp>RuntimeTargetHandlerDelegate</samp>.
-Runtime target handler instances of this type will delegate to instances of this class.
- </documentation>
- <appInfo>
- <meta.attribute kind="java"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="order" type="string">
- <annotation>
- <documentation>
- an integer order used to sort handlers relative to each other
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is an example of a runtime target handler extension point:
-
-<p>
-<pre>
- <extension point="org.eclipse.wst.server.core.runtimeTargetHandlers">
- <runtimeTargetHandler
- id="com.example.runtimeTargetHandler"
- runtimeTypeIds="com.example.runtime, com.example2.*"
- class="com.example.ExampleRuntimeTargetHandler"/>
- </extension>
-</pre>
-</p>
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- Value of the attribute <b>class</b> must be a fully qualified name of a Java class that extends <b>org.eclipse.wst.server.core.model.RuntimeTargetHandlerDelegate</b> and contains a public 0-arg constructor.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2000, 2003 IBM Corporation and others.<br>
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Common Public License v1.0 which accompanies
-this distribution, and is available at
-<a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/plugins/org.eclipse.wst.server.core/schema/runtimeTypes.exsd b/plugins/org.eclipse.wst.server.core/schema/runtimeTypes.exsd
deleted file mode 100644
index 9d4ad87..0000000
--- a/plugins/org.eclipse.wst.server.core/schema/runtimeTypes.exsd
+++ /dev/null
@@ -1,180 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.wst.server.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.wst.server.core" id="runtimeTypes" name="Runtime Types"/>
- </appInfo>
- <documentation>
- This extension point is used to provide a new runtime type.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="runtimeType" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="runtimeType">
- <annotation>
- <appInfo>
- <meta.element labelAttribute="name"/>
- </appInfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="moduleType" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- specifies a unique identifier for this extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- a translatable name used to identify the runtime type
- </documentation>
- </annotation>
- </attribute>
- <attribute name="description" type="string" use="required">
- <annotation>
- <documentation>
- a translatable description of the runtime type
- </documentation>
- </annotation>
- </attribute>
- <attribute name="vendor" type="string">
- <annotation>
- <documentation>
- a translatable vendor name
- </documentation>
- </annotation>
- </attribute>
- <attribute name="version" type="string">
- <annotation>
- <documentation>
- a translatable version number
- </documentation>
- </annotation>
- </attribute>
- <attribute name="vendorId" type="string">
- <annotation>
- <documentation>
- an id used to identify the vendor
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string">
- <annotation>
- <documentation>
- specifies the fully qualified name of the Java class that extends <samp>RuntimeDelegate</samp>.
-Runtime instances of this type will delegate to instances of this class. Delegates must also have a public 0-arg constructor.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="order" type="string">
- <annotation>
- <documentation>
- an integer order specifying the relative importance of this runtime
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="moduleType">
- <complexType>
- <attribute name="types" type="string" use="required">
- <annotation>
- <documentation>
- a comma separated list of the module types that this runtime supports
- </documentation>
- </annotation>
- </attribute>
- <attribute name="versions" type="string" use="required">
- <annotation>
- <documentation>
- a comma separated list of the module versions that this runtime supports
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is an example of a runtime type extension point:
-
-<p>
-<pre>
- <extension point="org.eclipse.wst.server.core.runtimeTypes">
- <runtimeType
- id="com.example.runtime"
- name="%runtimeTypeName"
- description="%runtimeTypeDescription"
- vendor="%runtimeTypeVendor"
- version="1.0"
- class="com.example.ExampleRuntimeDelegate">
- <moduleType
- types="j2ee.web"
- versions="1.2, 1.3, 1.4"/>
- </runtimeType>
- </extension>
-</pre>
-</p>
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- Value of the attribute <b>class</b> must be a fully qualified name of a Java class that extends <b>org.eclipse.wst.server.core.model.RuntimeDelegate</b> and contains a public 0-arg constructor.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2000, 2003 IBM Corporation and others.<br>
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Common Public License v1.0 which accompanies
-this distribution, and is available at
-<a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/plugins/org.eclipse.wst.server.core/schema/serverLocators.exsd b/plugins/org.eclipse.wst.server.core/schema/serverLocators.exsd
deleted file mode 100644
index 4a0d42d..0000000
--- a/plugins/org.eclipse.wst.server.core/schema/serverLocators.exsd
+++ /dev/null
@@ -1,138 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.wst.server.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.wst.server.core" id="serverLocators" name="Server Locators"/>
- </appInfo>
- <documentation>
- This extension point is used to locate new servers on the local or remote machines.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="serverLocator" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="serverLocator">
- <annotation>
- <appInfo>
- <meta.element labelAttribute="name"/>
- </appInfo>
- </annotation>
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- specifies a unique identifier for this extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- a translatable name used to identify the locator
- </documentation>
- </annotation>
- </attribute>
- <attribute name="description" type="string" use="required">
- <annotation>
- <documentation>
- a translatable description of the locator
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- specifies the fully qualified name of the Java class that implements <samp>IRuntimeLocatorDelegate</samp>.
-Runtime locator instances of this type will delegate to instances of this class.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="supportsRemoteHosts" type="string" use="required">
- <annotation>
- <documentation>
- local and/or remote
- </documentation>
- </annotation>
- </attribute>
- <attribute name="typeIds" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is an example of a server locator extension point:
-
-<p>
-<pre>
- <extension point="org.eclipse.wst.server.core.serverLocators">
- <serverLocator
- id="com.example.locator"
- name="%serverLocatorName"
- description="%serverLocatorDescription"
- class="com.example.ExampleServerLocator"/>
- </extension>
-</pre>
-</p>
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- Value of the attribute <b>class</b> must be a fully qualified name of a Java class that implements the interface <b>org.eclipse.wst.server.core.model.ServerLocatorDelegate</b>.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2000, 2003 IBM Corporation and others.<br>
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Common Public License v1.0 which accompanies
-this distribution, and is available at
-<a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/plugins/org.eclipse.wst.server.core/schema/serverMonitors.exsd b/plugins/org.eclipse.wst.server.core/schema/serverMonitors.exsd
deleted file mode 100644
index b6e832a..0000000
--- a/plugins/org.eclipse.wst.server.core/schema/serverMonitors.exsd
+++ /dev/null
@@ -1,122 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.wst.server.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.wst.server.core" id="serverMonitor" name="Server Monitor"/>
- </appInfo>
- <documentation>
- This extension point is used to provide a new monitor for servers.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="monitor" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="monitor">
- <annotation>
- <appInfo>
- <meta.element labelAttribute="name"/>
- </appInfo>
- </annotation>
- <complexType>
- <sequence>
- </sequence>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- specifies a unique identifier for this extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- a translatable name used to identify this monitor
- </documentation>
- </annotation>
- </attribute>
- <attribute name="description" type="string">
- <annotation>
- <documentation>
- a translatable description of this monitor
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- specifies the fully qualified name of the Java class that implements <samp>IMonitor</samp>
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.wst.server.core.model.StartupDelegate"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is an example of a server monitor extension point:
-
-<p>
-<pre>
-
-</pre>
-</p>
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- Value of the attribute <b>class</b> must be a fully qualified name of a Java class that implements the interface <b>org.eclipse.wst.server.core.model.ServerMonitorDelegate</b>.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2000, 2003 IBM Corporation and others.<br>
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Common Public License v1.0 which accompanies
-this distribution, and is available at
-<a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/plugins/org.eclipse.wst.server.core/schema/serverTasks.exsd b/plugins/org.eclipse.wst.server.core/schema/serverTasks.exsd
deleted file mode 100644
index b8bf0c6..0000000
--- a/plugins/org.eclipse.wst.server.core/schema/serverTasks.exsd
+++ /dev/null
@@ -1,116 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.wst.server.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.wst.server.core" id="serverTasks" name="Server Tasks"/>
- </appInfo>
- <documentation>
- This extension point is used to provide a task that can/should be run before server publishing, startup, etc.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="serverTask" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="serverTask">
- <annotation>
- <appInfo>
- <meta.element labelAttribute="name"/>
- </appInfo>
- </annotation>
- <complexType>
- <sequence>
- </sequence>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- specifies a unique identifier for this extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- specifies the fully qualified name of the Java class that implements <samp>IServerTaskDelegate</samp>.
-Server task instances of this type will delegate to instances of this class.
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.wst.server.core.model.StartupDelegate"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="typeIds" type="string" use="required">
- <annotation>
- <documentation>
- a comma separated list of server type ids that this task may apply to. Used for memory & performance reasons
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is an example of a server task extension point:
-
-<p>
-<pre>
-
-</pre>
-</p>
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- Value of the attribute <b>class</b> must be a fully qualified name of a Java class that implements the interface <b>org.eclipse.wst.server.core.model.ServerTaskDelegate</b>.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2000, 2003 IBM Corporation and others.<br>
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Common Public License v1.0 which accompanies
-this distribution, and is available at
-<a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/plugins/org.eclipse.wst.server.core/schema/serverTypes.exsd b/plugins/org.eclipse.wst.server.core/schema/serverTypes.exsd
deleted file mode 100644
index 812e6b8..0000000
--- a/plugins/org.eclipse.wst.server.core/schema/serverTypes.exsd
+++ /dev/null
@@ -1,224 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.wst.server.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.wst.server.core" id="serverTypes" name="Server Types"/>
- </appInfo>
- <documentation>
- This extension point is used to provide support for a new server type.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="serverType"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="serverType">
- <complexType>
- <sequence>
- </sequence>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- a translatable name used to identify this server type
- </documentation>
- </annotation>
- </attribute>
- <attribute name="description" type="string" use="required">
- <annotation>
- <documentation>
- a translatable description of this server type
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- specifies the fully qualified name of the Java class that extends <samp>org.eclipse.wst.server.core.model.ServerDelegate</samp>.
-Server instances of this type will delegate to instances of this class. Delegates must also have a public 0-arg constructor.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="behaviourClass" type="string">
- <annotation>
- <documentation>
- specifies the fully qualified name of the Java class that implements <samp>org.eclipse.wst.server.core.model.ServerBehaviourDelegate</samp>.
-Server instances of this type will delegate to instances of this class. Delegates must also have a public 0-arg constructor.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="hasConfiguration" type="boolean">
- <annotation>
- <documentation>
- true if this server has server configuration files
- </documentation>
- </annotation>
- </attribute>
- <attribute name="runtimeTypeId" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="startable" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="order" type="string">
- <annotation>
- <documentation>
- an integer order specifying the relative importance of this server type
- </documentation>
- </annotation>
- </attribute>
- <attribute name="launchConfigId" type="string">
- <annotation>
- <documentation>
- the launch configuration id for the launch configuration that is able to start this server
- </documentation>
- </annotation>
- </attribute>
- <attribute name="supportsRemoteHosts" type="string">
- <annotation>
- <documentation>
- true if this server type can work with remote host names, false if this server type can only work on localhost. if unspecified, false is assumed
- </documentation>
- </annotation>
- </attribute>
- <attribute name="runtime" type="string">
- <annotation>
- <documentation>
- "true" if this server requires a runtime, "false" otherwise
- </documentation>
- </annotation>
- </attribute>
- <attribute name="launchModes" type="string">
- <annotation>
- <documentation>
- the launch modes that this server supports
- </documentation>
- </annotation>
- </attribute>
- <attribute name="initialState" type="string">
- <annotation>
- <documentation>
- the intial state of the server, either "started", or "stopped". if this attribute is not specified, the server state will be "unknown"
- </documentation>
- </annotation>
- </attribute>
- <attribute name="stateSet" type="string">
- <annotation>
- <documentation>
- the state set of the server (changes menu options and UI). values are "managed", "attach", and "publish"
- </documentation>
- </annotation>
- </attribute>
- <attribute name="startTimeout" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="stopTimeout" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is an example of a server type extension point:
-
-<p>
-<pre>
-<extension point="org.eclipse.wst.server.core.serverTypes">
- <serverType
- id="com.example.serverType"
- name="%serverTypeName"
- description="%serverTypeDescription"
- hosts="localhost, remote"
- runtime="true"
- monitorable="true"
- initialState="stopped"
- configurationTypeId="com.example.serverConfiguration"
- launchConfigId="com.example.launchConfigurationType"
- runtimeTypeId="com.example.runtime"
- class="com.example.ExampleServerDelegate"
- workingCopyClass="com.example.ExampleServerWorkingCopyDelegate">
- </serverType>
- </extension>
-</pre>
-</p>
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- Value of the attribute <b>class</b> must be a fully qualified name of a Java class that extends the abstract class <b>org.eclipse.wst.server.core.model.ServerDelegate</b> and has a public 0-arg constructor.
-
-Value of the attribute <b>behaviourClass</b> must be a fully qualified name of a Java class that extends the abstract class <b>org.eclipse.wst.server.core.model.ServerBehaviourDelegate</b> and has a public 0-arg constructor.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2000, 2003 IBM Corporation and others.<br>
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Common Public License v1.0 which accompanies
-this distribution, and is available at
-<a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/plugins/org.eclipse.wst.server.core/schema/startup.exsd b/plugins/org.eclipse.wst.server.core/schema/startup.exsd
deleted file mode 100644
index 1506bad..0000000
--- a/plugins/org.eclipse.wst.server.core/schema/startup.exsd
+++ /dev/null
@@ -1,112 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.wst.server.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.wst.server.core" id="startup" name="Startup"/>
- </appInfo>
- <documentation>
- This extension point provides a way to invoke code during the server core plugin startup. Use sparingly.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="startup" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="startup">
- <annotation>
- <appInfo>
- <meta.element labelAttribute="name"/>
- </appInfo>
- </annotation>
- <complexType>
- <sequence>
- </sequence>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- specifies a unique identifier for this extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- specifies the fully qualified name of the Java class that extends <samp>StartupDelegate</samp>
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.wst.server.core.model.StartupDelegate"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is an example of a startup extension point:
-
-<p>
-<pre>
- <extension point="org.eclipse.wst.server.core.startup">
- <startup
- id="com.example.startup"
- class="com.example.ExampleStartup"/>
- </extension>
-</pre>
-</p>
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- Value of the attribute <b>class</b> must be a fully qualified name of a Java class that extends <b>org.eclipse.wst.server.core.model.StartupDelegate</b> and contains a public 0-arg constructor.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2000, 2003 IBM Corporation and others.<br>
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Common Public License v1.0 which accompanies
-this distribution, and is available at
-<a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IClient.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IClient.java
deleted file mode 100644
index b45b0de..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IClient.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.debug.core.ILaunch;
-/**
- * A launchable client is a client side application or test
- * harness that can be launched (run) against a resource
- * running on a server.
- *
- * <p>This interface is not intended to be implemented by clients.</p>
- */
-public interface IClient {
- /**
- * Returns the id of this client. Each known client has a distinct id.
- * Ids are intended to be used internally as keys; they are not
- * intended to be shown to end users.
- *
- * @return the client id
- */
- public String getId();
-
- /**
- * Returns the displayable name for this client.
- * <p>
- * Note that this name is appropriate for the current locale.
- * </p>
- *
- * @return a displayable name for this client
- */
- public String getName();
-
- /**
- * Returns the displayable description for this client.
- * <p>
- * Note that this description is appropriate for the current locale.
- * </p>
- *
- * @return a displayable description for this client
- */
- public String getDescription();
-
- /**
- * Returns true if this launchable can be run by this client.
- *
- * @param server org.eclipse.wst.server.core.IServer
- * @param launchable org.eclipse.wst.server.core.ILaunchable
- * @param launchMode String
- * @return boolean
- */
- public boolean supports(IServer server, ILaunchable launchable, String launchMode);
-
- /**
- * Launches the client.
- *
- * @param server
- * @param launchable
- * @param launchMode
- * @param launch
- * @return
- */
- public IStatus launch(IServer server, ILaunchable launchable, String launchMode, ILaunch launch);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IElement.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IElement.java
deleted file mode 100644
index b201748..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IElement.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-/**
- * Provides common methods for working with elements that are
- * modified via working copies. This interface provides the
- * getters; the setters are on {@link IElementWorkingCopy}.
- * <p>
- * [issue: Why are attributes exposed? The attribute ids and
- * values are passed to property change listeners. However,
- * they are not useful unless there is a spec'd correlation
- * between methods like getName and an attribute "name". The
- * constants are declared on Base, which is internal.]
- * </p>
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
- *
- * @since 1.0
- */
-public interface IElement {
- /**
- * Returns the displayable name for this element.
- * <p>
- * Note that this name is appropriate for the current locale.
- * </p>
- *
- * @return a displayable name
- */
- public String getName();
-
- /**
- * Returns the id of this element.
- * Each element (of a given type) has a distinct id, fixed for
- * its lifetime. Ids are intended to be used internally as keys;
- * they are not intended to be shown to end users.
- *
- * @return the element id
- */
- public String getId();
-
- /**
- * Deletes the persistent representation of this element.
- * <p>
- * [issue: This method is out of place. Elements do not
- * have a notion of being connected to an underlying file.]
- * </p>
- *
- * @throws CoreException [missing]
- */
- public void delete() throws CoreException;
-
- /**
- * Returns whether this element is locked.
- * When an element is locked, the user cannot make changes to it.
- * <p>
- * [issue: It's odd to have this at the API level because
- * it has no force. Once would modify a locked element as
- * readily as an unlocked one, via a working copy.
- * This facility, which is unused, needs to be motivated
- * (or removed).]
- * </p>
- *
- * @return <code>true</code> if this element is locked,
- * and <code>false</code> otherwise
- */
- public boolean isLocked();
-
- /**
- * Returns true if this element is private (not shown in the UI).
- *
- * @return boolean
- */
- public boolean isPrivate();
-
- /**
- * Returns true if this is a working copy.
- *
- * @return boolean
- */
- public boolean isWorkingCopy();
-
- /**
- * Returns true if the plugin containing the delegate is loaded.
- *
- * @return boolean
- */
- public boolean isDelegatePluginActivated();
-
- /**
- * Returns true if the delegate has been loaded.
- *
- * @return
- */
- public boolean isDelegateLoaded();
-
- public IStatus validateEdit(Object context);
-
- public int getTimestamp();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IElementWorkingCopy.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IElementWorkingCopy.java
deleted file mode 100644
index 96135a1..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IElementWorkingCopy.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core;
-
-import java.beans.PropertyChangeListener;
-/**
- * Provides additional methods common to working copies of an element.
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
- *
- * @since 1.0
- */
-public interface IElementWorkingCopy extends IElement {
- public static final int TIMESTAMP_ERROR = 5;
-
- /**
- * Sets the displayable name for this element.
- * <p>
- * The name should be appropriate for the current locale.
- * </p>
- *
- * @param name a displayable name
- * @see IElement#getName()
- */
- public void setName(String name);
-
- /**
- * Sets whether this element is locked.
- * When an element is locked, the user cannot make changes to it.
- * <p>
- * [issue: See issue on IElement.isLocked.]
- * </p>
- *
- * @param b <code>true</code> if this element is locked,
- * and <code>false</code> otherwise
- * @see IElement#isLocked()
- */
- public void setLocked(boolean b);
-
- /**
- * Sets whether this element is private.
- * Generally speaking, elements marked private are internal ones
- * that should not be shown to users (because they won't know
- * anything about them).
- *
- * @param b <code>true</code> if this element is private,
- * and <code>false</code> otherwise
- * @see IElement#isPrivate()
- */
- public void setPrivate(boolean b);
-
- /**
- * Returns whether this working copy has unsaved changes.
- * <p>
- * [issue: It unfortunate that working copy creation and saving
- * are nowhere represented in the IElement and IElementWorkingCopy
- * (everything is on the particular subinterfaces).]
- * </p>
- *
- * @return <code>true</code> if this working copy has unsaved
- * changes, and <code>false</code> otherwise
- */
- public boolean isDirty();
-
- /**
- * Adds a property change listener to this server.
- *
- * @param listener java.beans.PropertyChangeListener
- */
- public void addPropertyChangeListener(PropertyChangeListener listener);
-
- /**
- * Removes a property change listener from this server.
- *
- * @param listener java.beans.PropertyChangeListener
- */
- public void removePropertyChangeListener(PropertyChangeListener listener);
-
- /**
- * Fires a property change event.
- */
- public void firePropertyChangeEvent(String propertyName, Object oldValue, Object newValue);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ILaunchable.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ILaunchable.java
deleted file mode 100644
index 21cc1e2..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ILaunchable.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core;
-/**
- * A launchable is a "reference" to a module object. The
- * module object is the actual resource on the server; the
- * launchable is the information necessary to access that
- * resource. Examples may include HTTP requests and JNDI names.
- */
-public interface ILaunchable {
- /**
- * Returns the id of this launchable. Each known launchable has a distinct id.
- * Ids are intended to be used internally as keys; they are not
- * intended to be shown to end users.
- *
- * @return the launchable id
- */
- public String getId();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ILaunchableAdapter.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ILaunchableAdapter.java
deleted file mode 100644
index 00d949b..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ILaunchableAdapter.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core;
-
-import org.eclipse.core.runtime.CoreException;
-/**
- * This interface, typically implemented by the server
- * code, converts from an IModuleArtifact to an
- * ILaunchable.
- *
- * <p>This interface is not intended to be implemented by clients.</p>
- */
-public interface ILaunchableAdapter {
- /**
- * Returns the id of this adapter. Each known adapter has a distinct id.
- * Ids are intended to be used internally as keys; they are not
- * intended to be shown to end users.
- *
- * @return the adapter id
- */
- public String getId();
-
- /**
- * Returns a launchable object from this module object.
- *
- * @param server
- * @param moduleObject
- * @return
- * @exception
- */
- public ILaunchable getLaunchable(IServer server, IModuleArtifact moduleObject) throws CoreException;
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IModule.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IModule.java
deleted file mode 100644
index 7f9e8ae..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IModule.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.wst.server.core.model.IModuleListener;
-/**
- * A module is a unit of "content" that can be published to a
- * server.
- * <p>
- * All modules have a module type, which is fixed for the
- * lifetime of the module. The set of module types (or
- * "kinds") is open-ended.
- * </p>
- * <p>
- * All modules are created by module factories using the moduleFactories
- * extension point.
- * </p>
- * <p>
- * The content of a module is a collection of file and folder
- * resources in the workspace.
- * </p>
- * <p>
- * In principle, a module exists independent of any
- * particular server. The same module instance can be associated
- * with multiple server instances at the same time. That is
- * why you cannot ask the module which server it's associated
- * with.
- * </p>
- * <p>
- * [issue: Equality/identify for modules?]
- * </p>
- * <p>
- * Concrete module types are represented by concrete classes
- * implementing this interface. The only legitimate reason
- * to declare a subclass is to implement a module factory.
- * </p>
- * <p>
- * <it>Caveat: The server core API is still in an early form, and is
- * likely to change significantly before the initial release.</it>
- * </p>
- *
- * @since 1.0
- */
-public interface IModule extends IAdaptable {
- /**
- * Returns the id of this module.
- * Each module has a distinct id, used to distinguish this
- * module from all other modules in the workspace (and
- * within a server). Ids are intended to be used internally
- * as keys; they are not intended to be shown to end users.
- *
- * @return the module id
- */
- public String getId();
-
- /**
- * Validates this module.
- * <p>
- * [issue: Conjecture: Each different type of module prescribes
- * legal arrangements of, and the significance of, the files within
- * it. This would be spelled out in the spec for the particular
- * module types.
- * This validate operation is suppose to check the actual
- * arrangement of files in this module to see whether they
- * meet expectations.
- * It's an open question as to how "strenuous" a check this
- * is.]
- * </p>
- * <p>
- * [issue: Old comment said: "If there is an error
- * that should block the server from starting (e.g. major errors)
- * it should be returned from this method. This method can also be used to
- * return warning for such things as an open (and dirty) editor."]
- * </p>
- * <p>
- * [issue: All existing implementations of this return null,
- * which is illegal.]
- * </p>
- * <p>
- * [issue: Old comment said: "Returns an IStatus that is used to determine if this object can
- * be published to the server." Since the same module can
- * be associated with any number of servers, "the server" is
- * ill-defined.]
- * </p>
- * <p>
- * [issue: Old comment said: "Should return an error if there
- * is a major problem with the resources, or can be used to
- * return warnings on unsaved files, etc." It is usually
- * difficult in principle for core-level infrastructure to
- * detect whether there are open editors with unsaved changes.]
- * </p>
- *
- * @return a status object with code <code>IStatus.OK</code> if the given
- * module is valid, otherwise a status object indicating what is
- * wrong with it
- */
- public IStatus validate(IProgressMonitor monitor);
-
- /**
- * Returns the root resources of this module. All members
- * belong to this module (as do their members, and so on).
- * <p>
- * [issue: What are the exact constraints on where these
- * resources are located?
- * Do they all have to be inside the workspace?
- * Do they all have to be in the same project?
- * When a folder is included, does that mean the entire
- * subtree is published to server?]
- * </p>
- *
- * @return the members of this module
- * @throws CoreException [missing]
- */
- //public IModuleResource[] members() throws CoreException;
-
- /**
- * Returns the displayable name for this module.
- * <p>
- * Note that this name is appropriate for the current locale.
- * </p>
- *
- * @return a displayable name for this module
- */
- public String getName();
-
- /**
- * Returns the type of this module.
- *
- * @return
- */
- public IModuleType getModuleType();
-
- /**
- * Returns whether this module currently exists.
- * <p>
- * [issue: The method touches on the important problem
- * of when a module ceases to exist. Need to explain
- * the full lifecycle of a module.
- * Should it be synonymous with the module root
- * IContainer.exists()? That is, the module exists
- * as long as the IContainer that holds all its module
- * resources exists()?]
- * </p>
- *
- * @return <code>true</code> this module currently exists, and
- * <code>false</code> if it has been deleted or moved
- */
- //public boolean exists();
-
- /**
- * Returns the workbench project that this module is contained in,
- * or null if the module is outside of the workspace.
- *
- * @return org.eclipse.core.resources.IProject
- */
- public IProject getProject();
-
- /**
- * Add a listener for child module that are added/removed from this
- * module.
- * Has no effect if an identical listener is already registered.
- *
- * @param listener org.eclipse.wst.server.core.model.IModuleListener
- */
- public void addModuleListener(IModuleListener listener);
-
- /**
- * Add a listener for child modules that are added/removed from this
- * module.
- * Has no effect if the listener is not registered.
- *
- * @param listener org.eclipse.wst.server.core.model.IModuleListener
- */
- public void removeModuleListener(IModuleListener listener);
-
- /**
- * Returns the child modules of this module.
- *
- * @return org.eclipse.wst.server.core.model.IModule[]
- */
- public IModule[] getChildModules(IProgressMonitor monitor);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IModuleArtifact.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IModuleArtifact.java
deleted file mode 100644
index babb4f7..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IModuleArtifact.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core;
-/**
- * A module object is a resource within a module,
- * which can be launched on the server. Examples of module
- * objects could include servlets, HTML pages, or EJB beans.
- */
-public interface IModuleArtifact {
- /**
- * Returns the id of this module object. Each known
- * module object has a distinct id.
- * Ids are intended to be used internally as keys; they are not
- * intended to be shown to end users.
- *
- * @return the module object id
- */
- public String getId();
-
- /**
- * Returns the module that this object is a part of.
- *
- * @return org.eclipse.wst.server.core.IModule
- */
- public IModule getModule();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IModuleArtifactAdapter.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IModuleArtifactAdapter.java
deleted file mode 100644
index d7c41f2..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IModuleArtifactAdapter.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core;
-/**
- * A module object adapter converts from some view's model
- * object into a module object that is recognized by the
- * server.
- *
- * <p>This interface is not intended to be implemented by clients.</p>
- */
-public interface IModuleArtifactAdapter {
- /**
- * Returns the id of this adapter. Each known adapter has a distinct id.
- * Ids are intended to be used internally as keys; they are not
- * intended to be shown to end users.
- *
- * @return the adapter id
- */
- public String getId();
-
- /**
- * Returns the (super) class name that this adapter can work with.
- *
- * @return java.lang.String
- */
- public String getObjectClassName();
-
- /**
- * Returns true if the plugin that loaded this class has been loaded.
- *
- * @return boolean
- */
- public boolean isPluginActivated();
-
- /**
- * Converts from a model object to an IModuleArtifact.
- *
- * @param obj
- * @return
- */
- public IModuleArtifact getModuleObject(Object obj);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IModuleType.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IModuleType.java
deleted file mode 100644
index 741e3d2..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IModuleType.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core;
-/**
- * Represents the type of a module.
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
- * <p>
- * <it>Caveat: The server core API is still in an early form, and is
- * likely to change significantly before the initial release.</it>
- * </p>
- *
- * @since 1.0
- */
-public interface IModuleType {
- /**
- * Returns the module type id.
- *
- * @return the module type id
- */
- public String getId();
-
- /**
- * Returns the displayable name for this module type.
- * <p>
- * Note that this name is appropriate for the current locale.
- * </p>
- *
- * @return a displayable name for this module type
- */
- public String getName();
-
- /**
- * Returns the version (spec level), e.g., "1.0", "1.3.2".
- * <p>
- * [issue: This notion of a module type "version" appears here.
- * There is no counterpart elsewhere (and certainly not in
- * IModuleType). The phrase "spec level" suggests something
- * a little more J2EE-centric (what would be the spec level for
- * a static html web module?) It feels like this should be folded
- * in to the module type/kind id.]
- * </p>
- * <p>
- * [issue: Spec format of version string?]
- * </p>
- *
- * @return the version
- */
- public String getVersion();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IModuleVisitor.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IModuleVisitor.java
deleted file mode 100644
index 466ad8c..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IModuleVisitor.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core;
-/**
- * A visitor on a server's modules.
- */
-public interface IModuleVisitor {
- /**
- * Visit a single module. Returns true to keep visiting, and
- * false if it should stop visiting the module.
- *
- * @param parents org.eclipse.wst.server.core.IModule[]
- * @param module org.eclipse.wst.server.core.IModule
- * @return boolean
- */
- public boolean visit(IModule[] parents, IModule module);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IMonitoredServerPort.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IMonitoredServerPort.java
deleted file mode 100644
index 18bc3b9..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IMonitoredServerPort.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core;
-/**
- * An monitored port on a server.
- *
- * <p>This interface is not intended to be implemented by clients.</p>
- */
-public interface IMonitoredServerPort {
- /**
- * Returns the server that it being monitored.
- *
- * @return org.eclipse.wst.server.core.IServer
- */
- public IServer getServer();
-
- /**
- * Returns the server port.
- *
- * @return org.eclipse.wst.server.model.IServerPort
- */
- public IServerPort getServerPort();
-
- /**
- * Return the port that is being used to monitor.
- *
- * @return int
- */
- public int getMonitorPort();
-
- /**
- * Returns the content types that are being monitored, or null for all content.
- *
- * @return java.lang.String[]
- */
- public String[] getContentTypes();
-
- /**
- * Returns true if the monitor is currently running/active.
- *
- * @return boolean
- */
- public boolean isStarted();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IOptionalTask.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IOptionalTask.java
deleted file mode 100644
index 0bab31b..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IOptionalTask.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core;
-/**
- * An optional task.
- */
-public interface IOptionalTask extends ITask {
- public static final int TASK_UNNECESSARY = 0;
- public static final int TASK_COMPLETED = 1;
- public static final int TASK_READY = 2;
- public static final int TASK_PREFERRED = 3;
- public static final int TASK_MANDATORY = 4;
-
- /**
- * Returns the status of this task.
- *
- * @return byte
- */
- public int getStatus();
-
- /**
- * Returns the order (index/priority).
- *
- * @return int
- */
- public int getOrder();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IProjectProperties.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IProjectProperties.java
deleted file mode 100644
index 49c1b8d..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IProjectProperties.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-/**
- * This interface holds information on the properties of a given project.
- *
- * <p>This interface is not intended to be implemented by clients.</p>
- */
-public interface IProjectProperties {
- /**
- * Returns the preferred runtime server for the project. This method
- * returns null if the server was never chosen or does not currently exist. (if the
- * server is recreated or was in a closed project, etc. this method will return
- * the original value if it becomes available again)
- *
- * @return org.eclipse.wst.server.core.IServer
- */
- public IServer getDefaultServer();
-
- /**
- * Sets the preferred runtime server for the project. Set the server to
- * null to clear the setting. If there is a problem saving the file, a CoreException
- * will be thrown.
- *
- * @param server org.eclipse.wst.server.model.IServer
- * @param monitor org.eclipse.core.runtime.IProgressMonitor
- * @throws org.eclipse.core.runtime.CoreException
- */
- public void setDefaultServer(IServer server, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Returns the current runtime target for this project.
- *
- * @return
- */
- public IRuntime getRuntimeTarget();
-
- /**
- * Sets the runtime target for the project.
- *
- * @param target
- * @param monitor
- */
- public void setRuntimeTarget(IRuntime runtime, IProgressMonitor monitor) throws CoreException;
-
- /**
- *
- */
- public boolean isServerProject();
-
- /**
- *
- * @param b
- */
- public void setServerProject(boolean b, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Adds a new project properties listener.
- * Has no effect if an identical listener is already registered.
- *
- * @param listener
- */
- public void addProjectPropertiesListener(IProjectPropertiesListener listener);
-
- /**
- * Removes an existing project properties listener.
- * Has no effect if the listener is not registered.
- *
- * @param listener
- */
- public void removeProjectPropertiesListener(IProjectPropertiesListener listener);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IProjectPropertiesListener.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IProjectPropertiesListener.java
deleted file mode 100644
index 13e2ee3..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IProjectPropertiesListener.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core;
-
-import org.eclipse.core.resources.IProject;
-/**
- * A project properties listener. Fires events when the default server or
- * runtime target changes. Note that this interface should be used for
- * informational purposes only. If (e.g.) you have code that needs to respond
- * to a specific runtime target, you should use the runtimeTargetHandler
- * extension point. The extension point will allow your code to be automatically
- * loaded when necessary (instead of having to preload and add a listener),
- * will not cause unnecessary plugin loading, and will allow ordering of
- * setting/unsetting the runtime target.
- */
-public interface IProjectPropertiesListener {
- /**
- * Fired when the default server for the project changes.
- *
- * @param project org.eclipse.core.resources.IProject
- * @param server org.eclipse.wst.server.core.IServer
- */
- public void defaultServerChanged(IProject project, IServer server);
-
- /**
- * Fired when the runtime target for the project changes.
- *
- * @param project org.eclipse.core.resources.IProject
- * @param server org.eclipse.wst.server.core.IRuntime
- */
- public void runtimeTargetChanged(IProject project, IRuntime runtime);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IPublishListener.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IPublishListener.java
deleted file mode 100644
index 49b2846..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IPublishListener.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core;
-
-import org.eclipse.core.runtime.IStatus;
-/**
- * A publish listener is used to listen for publishing events from a server.
- * The events are typically received in the following order:
- *
- * publishStarted() - The publish operation is starting
- * publishModuleStarted() - This section is fired for each module in the server
- * publishModuleFinished() - This module is finished publishing
- * publishFinished() - The publish operation is finished
- */
-public interface IPublishListener {
- /**
- * Fired to notify that publishing has begun.
- *
- * @param server
- */
- public void publishStarted(IServer server);
-
- /**
- * Fired with the module to notify that publishing of this module
- * is starting.
- *
- * @param server
- * @param parents
- * @param module
- */
- public void publishModuleStarted(IServer server, IModule[] parents, IModule module);
-
- /**
- * The event is fired when the module has finished publishing,
- * and includes the status.
- *
- * @param server
- * @param parents
- * @param module
- * @param status
- */
- public void publishModuleFinished(IServer server, IModule[] parents, IModule module, IStatus status);
-
- /**
- * Publishing has finished. Returns the overall status.
- *
- * @param server
- * @param status
- */
- public void publishFinished(IServer server, IStatus status);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IRuntime.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IRuntime.java
deleted file mode 100644
index 33eee6e..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IRuntime.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core;
-
-import org.eclipse.core.runtime.*;
-/**
- * Represents a runtime instance. Every runtime is an instance of a
- * particular, fixed runtime type.
- * <p>
- * Servers have a runtime. The server runtime corresponds to the
- * installed code base for the server. The main role played by the server
- * runtime is in identifying code libraries to compile or build against.
- * In the case of local servers, the server runtime may play a secondary role
- * of being used to launch the server for testing. Having the server runtimes
- * identified as an entity separate from the server itself facilitates sharing
- * server runtimes between several servers.
- * </p>
- * <p>
- * IRuntime implements IAdaptable to allow users to obtain a runtime-type-specific
- * class. By casting the runtime extension to the type prescribed in the API
- * documentation for that particular runtime type, the client can access
- * runtime-type-specific properties and methods. getAdapter() may involve plugin
- * loading, and should not be called from popup menus, etc.
- * </p>
- * <p>
- * [issue: As mentioned in IRuntimeType, the term "runtime"
- * is misleading, given that the main reason is for build time classpath
- * contributions, not for actually running anything. "libraries" might be a
- * better choice.]
- * </p>
- * <p>
- * The server framework maintains a global list of all known runtime instances
- * ({@link ServerCore#getRuntimes()}).
- * </p>
- * <p>
- * All runtimes have a unique id. Two runtimes (or more likely a runtime and it's
- * working copy) with the same id are equal, and two runtimes with different ids
- * are never equal.
- * </p>
- *
- * <p>This interface is not intended to be implemented by clients.</p>
- * <p>
- * <it>Caveat: The server core API is still in an early form, and is
- * likely to change significantly before the initial release.</it>
- * </p>
- *
- * @since 1.0
- */
-public interface IRuntime extends IElement, IAdaptable {
- /**
- * Returns the type of this runtime instance.
- *
- * @return the runtime type
- */
- public IRuntimeType getRuntimeType();
-
- /**
- * Returns a runtime working copy for modifying this runtime instance.
- * If this instance is already a working copy, it is returned.
- * If this instance is not a working copy, a new runtime working copy
- * is created with the same id and attributes.
- * Clients are responsible for saving or releasing the working copy when
- * they are done with it.
- * <p>
- * The runtime working copy is related to this runtime instance
- * in the following ways:
- * <pre>
- * this.getWorkingCopy().getId() == this.getId()
- * this.getWorkingCopy().getOriginal() == this
- * </pre>
- * </p>
- * <p>
- * [issue: IRuntimeWorkingCopy extends IRuntime.
- * Runtime.getWorkingCopy() create a new working copy;
- * RuntimeWorkingCopy.getWorkingCopy() returns this.
- * This may be convenient in code that is ignorant of
- * whether they are dealing with a working copy or not.
- * However, it is hard for clients to manage working copies
- * with this design.
- * </p>
- *
- * @return a new working copy
- */
- public IRuntimeWorkingCopy createWorkingCopy();
-
- /**
- * Returns the absolute path in the local file system to the root of the runtime,
- * typically the installation directory.
- *
- * @return the location of this runtime, or <code>null</code> if none
- */
- public IPath getLocation();
-
- /**
- * Returns whether this runtime is a stub (used for compilation only) or a full runtime.
- *
- * @return <code>true</code> if this runtime is a stub, and <code>false</code> otherwise
- */
- public boolean isStub();
-
- /**
- * Validates this runtime instance. This method returns an error if the runtime
- * is pointing to a null or invalid location (e.g. not pointing to the correct
- * installation directory), or if the runtime-type-specific properties are missing
- * or invalid.
- * <p>
- * This method is not on the working copy so that the runtime can be validated at
- * any time.
- * </p>
- *
- * @return a status object with code <code>IStatus.OK</code> if this
- * runtime is valid, otherwise a status object indicating what is
- * wrong with it
- */
- public IStatus validate(IProgressMonitor monitor);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IRuntimeLifecycleListener.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IRuntimeLifecycleListener.java
deleted file mode 100644
index a25ff91..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IRuntimeLifecycleListener.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core;
-/**
- * Listener interface for runtime changes.
- */
-public interface IRuntimeLifecycleListener {
- /**
- * A new runtime has been created.
- *
- * @param runtime org.eclipse.wst.server.core.IRuntime
- */
- public void runtimeAdded(IRuntime runtime);
-
- /**
- * An existing runtime has been updated or modified.
- *
- * @param runtime org.eclipse.wst.server.core.IRuntime
- */
- public void runtimeChanged(IRuntime runtime);
-
- /**
- * A existing runtime has been removed.
- *
- * @param runtime org.eclipse.wst.server.core.IRuntime
- */
- public void runtimeRemoved(IRuntime runtime);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IRuntimeLocator.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IRuntimeLocator.java
deleted file mode 100644
index 281cf1f..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IRuntimeLocator.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-/**
- * A runtime locator provides the ability to locate or search for additional
- * runtimes of a particular type.
- *
- * <p>This interface is not intended to be implemented by clients.</p>
- *
- * @since 1.0
- */
-public interface IRuntimeLocator {
- public interface RuntimeSearchListener {
- /**
- * Called when a new runtime is found by the locator.
- * The runtime must never be null.
- *
- * @param runtime the runtime that was found.
- */
- public void runtimeFound(IRuntimeWorkingCopy runtime);
- }
-
- /**
- * Returns the id of this runtime locator.
- * Each known runtime locator has a distinct id.
- * Ids are intended to be used internally as keys; they are not
- * intended to be shown to end users.
- *
- * @return the runtime locator id
- */
- public String getId();
-
- /**
- * Returns the displayable name for this runtime locator.
- * <p>
- * Note that this name is appropriate for the current locale.
- * </p>
- *
- * @return a displayable name for this runtime locator
- */
- public String getName();
-
- /**
- * Returns the displayable description for this runtime locator.
- * <p>
- * Note that this description is appropriate for the current locale.
- * </p>
- *
- * @return a displayable description for this runtime locator
- */
- public String getDescription();
-
- /**
- * Returns true if the runtime locator can find runtimes of the given type.
- * The id should never be null.
- *
- * @param runtimeTypeId the id of a runtime type
- * @return boolean
- */
- public boolean supportsType(String runtimeTypeId);
-
- /**
- * Searches for local runtimes.
- * It uses the callback listener to report runtimes that are found.
- * The path contains the absolute path of the folder to search in,
- * or <code>null</code> to search the entire machine.
- *
- * @param path the path to search for runtimes in
- * @param listener a listener to report status to
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting and cancellation are not desired
- * @throws CoreException
- */
- public void searchForRuntimes(IPath path, RuntimeSearchListener listener, IProgressMonitor monitor) throws CoreException;
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IRuntimeTargetHandler.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IRuntimeTargetHandler.java
deleted file mode 100644
index e94fdc8..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IRuntimeTargetHandler.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-/**
- * A runtime target handler is used to apply some properties to a project
- * this is being targeted to a given runtime. For instance, the handler
- * might update the classpath of a Java project to include the runtime's
- * classes, add validation for the given runtime, or restrict the type of
- * resources that can be created.
- *
- * <p>This interface is not intended to be implemented by clients.</p>
- */
-public interface IRuntimeTargetHandler extends IAdaptable {
- /**
- * Returns the id of this runtime target handler.
- * Each known runtime target handler has a distinct id.
- * Ids are intended to be used internally as keys; they are not
- * intended to be shown to end users.
- *
- * @return the runtime target handler id
- */
- public String getId();
-
- /**
- * Returns <code>true</code> if this runtime target handler supports
- * (can work with) the given runtime.
- *
- * @param runtimeType a runtime type
- * @return <code>true</code> if the handler can accept the given runtime type,
- * and <code>false</code> otherwise
- */
- public boolean supportsRuntimeType(IRuntimeType runtimeType);
-
- /**
- * Set the runtime target on the given project.
- *
- * @param project
- * @param runtime
- * @param monitor
- * @throws CoreException
- */
- public void setRuntimeTarget(IProject project, IRuntime runtime, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Remove the runtime target from the given project. This method will undo
- * all changes made in setRuntimeTarget().
- *
- * @param project
- * @param runtime
- * @param monitor
- * @throws CoreException
- */
- public void removeRuntimeTarget(IProject project, IRuntime runtime, IProgressMonitor monitor) throws CoreException;
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IRuntimeType.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IRuntimeType.java
deleted file mode 100644
index 349aa55..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IRuntimeType.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-/**
- * Represents a (server) runtime type from which runtime instances can be
- * created.
- * <p>
- * The server core framework supports
- * an open-ended set of runtime types, which are contributed via
- * the <code>runtimeTypes</code> extension point in the server core
- * plug-in. Runtime type objects carry no state (all information is
- * read-only and is supplied by the server runtime type declaration).
- * The global list of known runtime types is available via
- * {@link ServerCore#getRuntimeTypes()}.
- * </p>
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
- * <p>
- * [issue: The term "runtime" is misleading, given that the main
- * reason is for build time classpath contributions, not for actually
- * running anything. "libraries" might be a better choice.]
- * </p>
- * <p>
- * [issue: What value do runtimes add?
- * It's main role is for setting up the Java build classpath
- * for projects holding modules that must be Java compiled.
- * If the notion of module is to transcend the vagaries of particular
- * types of server, and, indeed, be published to multiple servers
- * simultaneously, then matters of build classpath had better not
- * be tied to the particular servers involved.]
- * </p>
- * <p>
- * [issue: Equality/identify for runtime types? Are IRuntimeType
- * instances guaranteed to be canonical (client can use ==),
- * or is it possible for there to be non-identical IRuntimeType
- * objects in play that both represent the same runtime type?
- * The latter is the more common; type should spec equals.]
- * </p>
- * <p>
- * <it>Caveat: The server core API is still in an early form, and is
- * likely to change significantly before the initial release.</it>
- * </p>
- *
- * @since 1.0
- */
-public interface IRuntimeType {
- /**
- * Returns the id of this runtime type.
- * Each known server runtime type has a distinct id.
- * Ids are intended to be used internally as keys; they are not
- * intended to be shown to end users.
- *
- * @return the runtime type id
- */
- public String getId();
-
- /**
- * Returns the displayable name for this runtime type.
- * <p>
- * Note that this name is appropriate for the current locale.
- * </p>
- *
- * @return a displayable name for this runtime type
- */
- public String getName();
-
- /**
- * Returns the displayable description for this runtime type.
- * <p>
- * Note that this description is appropriate for the current locale.
- * </p>
- *
- * @return a displayable description for this runtime type
- */
- public String getDescription();
-
- /**
- * Returns the displayable vendor name for this runtime type. If the
- * runtime type did not specific a vendor, an empty string is returned.
- * <p>
- * Note that this description is appropriate for the current locale.
- * </p>
- *
- * @return a displayable vendor name for this runtime type
- */
- public String getVendor();
-
- /**
- * Returns the displayable version name for this runtime type. If the
- * runtime type did not specific a vendor, an empty string is returned.
- * <p>
- * Note that this description is appropriate for the current locale.
- * </p>
- *
- * @return a displayable version name for this runtime type
- */
- public String getVersion();
-
- /**
- * Returns an array of module types that this runtime type can support.
- * <p>
- * A new array is returned on each call, so clients may store or modify the result.
- * </p>
- *
- * @return the array of module types {@link IModuleType}
- */
- public IModuleType[] getModuleTypes();
-
- /**
- * Returns whether this runtime type can be instantiated.
- * <p>
- * [issue: It's unclear what this method is for.
- * The implementation checks whether the "class"
- * and "workingCopyClass" attributes (both optional) were specified.
- * What would be the point of a runtime type that didn't
- * have both of these attributes and could not be "created"?]
- * </p>
- *
- * @return <code>true</code> if this type of runtime can be
- * instantiated, and <code>false</code> if it cannot
- * @see #createRuntime(String)
- */
- public boolean canCreate();
-
- /**
- * Creates a working copy instance of this runtime type.
- * After setting various properties of the working copy,
- * the client should call {@link IRuntimeWorkingCopy#save(IProgressMonitor)}
- * to bring the runtime instance into existence.
- * <p>
- * Default values are set by calling the instance's delegate.
- * Clients should assume that the location and other properties are
- * not set and must be explicitly set by the client.
- * </p>
- *
- * @param id the id to assign to the runtime instance; a generated
- * id is used if id is <code>null</code> or an empty string
- * @return a new runtime working copy with the given id
- * @throws CoreException if an exception occurs while creating this runtime
- * or setting it's default values
- */
- public IRuntimeWorkingCopy createRuntime(String id, IProgressMonitor monitor) throws CoreException;
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IRuntimeWorkingCopy.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IRuntimeWorkingCopy.java
deleted file mode 100644
index ca20420..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IRuntimeWorkingCopy.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-/**
- * A working copy runtime object used for formulating changes
- * to a runtime instance ({@link IRuntime}). Changes made on a
- * working copy do not occur (and are not persisted) until a
- * save() is performed.
- * <p>
- * [issue: IElementWorkingCopy and IElement support an open-ended set
- * of attribute-value pairs. What is relationship between these
- * attributes and (a) the get/setXXX methods found on this interface,
- * and (b) get/setXXX methods provided by specific server types?
- * Is it the case that these attribute-values pairs are the only
- * information about a runtime instance that can be preserved
- * between workbench sessions? That is, any information recorded
- * just in instance fields of an RuntimeDelegate implementation
- * will be lost when the session ends.]
- * </p>
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
- * <p>
- * <it>Caveat: The server core API is still in an early form, and is
- * likely to change significantly before the initial release.</it>
- * </p>
- *
- * @see IRuntime
- * @since 1.0
- */
-public interface IRuntimeWorkingCopy extends IRuntime, IElementWorkingCopy {
- /**
- * Returns the runtime instance that this working copy is
- * associated with.
- * <p>
- * For a runtime working copy created by a call to
- * {@link IRuntime#createWorkingCopy()},
- * <code>this.getOriginal()</code> returns the original
- * runtime object. For a runtime working copy just created by
- * a call to {@link IRuntimeType#createRuntime(String)},
- * <code>this.getOriginal()</code> returns <code>null</code>.
- * </p>
- *
- * @return the associated runtime instance, or <code>null</code> if none
- */
- public IRuntime getOriginal();
-
- /**
- * Returns the extension for this runtime working copy.
- * The runtime working copy extension is a
- * runtime-type-specific object. By casting the runtime working copy
- * extension to the type prescribed in the API documentation for that
- * particular runtime working copy type, the client can access
- * runtime-type-specific properties and methods.
- *
- * @return the extension for the runtime working copy
- */
- //public IServerExtension getWorkingCopyExtension(IProgressMonitor monitor);
-
- /**
- * Sets the absolute path in the local file system to the root of the runtime,
- * typically the installation directory.
- *
- * @param path the location of this runtime, or <code>null</code> if none
- * @see IRuntime#getLocation()
- */
- public void setLocation(IPath path);
-
- /**
- * Commits the changes made in this working copy. If there is
- * no extant runtime instance with a matching id and runtime
- * type, this will create a runtime instance with attributes
- * taken from this working copy, and return that object.
- * <p>
- * If there an existing runtime instance with a matching id and
- * runtime type, this will change the runtime instance accordingly.
- * The returned runtime will be the same runtime this is returned
- * from getOriginal(), after the changes have been applied.
- * </p>
- * Runtimes can be saved even when they have invalid properties. It
- * is the clients responsibility to call validate() or check the
- * properties before saving.
- * <p>
- * [issue: What is lifecycle for RuntimeWorkingCopyDelegate
- * associated with this working copy?]
- * </p>
- *
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting and cancellation are not desired
- * @return a new runtime instance
- * @throws CoreException if the save could not be completed
- */
- public IRuntime save(boolean force, IProgressMonitor monitor) throws CoreException;
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IServer.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IServer.java
deleted file mode 100644
index cae8cc7..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IServer.java
+++ /dev/null
@@ -1,613 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-/**
- * Represents a server instance. Every server is an instance of a
- * particular, fixed server type.
- * <p>
- * Not surprisingly, the notion of <b>server</b> is central in the web tools
- * server infrastructure. In this context, understand that a server is
- * a web server of some ilk. It could be a simple web server lacking Java
- * support, or an J2EE based server, or perhaps even some kind of database
- * server. A more exact definition is not required for the purposes of this API.
- * From a tool-centric point of view, a server
- * is something that the developer is writing "content" for.
- * The unit of content is termed a module.
- * In a sense, the server exists, but lacks useful content. The
- * development task is to provide that content. The content can include
- * anything from simple, static HTML web pages to complex, highly dynamic
- * web applications.
- * In the course of writing and debugging this content,
- * the developer will want to test their content on a web server, to see how it
- * gets served up. For this they will need to launch a server process running on
- * some host machine (often the local host on which the IDE is running), or
- * attach to a server that's already running on a remote (or local) host.
- * The newly developed content sitting in the developer's workspace needs to
- * end up in a location and format that the running server can use for its
- * serving purposes.
- * </p>
- * <p>
- * In this picture, an <code>IServer</code> object is a proxy for the real web
- * server. Through this proxy, a client can configure the server, and start,
- * stop, and restart it.
- * </p>
- * <p>
- * The server framework maintains a global list of all known server instances
- * ({@link ServerCore#getServers()}).
- * </p>
- * <p>
- * [rough notes:
- * Server has a state.
- * Server can be started, stopped, and restarted.
- * To modify server attributes, get a working copy, modify it, and then save it
- * to commit the changes.
- * Server attributes. Serialization.
- * Chained working copies for runtime, server configuration.
- * Server has a set of root modules.
- * Modules have state wrt a server.
- * Restarting modules.
- * ]
- * </p>
- * <p>
- * [issue: The information actually stored in the (.server) file is:
- * server id and name, server type id, runtime id, server configuration id,
- * and test-environment. It's unclear what's gained by storing this
- * information in a workspace file. Is it so that this information
- * can be shared between users via a repository? Or is it just so that
- * there would be something to open in the resource navigator view?]
- * </p>
- * <p>
- * [issue: Equality/identify for servers?]
- * </p>
- *
- * <p>This interface is not intended to be implemented by clients.</p>
- * <p>
- * <it>Caveat: The server core API is still in an early form, and is
- * likely to change significantly before the initial release.</it>
- * </p>
- *
- * @since 1.0
- */
-public interface IServer extends IServerAttributes, IAdaptable {
- /**
- * File extension (value "server") for serialized representation of
- * server instances.
- * <p>
- * [issue: What is relationship between this file extension and
- * the file passed to IServerType.create(...) or returned by
- * IServer.getFile()? That is, are server files expected to end
- * in ".server", or is this just a default? If the former
- * (as I suspect), then IServerType.create needs to say so,
- * and the implementation should enforce the restriction.]
- * </p>
- */
- public static final String FILE_EXTENSION = "server";
-
- /**
- * Server id attribute (value "server-id") of launch configurations.
- * This attribute is used to tag a launch configuration with th
- * id of the corresponding server.
- * <p>
- * [issue: This feels like an implementation detail. If it is to
- * remain API, need to explain how a client uses this attribute.]
- * </p>
- * @see ILaunchConfiguration
- */
- public static final String ATTR_SERVER_ID = "server-id";
-
- /**
- * Server state constant (value 0) indicating that the
- * server is in an unknown state.
- *
- * @see #getServerState()
- * @see #getModuleState(IModule)
- */
- public static final int STATE_UNKNOWN = 0;
-
- /**
- * Server state constant (value 1) indicating that the
- * server is starting, but not yet ready to serve content.
- *
- * @see #getServerState()
- * @see #getModuleState(IModule)
- */
- public static final int STATE_STARTING = 1;
-
- /**
- * Server state constant (value 2) indicating that the
- * server is ready to serve content.
- *
- * @see #getServerState()
- * @see #getModuleState(IModule)
- */
- public static final int STATE_STARTED = 2;
-
- /**
- * Server state constant (value 3) indicating that the
- * server is shutting down.
- *
- * @see #getServerState()
- * @see #getModuleState(IModule)
- */
- public static final int STATE_STOPPING = 3;
-
- /**
- * Server state constant (value 4) indicating that the
- * server is stopped.
- *
- * @see #getServerState()
- * @see #getModuleState(IModule)
- */
- public static final int STATE_STOPPED = 4;
-
- /**
- * Publish state constant (value 0) indicating that it's
- * in an unknown state.
- *
- * @see #getServerPublishState()
- * @see #getModulePublishState(IModule)
- */
- public static final int PUBLISH_STATE_UNKNOWN = 0;
-
- /**
- * Publish state constant (value 1) indicating that there
- * is no publish required.
- *
- * @see #getServerPublishState()
- * @see #getModulePublishState(IModule)
- */
- public static final int PUBLISH_STATE_NONE = 1;
-
- /**
- * Publish state constant (value 2) indicating that an
- * incremental publish is required.
- *
- * @see #getServerPublishState()
- * @see #getModulePublishState(IModule)
- */
- public static final int PUBLISH_STATE_INCREMENTAL = 2;
-
- /**
- * Publish state constant (value 1) indicating that a
- * full publish is required.
- *
- * @see #getServerPublishState()
- * @see #getModulePublishState(IModule)
- */
- public static final int PUBLISH_STATE_FULL = 3;
-
- /**
- * Returns the current state of this server.
- * <p>
- * Note that this operation is guaranteed to be fast
- * (it does not actually communicate with any actual
- * server).
- * </p>
- *
- * @return one of the server state (<code>SERVER_XXX</code>)
- * constants declared on {@link IServer}
- */
- public int getServerState();
-
- /**
- * Returns the ILaunchManager mode that the server is in. This method will
- * return null if the server is not running.
- *
- * @return
- */
- public String getMode();
-
- /**
- * Returns the server's sync state.
- *
- * @return int
- */
- public int getServerPublishState();
-
- /**
- * Returns the module's sync state.
- * @return
- */
- public int getModulePublishState(IModule module);
-
- /**
- * Returns the server extension for this server.
- * The server extension is a server-type-specific object.
- * By casting the server extension to the type prescribed in
- * the API documentation for that particular server type,
- * the client can access server-type-specific properties and
- * methods.
- *
- * @return the server extension
- */
- //public IServerExtension getExtension(IProgressMonitor monitor);
-
- /**
- * Returns a server working copy for modifying this server instance.
- * If this instance is already a working copy, it is returned.
- * If this instance is not a working copy, a new server working copy
- * is created with the same id and attributes.
- * Clients are responsible for saving or releasing the working copy when
- * they are done with it.
- * <p>
- * The server working copy is related to this server instance
- * in the following ways:
- * <pre>
- * this.getWorkingCopy().getId() == this.getId()
- * this.getWorkingCopy().getFile() == this.getFile()
- * this.getWorkingCopy().getOriginal() == this
- * this.getWorkingCopy().getRuntime() == this.getRuntime()
- * this.getWorkingCopy().getServerConfiguration() == this.getServerConfiguration()
- * </pre>
- * </p>
- * <p>
- * [issue: IServerWorkingCopy extends IServer.
- * Server.getWorkingCopy() create a new working copy;
- * ServerWorkingCopy.getWorkingCopy() returns this.
- * This may be convenient in code that is ignorant of
- * whether they are dealing with a working copy or not.
- * However, it is hard for clients to manage working copies
- * with this design.]
- * </p>
- *
- * @return a new working copy
- */
- public IServerWorkingCopy createWorkingCopy();
-
- /**
- * Returns an array of the modules that have not been published
- * since the last modification. (i.e. the modules that are
- * out of sync with the server.
- *
- * @return org.eclipse.wst.server.model.IModule[]
- */
- public IModule[] getUnpublishedModules();
-
- /**
- * Adds the given server state listener to this server.
- * Once registered, a listener starts receiving notification of
- * state changes to this server. The listener continues to receive
- * notifications until it is removed.
- * Has no effect if an identical listener is already registered.
- *
- * @param listener the server listener
- * @see #removeServerListener(IServerListener)
- */
- public void addServerListener(IServerListener listener);
-
- /**
- * Removes the given server state listener from this server. Has no
- * effect if the listener is not registered.
- *
- * @param listener the listener
- * @see #addServerListener(IServerListener)
- */
- public void removeServerListener(IServerListener listener);
-
- /**
- * Adds a publish listener to this server.
- * Has no effect if an identical listener is already registered.
- *
- * @param listener org.eclipse.wst.server.core.model.IPublishListener
- */
- public void addPublishListener(IPublishListener listener);
-
- /**
- * Removes a publish listener from this server.
- * Has no effect if the listener is not registered.
- *
- * @param listener org.eclipse.wst.server.core.model.IPublishListener
- */
- public void removePublishListener(IPublishListener listener);
-
- /**
- * Returns whether this server is in a state that it can
- * be published to.
- *
- * @return <code>true</code> if this server can be published to,
- * and <code>false</code> otherwise
- */
- public boolean canPublish();
-
- /**
- * Returns true if the server may have any projects or it's
- * configuration out of sync.
- *
- * @return boolean
- */
- public boolean shouldPublish();
-
- /**
- * Publish to the server using the progress monitor. The result of the
- * publish operation is returned as an IStatus.
- *
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting and cancellation are not desired
- * @return status indicating what (if anything) went wrong
- */
- public IStatus publish(IProgressMonitor monitor);
-
- /**
- * Returns whether this server is in a state that it can
- * be started in the given mode.
- *
- * @param launchMode a mode in which a server can be launched,
- * one of the mode constants defined by
- * {@link org.eclipse.debug.core.ILaunchManager}
- * @return <code>true</code> if this server can be started
- * in the given mode, and <code>false</code> if it is either
- * not ready to be started or if it does not support the given
- * mode
- */
- public boolean canStart(String launchMode);
-
- public ILaunch getExistingLaunch();
-
- /**
- * Return the launch configuration for this server. If one does not exist, it
- * will be created if "create" is true, and otherwise will return null.
- *
- * @param create
- * @return
- * @throws CoreException
- */
- public ILaunchConfiguration getLaunchConfiguration(boolean create, IProgressMonitor monitor) throws CoreException;
-
- public void setLaunchDefaults(ILaunchConfigurationWorkingCopy workingCopy, IProgressMonitor monitor);
-
- /**
- * Asynchronously starts this server in the given launch mode.
- * Returns the debug launch object that can be used in a debug
- * session.
- * <p>
- * If canStart(launchMode) is false, this method will throw an
- * exception.
- * </p>
- * <p>
- * [issue: There is no way to communicate failure to the
- * client for the async portion of this operation. Given that
- * this operation can go awry, there probably should be a mechanism
- * that allows failing asynch operations to be diagnosed.]
- * </p>
- *
- * @param launchMode a mode in which a server can be launched,
- * one of the mode constants defined by
- * {@link org.eclipse.debug.core.ILaunchManager}
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting and cancellation are not desired
- * @return a debug launch object
- * @exception CoreException if an error occurs while trying to start the server
- */
- public ILaunch start(String launchMode, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Starts this server in the given launch mode and waits until the server
- * has finished starting.
- * <p>
- * This convenience method uses {@link #start(String, IProgressMonitor)}
- * to start the server, and an internal thread and listener to detect
- * when the server has finished starting.
- * </p>
- * <p>
- * [issue: Is there are particular reason why this method
- * does not return the ILaunch that was used?]
- * </p>
- *
- * @param launchMode a mode in which a server can be launched,
- * one of the mode constants defined by
- * {@link org.eclipse.debug.core.ILaunchManager}
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting and cancellation are not desired
- * @exception CoreException if an error occurs while trying to start the server
- */
- public void synchronousStart(String launchMode, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Returns whether this server is in a state that it can
- * be restarted in the given mode. Note that only servers
- * that are currently running can be restarted.
- *
- * @param launchMode a mode in which a server can be launched,
- * one of the mode constants defined by
- * {@link org.eclipse.debug.core.ILaunchManager}
- * @return <code>true</code> if this server can be restarted
- * in the given mode, and <code>false</code> if it is either
- * not ready to be restarted or if it does not support the given
- * mode
- */
- public boolean canRestart(String mode);
-
- /**
- * Returns whether this server is out of sync and needs to be
- * restarted. This method will return false when the
- * server is not running.
- * <p>
- * [issue: Need to explain what is it that can get out of
- * "out of sync" here, and how this can happen.]
- * </p>
- *
- * @return <code>true</code> if this server is out of sync and needs to be
- * restarted, and <code>false</code> otherwise (e.g., if the contents have
- * not been modified and the server process is still in sync); the
- * result is unspecified if the server is not currently running
- */
- public boolean getServerRestartState();
-
- /**
- * Asynchronously restarts this server. This operation does
- * nothing if this server cannot be stopped ({@link #canRestart()}
- * returns <code>false</code>.
- * This method cannot be used to start the server from a stopped state.
- * <p>
- * [issue: There is no way to communicate failure to the
- * client. Given that this operation can go awry, there probably
- * should be a mechanism that allows failing asynch operations
- * to be diagnosed.]
- * </p>
- *
- * @param launchMode a mode in which a server can be launched,
- * one of the mode constants defined by
- * {@link org.eclipse.debug.core.ILaunchManager}
- */
- public void restart(String mode);
-
- /**
- * Synchronously restarts this server. This operation does
- * nothing if this server cannot be stopped ({@link #canRestart()}
- * returns <code>false</code>.
- * <p>
- * [issue: There is no way to communicate failure to the
- * client. Given that this operation can go awry, there probably
- * should be a mechanism that allows failing asynch operations
- * to be diagnosed.]
- * </p>
- *
- * @param launchMode a mode in which a server can be launched,
- * one of the mode constants defined by
- * {@link org.eclipse.debug.core.ILaunchManager}
- */
- public void synchronousRestart(String launchMode, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Returns whether this server is in a state that it can
- * be stopped.
- * <p>
- * [issue: Are there servers (or server types) that cannot be
- * stopped? For instance, a server running on a remote host that
- * can be attached to, a published to, but neither started or
- * stopped via this API. Or are we only talking about whether
- * it is inconvenient to stop at this time?]
- * </p>
- *
- * @return <code>true</code> if this server can be stopped,
- * and <code>false</code> otherwise
- */
- public boolean canStop();
-
- /**
- * Asynchronously stops this server. This operation does
- * nothing if this server cannot be stopped ({@link #canStop()}
- * returns <code>false</code>.
- * <p>
- * If force is <code>false</code>, it will attempt to stop the server
- * normally/gracefully. If force is <code>true</code>, then the server
- * process will be terminated any way that it can.
- * </p>
- * <p>
- * [issue: There is no way to communicate failure to the
- * client. Given that this operation can go awry, there probably
- * should be a mechanism that allows failing asynch operations
- * to be diagnosed.]
- * </p>
- * @param force <code>true</code> to kill the server, or <code>false</code>
- * to stop normally
- */
- public void stop(boolean force);
-
- /**
- * Stops this server and waits until the server has completely stopped.
- * <p>
- * This convenience method uses {@link #stop()}
- * to stop the server, and an internal thread and listener to detect
- * when the server has complied.
- * </p>
- */
- public void synchronousStop();
-
- /**
- * Returns whether the given module can be restarted.
- * <p>
- * [issue: It's unclear whether this operations is guaranteed to be fast
- * or whether it could involve communication with any actual
- * server. If it is not fast, the method should take a progress
- * monitor.]
- * </p>
- *
- * @param module the module
- * @return <code>true</code> if the given module can be
- * restarted, and <code>false</code> otherwise
- */
- public boolean canRestartModule(IModule module);
-
- /**
- * Check if the given module is in sync on the server. It should
- * return true if the module should be restarted (is out of
- * sync) or false if the module does not need to be restarted.
- *
- * @param module org.eclipse.wst.server.core.model.IModule
- * @return boolean
- */
- public boolean getModuleRestartState(IModule module);
-
- /**
- * Asynchronously restarts the given module on the server.
- * See the specification of
- * {@link IServer#synchronousRestartModule(IModule, IProgressMonitor)}
- * for further details.
- * <p>
- * The implementation should update the module sync state and fire
- * an event for the module. If the module does not exist on the server,
- * an exception will be thrown.
- * </p>
- * <p>
- * [issue: Since this method is ascynchronous, is there
- * any need for the progress monitor?]
- * </p>
- * <p>
- * [issue: Since this method is ascynchronous, how can
- * it return a meaningful IStatus?
- * And IServer.synchronousModuleRestart throws CoreException
- * if anything goes wrong.]
- * </p>
- * <p>
- * [issue: If the module was just published to the server
- * and had never been started, would is be ok to "start"
- * the module using this method?]
- * </p>
- *
- * @param module the module to be started
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting and cancellation are not desired
- * @return status object
- * @exception CoreException if an error occurs while trying to restart the module
- */
- public void restartModule(IModule module, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Restarts the given module and waits until it has finished restarting.
- * If the module does not exist on the server, an exception will be thrown.
- * <p>
- * This method may not be used to initially start a module.
- * </p>
- *
- * @param module the module to be restarted
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting and cancellation are not desired
- * @exception CoreException if an error occurs while trying to restart the module
- */
- public void synchronousRestartModule(IModule module, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Returns the current state of the given module on this server.
- * Returns <code>STATE_UNKNOWN</code> if the module
- * is not among the ones associated with this server.
- *
- * @param module the module
- * @return one of the state (<code>STATE_XXX</code>)
- * constants declared on {@link IServer}
- */
- public int getModuleState(IModule module);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IServerAttributes.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IServerAttributes.java
deleted file mode 100644
index 05301b7..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IServerAttributes.java
+++ /dev/null
@@ -1,350 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.runtime.*;
-/**
- * Represents a server instance. Every server is an instance of a
- * particular, fixed server type.
- * <p>
- * Not surprisingly, the notion of <b>server</b> is central in the web tools
- * server infrastructure. In this context, understand that a server is
- * a web server of some ilk. It could be a simple web server lacking Java
- * support, or an J2EE based server, or perhaps even some kind of database
- * server. A more exact definition is not required for the purposes of this API.
- * From a tool-centric point of view, a server
- * is something that the developer is writing "content" for.
- * The unit of content is termed a module.
- * In a sense, the server exists, but lacks useful content. The
- * development task is to provide that content. The content can include
- * anything from simple, static HTML web pages to complex, highly dynamic
- * web applications.
- * In the course of writing and debugging this content,
- * the developer will want to test their content on a web server, to see how it
- * gets served up. For this they will need to launch a server process running on
- * some host machine (often the local host on which the IDE is running), or
- * attach to a server that's already running on a remote (or local) host.
- * The newly developed content sitting in the developer's workspace needs to
- * end up in a location and format that the running server can use for its
- * serving purposes.
- * </p>
- * <p>
- * In this picture, an <code>IServer</code> object is a proxy for the real web
- * server. Through this proxy, a client can configure the server, and start,
- * stop, and restart it.
- * </p>
- * <p>
- * The server framework maintains a global list of all known server instances
- * ({@link ServerCore#getServers()}).
- * </p>
- * <p>
- * [rough notes:
- * Server has a state.
- * Server can be started, stopped, and restarted.
- * To modify server attributes, get a working copy, modify it, and then save it
- * to commit the changes.
- * Server attributes. Serialization.
- * Chained working copies for runtime, server configuration.
- * Server has a set of root modules.
- * Modules have state wrt a server.
- * Restarting modules.
- * ]
- * </p>
- * <p>
- * [issue: The information actually stored in the (.server) file is:
- * server id and name, server type id, runtime id, server configuration id,
- * and test-environment. It's unclear what's gained by storing this
- * information in a workspace file. Is it so that this information
- * can be shared between users via a repository? Or is it just so that
- * there would be something to open in the resource navigator view?]
- * </p>
- * <p>
- * [issue: Equality/identify for servers?]
- * </p>
- *
- * <p>This interface is not intended to be implemented by clients.</p>
- * <p>
- * <it>Caveat: The server core API is still in an early form, and is
- * likely to change significantly before the initial release.</it>
- * </p>
- *
- * @since 1.0
- */
-public interface IServerAttributes extends IElement, IAdaptable {
- /**
- * File extension (value "server") for serialized representation of
- * server instances.
- * <p>
- * [issue: What is relationship between this file extension and
- * the file passed to IServerType.create(...) or returned by
- * IServer.getFile()? That is, are server files expected to end
- * in ".server", or is this just a default? If the former
- * (as I suspect), then IServerType.create needs to say so,
- * and the implementation should enforce the restriction.]
- * </p>
- */
- public static final String FILE_EXTENSION = "server";
-
- /**
- * Server id attribute (value "server-id") of launch configurations.
- * This attribute is used to tag a launch configuration with th
- * id of the corresponding server.
- * <p>
- * [issue: This feels like an implementation detail. If it is to
- * remain API, need to explain how a client uses this attribute.]
- * </p>
- * @see ILaunchConfiguration
- */
- public static final String ATTR_SERVER_ID = "server-id";
-
- /**
- * Returns the host for the server.
- * The format of the host can be either a qualified or unqualified hostname,
- * or an IP address and must conform to RFC 2732.
- *
- * @return a host string conforming to RFC 2732
- * @see java.net.URL.getHost()
- */
- public String getHost();
-
- /**
- * Returns the file where this server instance is serialized.
- *
- * @return the file in the workspace where the server instance
- * is serialized, or <code>null</code> if the information is
- * instead to be persisted with the workspace but not with any
- * particular workspace resource
- */
- public IFile getFile();
-
- /**
- * Returns the runtime associated with this server.
- * <p>
- * Note: The runtime of a server working copy may or may not
- * be a working copy. For a server instance that is not a
- * working copy, the runtime instance is not a working copy
- * either.
- * </p>
- * <p>
- * [issue: According to serverType extension point,
- * runtimeTypeId is a mandatory attribute. It seems odd
- * then to have server runtime instance being an
- * optional property of server instance. What does it mean
- * for a server to not have a runtime?]
- * </p>
- *
- * @return the runtime, or <code>null</code> if none
- */
- public IRuntime getRuntime();
-
- /**
- * Returns the type of this server.
- *
- * @return the server type
- */
- public IServerType getServerType();
-
- /**
- * Returns the server configuration associated with this server.
- * <p>
- * Note: The server configuration of a server working copy may
- * or may not be a working copy. For a server instance that is
- * not a working copy, the server configuration instance is not
- * a working copy either.
- * </p>
- * <p>
- * [issue: According to serverType extension point,
- * configurationTypeId is an optional attribute. If a server type
- * has no server configuration type, then it seems reasonable to
- * expect this method to return null for all instances of that server
- * type. But what about a server type that explicitly specifies
- * a server configuration type. Does that mean that all server
- * instances of that server type must have a server configuration
- * instance of that server configuration type, and that this method
- * never returns null in those cases?]
- * </p>
- *
- * @return the server configuration, or <code>null</code> if none
- */
- public IFolder getServerConfiguration();
-
- /**
- * Returns the server extension for this server.
- * The server extension is a server-type-specific object.
- * By casting the server extension to the type prescribed in
- * the API documentation for that particular server type,
- * the client can access server-type-specific properties and
- * methods.
- *
- * @return the server extension
- */
- //public IServerExtension getExtension(IProgressMonitor monitor);
-
- /**
- * Returns a server working copy for modifying this server instance.
- * If this instance is already a working copy, it is returned.
- * If this instance is not a working copy, a new server working copy
- * is created with the same id and attributes.
- * Clients are responsible for saving or releasing the working copy when
- * they are done with it.
- * <p>
- * The server working copy is related to this server instance
- * in the following ways:
- * <pre>
- * this.getWorkingCopy().getId() == this.getId()
- * this.getWorkingCopy().getFile() == this.getFile()
- * this.getWorkingCopy().getOriginal() == this
- * this.getWorkingCopy().getRuntime() == this.getRuntime()
- * this.getWorkingCopy().getServerConfiguration() == this.getServerConfiguration()
- * </pre>
- * </p>
- * <p>
- * [issue: IServerWorkingCopy extends IServer.
- * Server.getWorkingCopy() create a new working copy;
- * ServerWorkingCopy.getWorkingCopy() returns this.
- * This may be convenient in code that is ignorant of
- * whether they are dealing with a working copy or not.
- * However, it is hard for clients to manage working copies
- * with this design.]
- * </p>
- *
- * @return a new working copy
- */
- public IServerWorkingCopy createWorkingCopy();
-
- /**
- * Returns whether the given server configuration can be used with
- * this server.
- * <p>
- * [issue: This seems to be just a convenience method. Given that it's
- * straightforward enought for a client to compare
- * this.getServerType().getServerConfiguration()
- * to configuration.getServerConfigurationType(),
- * it's not clear that there is a great need for this method.]
- * </p>
- * <p>
- * [issue: It does not make sense to allow a null configuration.]
- * </p>
- *
- * Returns true if this is a configuration that is
- * applicable to (can be used with) this server.
- *
- * @param configuration the server configuration
- * @return <code>true</code> if this server supports the given server
- * configuration, and <code>false/code> otherwise
- */
- public boolean isSupportedConfiguration(IPath configuration);
-
- /**
- * Returns a temporary directory that the requestor can use
- * throughout it's lifecycle. This is primary to be used by
- * servers for working directories, server specific
- * files, etc.
- *
- * <p>As long as the same key is used to call this method on
- * each use of the workbench, this method directory will return
- * the same directory. If the directory is not requested over a
- * period of time, the directory may be deleted and a new one
- * will be assigned on the next request. For this reason, a
- * server should request the temp directory on startup
- * if it wants to store files there. In all cases, the server
- * should have a backup plan to refill the directory
- * in case it has been deleted since last use.</p>
- *
- * @return org.eclipse.core.runtime.IPath
- */
- public IPath getTempDirectory();
-
- /**
- * Returns an array of modules that are associated with
- * this server.
- * <p>
- * [issue: Clarify that these are root modules, not ones parented
- * by some other module.]
- * </p>
- *
- * @return a possibly-empty array of modules
- */
- public IModule[] getModules(IProgressMonitor monitor);
-
- /**
- * Returns whether the specified module modifications could be made to this
- * server at this time.
- * <p>
- * This method may decide based on the type of module
- * or refuse simply due to reaching a maximum number of
- * modules or other criteria.
- * </p>
- * <p>
- * [issue: This seems odd to have a pre-flight method.
- * I should expect that the client can propose making
- * any set of module changes they desire (via a server
- * working copy). If the server doesn't like it, the operation
- * should fail.]
- * </p>
- *
- * @param add a possibly-empty list of modules to add
- * @param remove a possibly-empty list of modules to remove
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting and cancellation are not desired
- * @return <code>true</code> if the proposed modifications
- * look feasible, and <code>false</code> otherwise
- */
- public IStatus canModifyModules(IModule[] add, IModule[] remove, IProgressMonitor monitor);
-
- /**
- * Returns the child module(s) of this module. If this
- * module contains other modules, it should list those
- * modules. If not, it should return an empty list.
- *
- * <p>This method should only return the direct children.
- * To obtain the full module tree, this method may be
- * recursively called on the children.</p>
- *
- * @param module org.eclipse.wst.server.core.IModule
- * @return array
- */
- public IModule[] getChildModules(IModule module, IProgressMonitor monitor);
-
- /**
- * Returns the parent module(s) of this module. When
- * determining if a given project can run on a server
- * configuration, this method will be used to find the
- * actual module(s) that may be run on the server. For
- * instance, a Web module may return a list of Ear
- * modules that it is contained in if the server only
- * supports configuring Ear modules.
- *
- * <p>If the module type is not supported, this method
- * may return null. If the type is normally supported but there
- * is a configuration problem or missing parent, etc., this
- * method may fire a CoreException that may then be presented
- * to the user.</p>
- *
- * <p>If it does return valid parent(s), this method should
- * always return the topmost parent module(s), even if
- * there are a few levels (a heirarchy) of modules.</p>
- *
- * @param module org.eclipse.wst.server.core.IModule
- * @return array
- * @throws org.eclipse.core.runtime.CoreException
- */
- public IModule[] getParentModules(IModule module, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Returns an array of IServerPorts that this server has.
- *
- * @return
- */
- public IServerPort[] getServerPorts();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IServerLifecycleListener.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IServerLifecycleListener.java
deleted file mode 100644
index 5837cc7..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IServerLifecycleListener.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core;
-/**
- * Listener interface for server changes.
- */
-public interface IServerLifecycleListener {
- /**
- * A new server has been created.
- *
- * @param server org.eclipse.wst.server.core.IServer
- */
- public void serverAdded(IServer server);
-
- /**
- * An existing server has been updated or modified.
- *
- * @param server org.eclipse.wst.server.core.IServer
- */
- public void serverChanged(IServer server);
-
- /**
- * A existing server has been removed.
- *
- * @param server org.eclipse.wst.server.core.IServer
- */
- public void serverRemoved(IServer server);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IServerListener.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IServerListener.java
deleted file mode 100644
index 98c2400..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IServerListener.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core;
-
-/**
- * This interface is used by the server to broadcast a change of state.
- * Usually, the change of state will be caused by some user action,
- * (e.g. requesting to start a server) however, it is equally fine for
- * a server to broadcast a change of state through no direct user action.
- * (e.g. stopping because the server crashed) This information can be
- * used to inform the user of the change or update the UI.
- *
- * <p>Note: The server listener event MUST NOT directly be used to modify
- * the server's state via one of the server's method. For example, a server
- * stopped event cannot directly trigger a start(). Doing this may cause
- * the thread to hang.</p>
- */
-public interface IServerListener {
- /**
- * Called when the server configuration's sync state changes.
- *
- * @param server org.eclipse.wst.server.model.IServer
- */
- public void configurationSyncStateChange(IServer server);
-
- /**
- * Called when the server isRestartNeeded() property changes.
- *
- * @param server org.eclipse.wst.server.model.IServer
- */
- public void restartStateChange(IServer server);
-
- /**
- * Notification when the server state has changed.
- *
- * @param server org.eclipse.wst.server.model.IServer
- */
- public void serverStateChange(IServer server);
-
- /**
- * Notification when the state of a module has changed.
- *
- * @param server org.eclipse.wst.server.model.IServer
- */
- public void moduleStateChange(IServer server, IModule module);
-
- /**
- * Called when the modules tree of this server has changed.
- *
- * @param server org.eclipse.wst.server.IServer
- */
- public void modulesChanged(IServer server);
-
- /**
- * Fired when a module on this server needs to be published
- * or no longer needs to be published.
- *
- * @param server org.eclipse.wst.server.model.IServer
- * @param parents org.eclipse.wst.server.model.IModule[]
- * @param module org.eclipse.wst.server.model.IModule
- */
- public void moduleStateChange(IServer server, IModule[] parents, IModule module);
-
- /**
- * Called when a project's restart state has changed. This state
- * lets the user know whether a project should be restarted or
- * does not need to be.
- *
- * @param server org.eclipse.wst.server.model.IServer
- * @param project org.eclipse.core.resources.IProject
- */
- //public void moduleRestartStateChange(IServer server, IModule module);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IServerLocator.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IServerLocator.java
deleted file mode 100644
index 7dbcfa5..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IServerLocator.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-/**
- * A server locator provides the ability to locate or search for additional
- * servers of a particular type, on a particular host.
- *
- * <p>This interface is not intended to be implemented by clients.</p>
- *
- * @since 1.0
- */
-public interface IServerLocator {
- public interface Listener {
- /**
- * Called when a new server is found by the locator.
- * The server must never be null.
- *
- * @param server the runtime that was found.
- */
- public void serverFound(IServerWorkingCopy server);
- }
-
- /**
- * Returns the id of this server locator.
- * Each known server locator has a distinct id.
- * Ids are intended to be used internally as keys; they are not
- * intended to be shown to end users.
- *
- * @return the server locator id
- */
- public String getId();
-
- /**
- * Returns the displayable name for this server locator.
- * <p>
- * Note that this name is appropriate for the current locale.
- * </p>
- *
- * @return a displayable name for this server locator
- */
- public String getName();
-
- /**
- * Returns the displayable description for this server locator.
- * <p>
- * Note that this description is appropriate for the current locale.
- * </p>
- *
- * @return a displayable description for this server locator
- */
- public String getDescription();
-
- /**
- * Returns true if the server locator can find servers of the given type.
- * The id should never be null.
- *
- * @param serverTypeId the id of a server type
- * @return boolean
- */
- public boolean supportsType(String serverTypeId);
-
- /**
- * Returns <code>true</code> if this type of server can run on a remote host.
- * Returns <code>false</code> if the server type can only be run on "localhost"
- * (the local machine).
- * <p>
- * [issue: Should be renamed "supportsRemoteHost" (no "s").]
- * </p>
- * <p>
- * [issue: Again, it seems odd to me that this is something
- * hard-wired to a server type.]
- * </p>
- *
- * @return <code>true</code> if this type of server can run on
- * a remote host, and <code>false</code> if it cannot
- */
- public boolean supportsRemoteHosts();
-
- /**
- * Searches for servers.
- * It uses the callback listener to report servers that are found.
- *
- * @param host a host string conforming to RFC 2732
- * @param listener a listener to report status to
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting and cancellation are not desired
- * @throws CoreException
- */
- public void searchForServers(String host, Listener listener, IProgressMonitor monitor) throws CoreException;
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IServerMonitorManager.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IServerMonitorManager.java
deleted file mode 100644
index a130e74..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IServerMonitorManager.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core;
-
-import org.eclipse.core.runtime.CoreException;
-/**
- *
- * <p>This interface is not intended to be implemented by clients.</p>
- */
-public interface IServerMonitorManager {
- /**
- * Returns the monitor that is currently being used.
- *
- * @return
- */
- //public IServerMonitor getCurrentServerMonitor();
-
- /**
- * Switch to use a different server monitor. All existing monitors will be
- * removed from the current monitor and added to the new monitor.
- *
- * @param newMonitor
- * @throws CoreException
- */
- //public void setServerMonitor(IServerMonitor newMonitor) throws CoreException;
-
- /**
- * Returns the array of ports that are currently being monitored.
- *
- * @return
- */
- public IMonitoredServerPort[] getMonitoredPorts(IServer server);
-
- /**
- * Starts monitoring the given port, and returns the new port # to use that will
- * route to the monitored port.
- *
- * @param server
- * @param port
- * @param monitorPort - the new port number to use for monitoring, or -1 to pick a new port
- * @param content
- * @return monitor port number
- */
- public IMonitoredServerPort createMonitor(IServer server, IServerPort port, int monitorPort, String[] content);
-
- /**
- * Stop monitoring the given port. Throws a CoreException if there was a problem
- * stopping the monitoring
- *
- * @param port
- */
- public void removeMonitor(IMonitoredServerPort msp);
-
- /**
- * Start the monitor. If the msp port is -1, it will be updated to the port that is actually in use.
- *
- * @param port
- * @throws CoreException
- */
- public void startMonitor(IMonitoredServerPort msp) throws CoreException;
-
- /**
- * Stop monitoring.
- *
- * @param port
- */
- public void stopMonitor(IMonitoredServerPort port);
-
- /**
- * Returns the monitored port to use when making requests to the given server, port number,
- * and content. Returns the existing port number if the port is not being monitored.
- *
- * @param server
- * @param port
- * @param content
- * @return the monitored port number
- */
- public int getMonitoredPort(IServer server, int port, String contentType);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IServerPort.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IServerPort.java
deleted file mode 100644
index 75c1fe4..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IServerPort.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core;
-/**
- * An abstract port on a server.
- */
-public interface IServerPort {
- /**
- * Return an optional internal id used to identify this port.
- *
- * @return java.lang.String
- */
- public String getId();
-
- /**
- * Return the name of the port.
- * @return java.lang.String
- */
- public String getName();
-
- /**
- * Return the actual port number.
- * @return int
- */
- public int getPort();
-
- /**
- * Returns the protocol, e.g. HTTP of this port. Returns null
- * if the protocol is unknown.
- *
- * @return java.lang.String
- */
- public String getProtocol();
-
- /**
- * Returns the content types that this port would normally serve, or null
- * if the content is unknown.
- *
- * @return java.lang.String[]
- */
- public String[] getContentTypes();
-
- /**
- * Returns true if this port is an "advanced" port and should not be shown
- * to novice users.
- *
- * @return boolean
- */
- public boolean isAdvanced();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IServerPreferences.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IServerPreferences.java
deleted file mode 100644
index b5a1ff6..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IServerPreferences.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core;
-/**
- * Helper class that stores preference information for server core.
- *
- * <p>This interface is not intended to be implemented by clients.</p>
- */
-public interface IServerPreferences {
- /**
- * Returns whether servers will be automatically restarted when
- * required.
- *
- * @return boolean
- */
- public boolean isAutoRestarting();
-
- /**
- * Returns whether servers will be automatically restarted when
- * required.
- *
- * @return boolean
- */
- public boolean isDefaultAutoRestarting();
-
- /**
- * Set whether servers will be automatically restarted when
- * they need a restart.
- *
- * @param boolean
- */
- public void setAutoRestarting(boolean b);
-
- /**
- * Returns whether publishing should automatically occur when necessary.
- *
- * @return boolean
- */
- public boolean isAutoPublishing();
-
- /**
- * Returns the default setting of whether publishing should automatically
- * occur when necessary.
- *
- * @return boolean
- */
- public boolean isDefaultAutoPublishing();
-
- /**
- * Set whether publishing should occur automatically.
- *
- * @param boolean
- */
- public void setAutoPublishing(boolean b);
-
- /**
- * Returns whether servers and configurations should be created in the
- * workspace (as opposed to in metadata).
- *
- * @return boolean
- */
- public boolean isCreateResourcesInWorkspace();
-
- /**
- * Returns whether servers and configurations should be created in the
- * workspace (as opposed to in metadata) by default.
- *
- * @return boolean
- */
- public boolean isDefaultCreateResourcesInWorkspace();
-
- /**
- * Set whether servers and configurations should be created in the
- * workspace (as opposed to in metadata).
- *
- * @param boolean
- */
- public void setCreateResourcesInWorkspace(boolean b);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IServerTask.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IServerTask.java
deleted file mode 100644
index 477c792..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IServerTask.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core;
-
-import java.util.List;
-/**
- * A task for a server.
- *
- * <p>This interface is not intended to be implemented by clients.</p>
- */
-public interface IServerTask {
- /**
- * Returns the id of the adapter.
- *
- * @return java.lang.String
- */
- public String getId();
-
- /**
- * Returns true if the given type (given by the id) can use this task. This
- * result is based on the result of the getTypeIds() method.
- *
- * @return boolean
- */
- public boolean supportsType(String id);
-
- /**
- * Lets the task know that it is about to be used. This method should
- * be used to clean out any previously cached information, or start to
- * create a new cache.
- *
- * @param server org.eclipse.wst.server.core.IServer
- * @param parents java.util.List[]
- * @param modules org.eclipse.wst.server.core.IModule[]
- */
- public IOptionalTask[] getTasks(IServer server, List[] parents, IModule[] modules);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IServerType.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IServerType.java
deleted file mode 100644
index 67f830d..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IServerType.java
+++ /dev/null
@@ -1,320 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-/**
- * Represents a server type from which server instances can be created.
- * <p>
- * The server core framework supports
- * an open-ended set of server types, which are contributed via
- * the <code>serverTypes</code> extension point in the server core
- * plug-in. Server type objects carry no state (all information is
- * read-only and is supplied by the server type declaration).
- * The global list of known server types is available via
- * {@link ServerCore#getServerTypes()}.
- * </p>
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
- * <p>
- * [issue: Equality/identify for server types? Are IServerType
- * instances guaranteed to be canonical (client can use ==),
- * or is it possible for there to be non-identical IServerType
- * objects in play that both represent the same server type?
- * The latter is the more common; type should spec equals.]
- * </p>
- * <p>
- * <it>Caveat: The server core API is still in an early form, and is
- * likely to change significantly before the initial release.</it>
- * </p>
- *
- * @since 1.0
- */
-public interface IServerType {
- /**
- * Constant (value 0) indicating that a type of server that can be
- * directly started and stopped.
- *
- * @see #getServerStateSet()
- */
- public static final int SERVER_STATE_SET_MANAGED = 0;
-
- /**
- * Constant (value 1) indicating that a type of server that can be
- * attached to, typically for debugging.
- *
- * @see #getServerStateSet()
- */
- public static final int SERVER_STATE_SET_ATTACHED = 1;
-
- /**
- * Constant (value 2) indicating that a type of server that
- * can only be used for publishing.
- *
- * @see #getServerStateSet()
- */
- public static final int SERVER_STATE_SET_PUBLISHED = 2;
-
- /**
- * Returns the id of this server type.
- * Each known server type has a distinct id.
- * Ids are intended to be used internally as keys; they are not
- * intended to be shown to end users.
- *
- * @return the server type id
- */
- public String getId();
-
- /**
- * Returns the displayable name for this server type.
- * <p>
- * Note that this name is appropriate for the current locale.
- * </p>
- *
- * @return a displayable name for this server type
- */
- public String getName();
-
- /**
- * Returns the displayable description for this server type.
- * <p>
- * Note that this description is appropriate for the current locale.
- * </p>
- *
- * @return a displayable description for this server type
- */
- public String getDescription();
-
- /**
- * Returns the type of server runtime that this type
- * of server requires.
- * <p>
- * [issue: "runtimeTypeId" is mandatory according the
- * serverTypes schema. This suggests that all types
- * of servers have a server runtime. But there is also
- * a boolean "runtime" attribute indicating whether the
- * server requires a runtime. I supect that server type
- * has an optional server runtime, in which case you
- * can make "runtimeTypeId" optional and dispense with
- * "runtime".]
- * </p>
- * <p>
- * [issue: Does it really make sense for
- * runtimeTypes and serverTypes be separate extension
- * points? Would it not be sufficient to have the party declaring
- * the server type also declare the server runtime type?
- * Having runtimeType as a separate extension point
- * only makes sense if it would be possible in principle to
- * declare a server runtime type that could actually be
- * used on serveral server types. If server runtimes
- * always end up being server-type specific, it would be better
- * to combine them.]
- * </p>
- * <p>
- * [issue: What should happen when a server type mentions
- * the id of a server runtime type that is not known
- * to the system?]
- * </p>
- *
- * @return a server runtime type
- */
- public IRuntimeType getRuntimeType();
-
- /**
- * Returns whether this type of server requires a server
- * runtime.
- * <p>
- * [issue: See issues on getRuntimeType(). I suspect this
- * method is unnecessary, and that
- * this.getRuntimeType() != null will do.]
- * </p>
- *
- * @return <code>true</code> if this type of server requires
- * a server runtime, and <code>false</code> if it does not
- * @see #getRuntimeType()
- */
- public boolean hasRuntime();
-
- /**
- * Returns whether this type of server supports the given launch mode.
- * <p>
- * [issue: It also seems odd that this is part of the server type
- * declaration. This means that any server type has to commit
- * so early on which modes it supports.]
- * </p>
- * <p>
- * [issue: Because the spec for this method piggy-backs off the
- * debug API, this method is vulnerable to any expansion that may
- * happen there. For instance, a 3rd mode (PROFILE_MODE) was added in 3.0.
- * As spec'd, clients can reasonably expect to launch servers
- * in this mode as well. It may also make sense for the server
- * core to define its own notion of legal modes.]
- * </p>
- *
- * @param launchMode a mode in which a server can be launched,
- * one of the mode constants defined by
- * {@link org.eclipse.debug.core.ILaunchManager}
- * @return whether this type of server supports the given mode
- */
- public boolean supportsLaunchMode(String launchMode);
-
- /**
- * Returns the server state set that should for instances of this server type.
- * If the state set is {@link #SERVER_STATE_SET_MANAGED}, this is
- * a runnable server that may be directly started and stopped
- * (i.e., it should be represented as starting, started in debug mode,
- * etc.) If the state set is {@link #SERVER_STATE_SET_ATTACHED}, this is a
- * server that can be attached to, typically for debugging purposes
- * (i.e., it should be represented as attaching, attached for
- * debugging, etc.).
- * If the state set is {@link #SERVER_STATE_SET_PUBLISHED}, this is a
- * server that only be published to (i.e., it should be represented as
- * not having states).
- * <p>
- * [issue: The notion of a "server state set" is a little abstruce.
- * It feels like the main thing to capture in the server type
- * is that there are 3 different styles of servers, and this
- * has a bearing on how you control them. That would suggest
- * there will be different rules for operating on them, and
- * that they might cycle through different sets of states.]
- * </p>
- * <p>
- * [issue: It also seems odd that this is part of the server type
- * declaration. This means that any server type has to commit
- * so early on which one it is.]
- * </p>
- *
- * @return one of {@link #SERVER_STATE_SET_MANAGED},
- * {@link #SERVER_STATE_SET_ATTACHED}, or
- * {@link #SERVER_STATE_SET_PUBLISHED}
- */
- public int getServerStateSet();
-
- /**
- * Returns whether this type of server requires a server
- * configuration.
- * <p>
- * [issue: It's not clear how this method differs from
- * this.getServerConfigurationType() != null]
- * </p>
- *
- * @return <code>true</code> if this type of server requires
- * a server configuration, and <code>false</code> if it does not
- * @see #getServerConfigurationType()
- */
- public boolean hasServerConfiguration();
-
- /**
- * Returns <code>true</code> if this type of server can run on a remote host.
- * Returns <code>false</code> if the server type can only be run on "localhost"
- * (the local machine).
- * <p>
- * [issue: Should be renamed "supportsRemoteHost" (no "s").]
- * </p>
- * <p>
- * [issue: Again, it seems odd to me that this is something
- * hard-wired to a server type.]
- * </p>
- *
- * @return <code>true</code> if this type of server can run on
- * a remote host, and <code>false</code> if it cannot
- */
- public boolean supportsRemoteHosts();
-
- /**
- * Creates an working copy instance of this server type.
- * After setting various properties of the working copy,
- * the client should call {@link IServerWorkingCopy#save(IProgressMonitor)}
- * to bring the server instance into existence.
- * <p>
- * [issue: Why is a runtime passed in?
- * IServerWorkingCopy.setRuntime(runtime) could be called on
- * the result to accomplish the same thing.]
- * </p>
- * <p>
- * [issue: The implementation of this method never creates a server
- * config working copy, whereas the other one does!?]
- * Consider combining the method with the other.]
- * </p>
- * <p>
- * The server returned from this method will have it's host set to
- * "localhost". Other defaults will be set by calling the server
- * delegate's setDefaults() method.
- * </p>
- *
- * @param id the id to assign to the server instance; a generated
- * id is used if id is <code>null</code> or an empty string
- * @param file the file in the workspace where the server instance
- * is to be serialized, or <code>null</code> if the information is
- * instead to be persisted with the workspace but not with any
- * particular workspace resource
- * @param runtime the runtime to associate with the server instance,
- * or <code>null</code> if none
- * @return a new server working copy with the given id
- * @throws CoreException if an exception occurs while creating this runtime
- * or setting it's default values
- */
- public IServerWorkingCopy createServer(String id, IFile file, IRuntime runtime, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Creates a working copy instance of this server type.
- * After setting various properties of the working copy,
- * the client should call {@link IServerWorkingCopy#save(IProgressMonitor)}
- * to bring the server instance into existence.
- * <p>
- * [issue: Since this method just creates a working copy,
- * it's not clear the operation is long-running and in need
- * of a progress monitor.]
- * </p>
- * <p>
- * The server returned from this method will have it's host set to
- * "localhost". Other defaults will be set by calling the server
- * delegate's setDefaults() method.
- * </p>
- * <p>
- * [issue: The implementation of this method creates a server
- * config working copy, whereas the other one does not!?
- * Consider combining the method with the other.]
- * </p>
- *
- * @param id the id to assign to the server instance; a generated
- * id is used if id is <code>null</code> or an empty string
- * @param file the file in the workspace where the server instance
- * is to be serialized, or <code>null</code> if the information is
- * instead to be persisted with the workspace but not with any
- * particular workspace resource
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting and cancellation are not desired
- * @return a new server working copy with the given id
- * @throws CoreException if an exception occurs while creating this runtime
- * or setting it's default values
- */
- public IServerWorkingCopy createServer(String id, IFile file, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Return the timeout (in ms) that should be used to wait for the server to start.
- * Returns -1 if there is no timeout.
- *
- * @return the server startup timeout
- */
- public int getStartTimeout();
-
- /**
- * Return the timeout (in ms) to wait before assuming that the server
- * has failed to stop. Returns -1 if there is no timeout.
- *
- * @return the server shutdown timeout
- */
- public int getStopTimeout();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IServerWorkingCopy.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IServerWorkingCopy.java
deleted file mode 100644
index e68af8e..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/IServerWorkingCopy.java
+++ /dev/null
@@ -1,248 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-/**
- * A working copy server object used for formulating changes
- * to a server instance ({@link IServer}).
- * <p>
- * [issue: IElementWorkingCopy and IElement support an open-ended set
- * of attribute-value pairs. What is relationship between these
- * attributes and (a) the get/setXXX methods found on this interface,
- * and (b) get/setXXX methods provided by specific server types?
- * Is it the case that these attribute-values pairs are the only
- * information about a server instance that can be preserved
- * between workbench sessions? That is, any information recorded
- * just in instance fields of an ServerDelegate implementation
- * will be lost when the session ends.]
- * </p>
- * <p>This interface is not intended to be implemented by clients.</p>
- * <p>
- * <it>Caveat: The server core API is still in an early form, and is
- * likely to change significantly before the initial release.</it>
- * </p>
- *
- * @since 1.0
- */
-public interface IServerWorkingCopy extends IServerAttributes, IElementWorkingCopy {
- /**
- * Sets the server configuration associated with this server working copy.
- * <p>
- * Note: The server configuration of a server working copy may
- * or may not be a working copy.
- * </p>
- * <p>
- * [issue: According to serverType extension point,
- * configurationTypeId is an optional attribute. What happens if the
- * server configuration passed is null but the server must have a
- * server configuration? What happens of the server configuration
- * has the wrong type? Do the errors get detected and reported now, or
- * upon save()?]
- * </p>
- *
- * @param configuration the server configuration, or <code>null</code> if none
- */
- public void setServerConfiguration(IFolder configuration);
-
- /**
- * Returns the server instance that this working copy is
- * associated with.
- * <p>
- * For a server working copy created by a call to
- * {@link IServer#createWorkingCopy()},
- * <code>this.getOriginal()</code> returns the original
- * server object. For a server working copy just created by
- * a call to {@link IServerType#createServer(String, IFile, IProgressMonitor)},
- * <code>this.getOriginal()</code> returns <code>null</code>.
- * </p>
- *
- * @return the associated server instance, or <code>null</code> if none
- */
- public IServer getOriginal();
-
- /**
- * Returns the extension for this server working copy.
- * The server working copy extension is a
- * server-type-specific object. By casting the server working copy
- * extension to the type prescribed in the API documentation for that
- * particular server working copy type, the client can access
- * server-type-specific properties and methods.
- *
- * @return the extension for the server working copy
- */
- //public IServerExtension getWorkingCopyExtension(IProgressMonitor monitor);
-
- /**
- * Commits the changes made in this working copy. If there is
- * no extant server instance with a matching id and server
- * type, this will create a server instance with attributes
- * taken from this working copy. If there an existing server
- * instance with a matching id and server type, this will
- * change the server instance accordingly.
- * <p>
- * Servers can be saved even when they have invalid properties. It
- * is the clients responsibility to validate or check the
- * properties before saving.
- * </p>
- * <p>
- * [issue: What is relationship to
- * this.getOriginal() and the IServer returned by this.save()?
- * The answer should be: they're the same server, for an
- * appropriate notion of "same". As currently implemented, they
- * are different IServer instances but have the same server
- * id and same server types. Clienst that are hanging on to
- * the old server instance will not see the changes.
- * If IServer were some kind of handle object as elsewhere in
- * Eclipse Platform, this kind of change could be done much
- * more smoothly.]
- * </p>
- * <p>
- * [issue: What is lifecycle for ServerWorkingCopyDelegate
- * associated with this working copy?]
- * </p>
- * <p>
- * [issue: Since it does not make sense to commit a server
- * working copy without first committing any associated
- * runtime and server config working copies, the semantics
- * of saveAll should be part and parcel of the
- * normal save, and the saveAll method eliminated.]
- * </p>
- *
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting and cancellation are not desired
- * @return a new server instance
- * @throws CoreException [missing]
- */
- public IServer save(boolean force, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Commits the changes made in this server working copy after
- * first committing any associated server configuration or
- * server runtime working copies.
- * <p>
- * This convenience method is equivalent to:
- * <pre>
- * IRuntime rt = this.getRuntime();
- * if (rt != null && rt.isWorkingCopy()) {
- * ((IRuntimeWorkingCopy) rt).save(monitor);
- * }
- * IServerConfiguration cf = this.getServerConfiguration();
- * if (cf != null && cf.isWorkingCopy()) {
- * ((IServerConfigurationWorkingCopy) cf).save(monitor);
- * }
- * return save(monitor);
- * </pre>
- * </p>
- * <p>
- * [issue: Since it does not make sense to commit a server
- * working copy without first committing any associated
- * runtime and server config working copies, the semantics
- * of this operation should be part and parcel of the
- * normal save, and the saveAll method eliminated.]
- * </p>
- *
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting and cancellation are not desired
- * @return a new server instance
- * @throws CoreException [missing]
- */
- public IServer saveAll(boolean force, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Sets the file where this server instance is serialized.
- *
- * @param the file in the workspace where the server instance
- * is serialized, or <code>null</code> if the information is
- * instead to be persisted with the workspace but not with any
- * particular workspace resource
- */
- public void setFile(IFile file);
-
- /**
- * Sets the runtime associated with this server working copy.
- * <p>
- * Note: The runtime of a server working copy may
- * or may not be a working copy.
- * </p>
- * <p>
- * [issue: According to serverType extension point,
- * runtimeTypeId is a mandatory attribute. But IServer.getRuntime()
- * is allowed to return null, suggesting that it is optional for instances.
- * What happens if the runtime passed is null but the server must
- * have a runtime? What happens if the runtime has the wrong
- * type? Do the errors get detected and reported now, or upon save()?]
- * </p>
- *
- * @param runtime the runtime, or <code>null</code> if none
- */
- public void setRuntime(IRuntime runtime);
-
- /**
- * Changes the host for the server.
- * The format of the host can be either a qualified or unqualified hostname,
- * or an IP address and must conform to RFC 2732.
- *
- * <p>
- * [issue: This is a questionable operation if there is a running
- * server associated with the original. When a host name
- * change is committed, the server instance loses contact with
- * the running server because of the host name change.]
- * </p>
- *
- * @param host a host string conforming to RFC 2732
- * @see IServer#getHost()
- * @see java.net.URL.getHost()
- */
- public void setHost(String host);
-
- /**
- * Modifies the list of modules associated with the server.
- * The modules included in the <code>add</code> list
- * must exist in the workspace and must not already be associated
- * with the server.
- * The modules included in the <code>remove</code> list
- * must be associated with the server, but may or may not exist
- * in the workspace.
- * <p>
- * [issue: How to formulate what it means
- * to say "the module must exist in the workspace"?]
- * </p>
- * <p>
- * [issue: The spec should be more lax. Attempting to add
- * a module that's already include should be quietly ignore;
- * ditto removing a module that's not on this list. This
- * simplifies the handling of various other wacko cases
- * such as duplication within and between the add and remove
- * lists.]
- * </p>
- * <p>
- * [issue: The spec had also said: "...canModifyModules()
- * should have returned true. The configuration must assume
- * any default settings and add the module without any UI."]
- * </p>
- * <p>
- * [issue: What error checking should be performed by this
- * operation, and what needs to be performed by save() if
- * the client tries to commit these hypothetisized changes?]
- * </p>
- *
- * @param add a possibly-empty list of modules to add
- * @param remove a possibly-empty list of modules to remove
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting and cancellation are not desired
- * @throws CoreException [missing]
- */
- public void modifyModules(IModule[] add, IModule[] remove, IProgressMonitor monitor) throws CoreException;
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ITask.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ITask.java
deleted file mode 100644
index 307d8a2..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ITask.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-/**
- *
- * <p>This interface is not intended to be implemented by clients.</p>
- */
-public interface ITask {
- /**
- * Returns the label for this command.
- *
- * @return java.lang.String
- */
- public String getName();
-
- /**
- * Returns a description of this command.
- *
- * @return java.lang.String
- */
- public String getDescription();
-
- public ITaskModel getTaskModel();
-
- public void setTaskModel(ITaskModel taskModel);
-
- public boolean canExecute();
-
- public void execute(IProgressMonitor monitor) throws CoreException;
-
- public boolean canUndo();
-
- public void undo();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ITaskModel.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ITaskModel.java
deleted file mode 100644
index a385504..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ITaskModel.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core;
-/**
- *
- * <p>This interface is not intended to be implemented by clients.</p>
- */
-public interface ITaskModel {
- public static final String TASK_RUNTIME = "runtime";
- public static final String TASK_SERVER = "server";
-
- public static final String TASK_MODULE_PARENTS = "module-parents";
- public static final String TASK_MODULES = "modules";
-
- public static final String TASK_LAUNCH_MODE = "launch-mode";
-
- public Object getObject(String id);
-
- public void putObject(String id, Object obj);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ServerCore.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ServerCore.java
deleted file mode 100644
index 776ded0..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ServerCore.java
+++ /dev/null
@@ -1,816 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core;
-
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.wst.server.core.model.*;
-import org.eclipse.wst.server.core.internal.*;
-/**
- * Main class for server core API.
- * <p>
- * This class provides references for servers and server configurations.
- * These references can be saved as tool or server-data and can be
- * used to return the original resource if it still exists. These
- * references are not OS-specific and can be used in a team environment.
- * </p>
- * <p>
- * This class provides all its functionality through static members.
- * It is not intended to be subclassed or instantiated.
- * </p>
- * <p>
- * The resource manager handles the mappings between resources
- * and servers or configurations, and notifies of servers or configurations
- * being added, removed, or modified.
- * </p>
- * <p>
- * Servers and configurations may be a single resource, or they may
- * be a folder that contains a group of files. Folder resources may not
- * contain other servers or configurations (i.e., they cannot be nested).
- * </p>
- * <p>
- * Changes made to server element resources (e.g., an edit or deletion of a
- * file) are processed as a reload or deletion of the element. Note that saving
- * a folder-based server or configuration may result in a series of reload
- * events.
- * </p>
- * <p>
- * <it>Caveat: The server core API is still in an early form, and is
- * likely to change significantly before the initial release.</it>
- * </p>
- *
- * @since 1.0
- */
-public class ServerCore {
- // cached copy of all module factories
- private static List moduleFactories;
-
- // cached copy of all module object adapters
- private static List moduleArtifactAdapters;
-
- // cached copy of all launchable adapters
- private static List launchableAdapters;
-
- // cached copy of all launchable clients
- private static List clients;
-
- // cached copy of all server tasks
- private static List serverTasks;
-
- // cached copy of all runtime types
- private static List runtimeTypes;
-
- // cached copy of all runtime target handlers
- private static List runtimeTargetHandlers;
-
- // cached copy of all runtime locators
- private static List runtimeLocators;
-
- // cached copy of all server and configuration types
- private static List serverTypes;
-
- // cached copy of all monitors
- private static List monitors;
-
- static {
- executeStartups();
- }
-
- /**
- * ServerCore constructor comment.
- */
- private ServerCore() {
- super();
- }
-
- /**
- * Returns the resource manager.
- *
- * @return org.eclipse.wst.server.core.internal.ResourceManager
- */
- private static ResourceManager getResourceManager() {
- return ResourceManager.getInstance();
- }
-
- /**
- * Returns the server monitor manager.
- *
- * @return org.eclipse.wst.server.core.IServerMonitorManager
- */
- public static IServerMonitorManager getServerMonitorManager() {
- return ServerMonitorManager.getInstance();
- }
-
- /**
- * Returns the preference information for the server core plugin.
- *
- * @return org.eclipse.wst.server.core.IServerPreferences
- */
- public static IServerPreferences getServerPreferences() {
- return ServerPreferences.getServerPreferences();
- }
-
- /**
- * Returns the preference information for the project. The project may not
- * be null.
- *
- * @return org.eclipse.wst.server.core.IServerProjectPreferences
- */
- public static IProjectProperties getProjectProperties(IProject project) {
- if (project == null)
- throw new IllegalArgumentException();
- return new ProjectProperties(project);
- }
-
- /**
- * Returns an array of all known runtime types.
- * <p>
- * A new array is returned on each call, so clients may store or modify the result.
- * </p>
- *
- * @return the array of runtime types {@link IRuntimeType}
- */
- public static IRuntimeType[] getRuntimeTypes() {
- if (runtimeTypes == null)
- loadRuntimeTypes();
-
- IRuntimeType[] rt = new IRuntimeType[runtimeTypes.size()];
- runtimeTypes.toArray(rt);
- return rt;
- }
-
- /**
- * Returns the runtime type with the given id, or <code>null</code>
- * if none. This convenience method searches the list of known
- * runtime types ({@link #getRuntimeTypes()}) for the one with a matching
- * runtime type id ({@link IRuntimeType#getId()}). The id may not be null.
- *
- * @param the runtime type id
- * @return the runtime type, or <code>null</code> if there is no runtime type
- * with the given id
- */
- public static IRuntimeType findRuntimeType(String id) {
- if (id == null)
- throw new IllegalArgumentException();
-
- if (runtimeTypes == null)
- loadRuntimeTypes();
-
- Iterator iterator = runtimeTypes.iterator();
- while (iterator.hasNext()) {
- IRuntimeType runtimeType = (IRuntimeType) iterator.next();
- if (id.equals(runtimeType.getId()))
- return runtimeType;
- }
- return null;
- }
-
- /**
- * Returns an array of all runtime locators.
- *
- * @return
- */
- public static IRuntimeLocator[] getRuntimeLocators() {
- if (runtimeLocators == null)
- loadRuntimeLocators();
- IRuntimeLocator[] rl = new IRuntimeLocator[runtimeLocators.size()];
- runtimeLocators.toArray(rl);
- return rl;
- }
-
- /**
- * Returns an array of all runtime target handlers.
- *
- * @return
- */
- public static IRuntimeTargetHandler[] getRuntimeTargetHandlers() {
- if (runtimeTargetHandlers == null)
- loadRuntimeTargetHandlers();
-
- IRuntimeTargetHandler[] rth = new IRuntimeTargetHandler[runtimeTargetHandlers.size()];
- runtimeTargetHandlers.toArray(rth);
- return rth;
- }
-
- /**
- * Returns the runtime target handler with the given id. The id may not be null.
- *
- * @return org.eclipse.wst.server.core.IRuntimeTargetHandler
- */
- public static IRuntimeTargetHandler getRuntimeTargetHandler(String id) {
- if (id == null)
- throw new IllegalArgumentException();
-
- if (runtimeTargetHandlers == null)
- loadRuntimeTargetHandlers();
-
- Iterator iterator = runtimeTargetHandlers.iterator();
- while (iterator.hasNext()) {
- IRuntimeTargetHandler runtimeTargetListener = (IRuntimeTargetHandler) iterator.next();
- if (id.equals(runtimeTargetListener.getId()))
- return runtimeTargetListener;
- }
- return null;
- }
-
- /**
- * Returns an array of all known server types.
- * <p>
- * A new array is returned on each call, so clients may store or modify the result.
- * </p>
- *
- * @return the array of server types {@link IServerType}
- */
- public static IServerType[] getServerTypes() {
- if (serverTypes == null)
- loadServerTypes();
-
- IServerType[] st = new IServerType[serverTypes.size()];
- serverTypes.toArray(st);
- return st;
- }
-
- /**
- * Returns the server type with the given id, or <code>null</code>
- * if none. This convenience method searches the list of known
- * server types ({@link #getServerTypes()}) for the one with a matching
- * server type id ({@link IServerType#getId()}). The id may not be null.
- *
- * @param the server type id
- * @return the server type, or <code>null</code> if there is no server type
- * with the given id
- */
- public static IServerType findServerType(String id) {
- if (id == null)
- throw new IllegalArgumentException();
-
- if (serverTypes == null)
- loadServerTypes();
-
- Iterator iterator = serverTypes.iterator();
- while (iterator.hasNext()) {
- IServerType serverType = (IServerType) iterator.next();
- if (id.equals(serverType.getId()))
- return serverType;
- }
- return null;
- }
-
- /**
- * Returns an array of all known module module factories.
- * <p>
- * A new array is returned on each call, so clients may store or modify the result.
- * </p>
- *
- * @return the array of module factories {@link IModuleFactory}
- */
- protected static ModuleFactory[] getModuleFactories() {
- if (moduleFactories == null)
- loadModuleFactories();
-
- ModuleFactory[] mf = new ModuleFactory[moduleFactories.size()];
- moduleFactories.toArray(mf);
- return mf;
- }
-
- /**
- * Returns the module factory with the given id, or <code>null</code>
- * if none. This convenience method searches the list of known
- * module factories ({@link #getModuleFactories()}) for the one a matching
- * module factory id ({@link IModuleFactory#getId()}). The id may not be null.
- *
- * @param the module factory id
- * @return the module factory, or <code>null</code> if there is no module factory
- * with the given id
- */
- protected static ModuleFactory findModuleFactory(String id) {
- if (id == null)
- throw new IllegalArgumentException();
-
- if (moduleFactories == null)
- loadModuleFactories();
-
- Iterator iterator = moduleFactories.iterator();
- while (iterator.hasNext()) {
- ModuleFactory factory = (ModuleFactory) iterator.next();
- if (id.equals(factory.getId()))
- return factory;
- }
- return null;
- }
-
- /**
- * Returns an array of all module artifact adapters.
- *
- * @return
- */
- public static IModuleArtifactAdapter[] getModuleArtifactAdapters() {
- if (moduleArtifactAdapters == null)
- loadModuleArtifactAdapters();
-
- IModuleArtifactAdapter[] moa = new IModuleArtifactAdapter[moduleArtifactAdapters.size()];
- moduleArtifactAdapters.toArray(moa);
- return moa;
- }
-
- /**
- * Returns an array of all launchable adapters.
- *
- * @return
- */
- public static ILaunchableAdapter[] getLaunchableAdapters() {
- if (launchableAdapters == null)
- loadLaunchableAdapters();
- ILaunchableAdapter[] la = new ILaunchableAdapter[launchableAdapters.size()];
- launchableAdapters.toArray(la);
- return la;
- }
-
- /**
- * Returns an array of all launchable clients.
- *
- * @return
- */
- public static IClient[] getClients() {
- if (clients == null)
- loadClients();
- IClient[] c = new IClient[clients.size()];
- clients.toArray(c);
- return c;
- }
-
- /**
- * Returns an array of all server tasks.
- *
- * @return
- */
- public static IServerTask[] getServerTasks() {
- if (serverTasks == null)
- loadServerTasks();
- IServerTask[] st = new IServerTask[serverTasks.size()];
- serverTasks.toArray(st);
- return st;
- }
-
- /**
- * Returns an array of all server monitors.
- *
- * @return
- */
- public static IServerMonitor[] getServerMonitors() {
- if (monitors == null)
- loadServerMonitors();
- IServerMonitor[] sm = new IServerMonitor[monitors.size()];
- monitors.toArray(sm);
- return sm;
- }
-
- /**
- * Load the server startups.
- */
- private static synchronized void executeStartups() {
- Trace.trace(Trace.EXTENSION_POINT, "->- Loading .startup extension point ->-");
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IConfigurationElement[] cf = registry.getConfigurationElementsFor(ServerPlugin.PLUGIN_ID, "startup");
-
- int size = cf.length;
- for (int i = 0; i < size; i++) {
- try {
- StartupDelegate startup = (StartupDelegate) cf[i].createExecutableExtension("class");
- try {
- startup.startup();
- } catch (Exception ex) {
- Trace.trace(Trace.SEVERE, "Startup failed" + startup.toString(), ex);
- }
- Trace.trace(Trace.EXTENSION_POINT, " Loaded startup: " + cf[i].getAttribute("id"));
- } catch (Throwable t) {
- Trace.trace(Trace.SEVERE, " Could not load startup: " + cf[i].getAttribute("id"), t);
- }
- }
-
- Trace.trace(Trace.EXTENSION_POINT, "-<- Done loading .startup extension point -<-");
- }
-
- /**
- * Load the runtime types.
- */
- private static synchronized void loadRuntimeTypes() {
- if (runtimeTypes != null)
- return;
- Trace.trace(Trace.EXTENSION_POINT, "->- Loading .runtimeTypes extension point ->-");
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IConfigurationElement[] cf = registry.getConfigurationElementsFor(ServerPlugin.PLUGIN_ID, "runtimeTypes");
-
- int size = cf.length;
- runtimeTypes = new ArrayList(size);
- for (int i = 0; i < size; i++) {
- try {
- RuntimeType runtimeType = new RuntimeType(cf[i]);
- runtimeTypes.add(runtimeType);
- Trace.trace(Trace.EXTENSION_POINT, " Loaded runtimeType: " + cf[i].getAttribute("id"));
- } catch (Throwable t) {
- Trace.trace(Trace.SEVERE, " Could not load runtimeType: " + cf[i].getAttribute("id"), t);
- }
- }
- sortOrderedList(runtimeTypes);
-
- Trace.trace(Trace.EXTENSION_POINT, "-<- Done loading .runtimeTypes extension point -<-");
- }
-
- /**
- * Load the runtime locators.
- */
- private static synchronized void loadRuntimeLocators() {
- if (runtimeLocators != null)
- return;
- Trace.trace(Trace.EXTENSION_POINT, "->- Loading .runtimeLocators extension point ->-");
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IConfigurationElement[] cf = registry.getConfigurationElementsFor(ServerPlugin.PLUGIN_ID, "runtimeLocators");
-
- int size = cf.length;
- runtimeLocators = new ArrayList(size);
- for (int i = 0; i < size; i++) {
- try {
- RuntimeLocator runtimeLocator = new RuntimeLocator(cf[i]);
- runtimeLocators.add(runtimeLocator);
- Trace.trace(Trace.EXTENSION_POINT, " Loaded runtimeLocator: " + cf[i].getAttribute("id"));
- } catch (Throwable t) {
- Trace.trace(Trace.SEVERE, " Could not load runtimeLocator: " + cf[i].getAttribute("id"), t);
- }
- }
-
- Trace.trace(Trace.EXTENSION_POINT, "-<- Done loading .runtimeLocators extension point -<-");
- }
-
- /**
- * Load the runtime target listeners.
- */
- private static synchronized void loadRuntimeTargetHandlers() {
- if (runtimeTargetHandlers != null)
- return;
- Trace.trace(Trace.EXTENSION_POINT, "->- Loading .runtimeTargetHandlers extension point ->-");
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IConfigurationElement[] cf = registry.getConfigurationElementsFor(ServerPlugin.PLUGIN_ID, "runtimeTargetHandlers");
-
- int size = cf.length;
- runtimeTargetHandlers = new ArrayList(size);
- for (int i = 0; i < size; i++) {
- try {
- RuntimeTargetHandler runtimeTargetListener = new RuntimeTargetHandler(cf[i]);
- runtimeTargetHandlers.add(runtimeTargetListener);
- Trace.trace(Trace.EXTENSION_POINT, " Loaded runtimeTargetHandler: " + cf[i].getAttribute("id"));
- } catch (Throwable t) {
- Trace.trace(Trace.SEVERE, " Could not load runtimeTargetHandler: " + cf[i].getAttribute("id"), t);
- }
- }
- sortOrderedList(runtimeTargetHandlers);
-
- Trace.trace(Trace.EXTENSION_POINT, "-<- Done loading .runtimeTargetHandlers extension point -<-");
- }
-
- /**
- * Load the server types.
- */
- private static synchronized void loadServerTypes() {
- if (serverTypes != null)
- return;
- Trace.trace(Trace.EXTENSION_POINT, "->- Loading .serverTypes extension point ->-");
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IConfigurationElement[] cf = registry.getConfigurationElementsFor(ServerPlugin.PLUGIN_ID, "serverTypes");
-
- int size = cf.length;
- serverTypes = new ArrayList(size);
- for (int i = 0; i < size; i++) {
- try {
- ServerType serverType = new ServerType(cf[i]);
- serverTypes.add(serverType);
- Trace.trace(Trace.EXTENSION_POINT, " Loaded serverType: " + cf[i].getAttribute("id"));
- } catch (Throwable t) {
- Trace.trace(Trace.SEVERE, " Could not load serverType: " + cf[i].getAttribute("id"), t);
- }
- }
- sortOrderedList(serverTypes);
-
- Trace.trace(Trace.EXTENSION_POINT, "-<- Done loading .serverTypes extension point -<-");
- }
-
- /**
- * Load the module factories extension point.
- */
- private static synchronized void loadModuleFactories() {
- if (moduleFactories != null)
- return;
- Trace.trace(Trace.EXTENSION_POINT, "->- Loading .moduleFactories extension point ->-");
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IConfigurationElement[] cf = registry.getConfigurationElementsFor(ServerPlugin.PLUGIN_ID, "moduleFactories");
-
- int size = cf.length;
- moduleFactories = new ArrayList(size);
- for (int i = 0; i < size; i++) {
- try {
- moduleFactories.add(new ModuleFactory(cf[i]));
- Trace.trace(Trace.EXTENSION_POINT, " Loaded moduleFactories: " + cf[i].getAttribute("id"));
- } catch (Throwable t) {
- Trace.trace(Trace.SEVERE, " Could not load moduleFactories: " + cf[i].getAttribute("id"), t);
- }
- }
- sortOrderedList(moduleFactories);
-
- Trace.trace(Trace.EXTENSION_POINT, "-<- Done loading .moduleFactories extension point -<-");
- }
-
- /**
- * Load the module artifact adapters extension point.
- */
- private static synchronized void loadModuleArtifactAdapters() {
- if (moduleArtifactAdapters != null)
- return;
- Trace.trace(Trace.EXTENSION_POINT, "->- Loading .moduleArtifactAdapters extension point ->-");
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IConfigurationElement[] cf = registry.getConfigurationElementsFor(ServerPlugin.PLUGIN_ID, "moduleArtifactAdapters");
-
- int size = cf.length;
- moduleArtifactAdapters = new ArrayList(size);
- for (int i = 0; i < size; i++) {
- try {
- moduleArtifactAdapters.add(new ModuleArtifactAdapter(cf[i]));
- Trace.trace(Trace.EXTENSION_POINT, " Loaded moduleArtifactAdapter: " + cf[i].getAttribute("id"));
- } catch (Throwable t) {
- Trace.trace(Trace.SEVERE, " Could not load moduleArtifactAdapter: " + cf[i].getAttribute("id"), t);
- }
- }
- Trace.trace(Trace.EXTENSION_POINT, "-<- Done loading .moduleArtifactAdapters extension point -<-");
- }
-
- /**
- * Load the launchable adapters extension point.
- */
- private static synchronized void loadLaunchableAdapters() {
- if (launchableAdapters != null)
- return;
- Trace.trace(Trace.EXTENSION_POINT, "->- Loading .launchableAdapters extension point ->-");
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IConfigurationElement[] cf = registry.getConfigurationElementsFor(ServerPlugin.PLUGIN_ID, "launchableAdapters");
-
- int size = cf.length;
- launchableAdapters = new ArrayList(size);
- for (int i = 0; i < size; i++) {
- try {
- launchableAdapters.add(new LaunchableAdapter(cf[i]));
- Trace.trace(Trace.EXTENSION_POINT, " Loaded launchableAdapter: " + cf[i].getAttribute("id"));
- } catch (Throwable t) {
- Trace.trace(Trace.SEVERE, " Could not load launchableAdapter: " + cf[i].getAttribute("id"), t);
- }
- }
- Trace.trace(Trace.EXTENSION_POINT, "-<- Done loading .launchableAdapters extension point -<-");
- }
-
- /**
- * Load the launchable client extension point.
- */
- private static synchronized void loadClients() {
- if (clients != null)
- return;
- Trace.trace(Trace.EXTENSION_POINT, "->- Loading .clients extension point ->-");
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IConfigurationElement[] cf = registry.getConfigurationElementsFor(ServerPlugin.PLUGIN_ID, "clients");
-
- int size = cf.length;
- clients = new ArrayList(size);
- for (int i = 0; i < size; i++) {
- try {
- clients.add(new Client(cf[i]));
- Trace.trace(Trace.EXTENSION_POINT, " Loaded clients: " + cf[i].getAttribute("id"));
- } catch (Throwable t) {
- Trace.trace(Trace.SEVERE, " Could not load clients: " + cf[i].getAttribute("id"), t);
- }
- }
- Trace.trace(Trace.EXTENSION_POINT, "-<- Done loading .clients extension point -<-");
- }
-
- /**
- * Load the server task extension point.
- */
- private static synchronized void loadServerTasks() {
- if (serverTasks != null)
- return;
- Trace.trace(Trace.EXTENSION_POINT, "->- Loading .serverTasks extension point ->-");
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IConfigurationElement[] cf = registry.getConfigurationElementsFor(ServerPlugin.PLUGIN_ID, "serverTasks");
-
- int size = cf.length;
- serverTasks = new ArrayList(size);
- for (int i = 0; i < size; i++) {
- try {
- serverTasks.add(new ServerTask(cf[i]));
- Trace.trace(Trace.EXTENSION_POINT, " Loaded serverTask: " + cf[i].getAttribute("id"));
- } catch (Throwable t) {
- Trace.trace(Trace.SEVERE, " Could not load serverTask: " + cf[i].getAttribute("id"), t);
- }
- }
-
- sortOrderedList(serverTasks);
-
- Trace.trace(Trace.EXTENSION_POINT, "-<- Done loading .serverTasks extension point -<-");
- }
-
- /**
- * Load the server monitor extension point.
- */
- private static synchronized void loadServerMonitors() {
- if (monitors != null)
- return;
- Trace.trace(Trace.EXTENSION_POINT, "->- Loading .serverMonitors extension point ->-");
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IConfigurationElement[] cf = registry.getConfigurationElementsFor(ServerPlugin.PLUGIN_ID, "serverMonitors");
-
- int size = cf.length;
- monitors = new ArrayList(size);
- for (int i = 0; i < size; i++) {
- try {
- monitors.add(new ServerMonitor(cf[i]));
- Trace.trace(Trace.EXTENSION_POINT, " Loaded serverMonitor: " + cf[i].getAttribute("id"));
- } catch (Throwable t) {
- Trace.trace(Trace.SEVERE, " Could not load serverMonitor: " + cf[i].getAttribute("id"), t);
- }
- }
-
- Trace.trace(Trace.EXTENSION_POINT, "-<- Done loading .serverMonitors extension point -<-");
- }
-
- /**
- * Returns the runtime with the given id, or <code>null</code>
- * if none. This convenience method searches the list of known
- * runtimes ({@link #getRuntimes()}) for the one with a matching
- * runtime id ({@link IRuntime#getId()}). The id may not be null.
- *
- * @param the runtime id
- * @return the runtime instance, or <code>null</code> if there is no runtime
- * with the given id
- */
- public static IRuntime findRuntime(String id) {
- return getResourceManager().getRuntime(id);
- }
-
- /**
- * Returns an array of all known runtime instances. The list will not contain any
- * working copies.
- * <p>
- * A new array is returned on each call, so clients may store or modify the result.
- * </p>
- *
- * @return a possibly-empty array of runtime instances {@link IRuntime}
- */
- public static IRuntime[] getRuntimes() {
- return getResourceManager().getRuntimes();
- }
-
- /**
- * Returns the server with the given id, or <code>null</code>
- * if none. This convenience method searches the list of known
- * servers ({@link #getServers()}) for the one with a matching
- * server id ({@link IServer#getId()}). The id must not be null.
- *
- * @param the server id
- * @return the server instance, or <code>null</code> if there is no server
- * with the given id
- */
- public static IServer findServer(String id) {
- return getResourceManager().getServer(id);
- }
-
- /**
- * Returns an array of all known server instances. The array will not include any
- * working copies.
- * <p>
- * A new array is returned on each call, so clients may store or modify the result.
- * </p>
- *
- * @return a possibly-empty array of server instances {@link IServer}
- */
- public static IServer[] getServers() {
- return getResourceManager().getServers();
- }
-
- /**
- * Adds a new runtime lifecycle listener.
- * Has no effect if an identical listener is already registered.
- *
- * @param listener org.eclipse.wst.server.IRuntimeLifecycleListener
- */
- public static void addRuntimeLifecycleListener(IRuntimeLifecycleListener listener) {
- getResourceManager().addRuntimeLifecycleListener(listener);
- }
-
- /**
- * Removes a runtime lifecycle listener.
- * Has no effect if the listener is not registered.
- *
- * @param listener org.eclipse.wst.server.IRuntimeLifecycleListener
- */
- public static void removeRuntimeLifecycleListener(IRuntimeLifecycleListener listener) {
- getResourceManager().removeRuntimeLifecycleListener(listener);
- }
-
- /**
- * Adds a new server lifecycle listener.
- * Has no effect if an identical listener is already registered.
- *
- * @param listener org.eclipse.wst.server.IServerLifecycleListener
- */
- public static void addServerLifecycleListener(IServerLifecycleListener listener) {
- getResourceManager().addServerLifecycleListener(listener);
- }
-
- /**
- * Removes a server lifecycle listener.
- * Has no effect if the listener is not registered.
- *
- * @param listener org.eclipse.wst.server.IServerLifecycleListener
- */
- public static void removeServerLifecycleListener(IServerLifecycleListener listener) {
- getResourceManager().removeServerLifecycleListener(listener);
- }
-
- /**
- * Returns the default runtime. Test API - do not use.
- * <p>
- * [issue: This is marked "Test API - do not use."]
- * </p>
- *
- * @return a runtime instance, or <code>null</code> if none
- * @see #setDefaultRuntime(IRuntime)
- */
- public static IRuntime getDefaultRuntime() {
- return getResourceManager().getDefaultRuntime();
- }
-
- /**
- * Sets the default runtime.
- * <p>
- * [issue: This is marked "Test API - do not use."]
- * </p>
- *
- * @param runtime a runtime instance, or <code>null</code>
- * @see #getDefaultRuntime()
- */
- public static void setDefaultRuntime(IRuntime runtime) {
- getResourceManager().setDefaultRuntime(runtime);
- }
-
- /**
- * Adds a new module events listener.
- * Has no effect if an identical listener is already registered.
- *
- * @param listener org.eclipse.wst.server.model.IModuleEventsListener
- */
- public static void addModuleEventsListener(IModuleEventsListener listener) {
- getResourceManager().addModuleEventsListener(listener);
- }
-
- /**
- * Removes an existing module events listener.
- * Has no effect if the listener is not registered.
- *
- * @param listener org.eclipse.wst.server.model.IModuleEventsListener
- */
- public static void removeModuleEventsListener(IModuleEventsListener listener) {
- getResourceManager().removeModuleEventsListener(listener);
- }
-
- /**
- * Sort the given list of IOrdered items into indexed order. This method
- * modifies the original list, but returns the value for convenience.
- *
- * @param list java.util.List
- * @return java.util.List
- */
- private static List sortOrderedList(List list) {
- if (list == null)
- return null;
-
- int size = list.size();
- for (int i = 0; i < size - 1; i++) {
- for (int j = i + 1; j < size; j++) {
- IOrdered a = (IOrdered) list.get(i);
- IOrdered b = (IOrdered) list.get(j);
- if (a.getOrder() > b.getOrder()) {
- Object temp = a;
- list.set(i, b);
- list.set(j, temp);
- }
- }
- }
- return list;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ServerUtil.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ServerUtil.java
deleted file mode 100644
index b85d09f..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ServerUtil.java
+++ /dev/null
@@ -1,1007 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core;
-
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-
-import org.eclipse.wst.server.core.internal.ModuleFactory;
-import org.eclipse.wst.server.core.internal.ServerPlugin;
-import org.eclipse.wst.server.core.internal.Trace;
-/**
- * Server utility methods.
- */
-public class ServerUtil {
- /**
- * Static class - cannot create an instance.
- */
- private ServerUtil() {
- // do nothing
- }
-
- /**
- * Returns true if the given server currently contains the given module.
- *
- * @param server org.eclipse.wst.server.core.IServer
- * @param module org.eclipse.wst.server.core.IModule
- * @return boolean
- */
- public static boolean containsModule(IServer server, IModule module, IProgressMonitor monitor) {
- if (server == null)
- return false;
- Trace.trace(Trace.FINEST, "containsModule() " + server + " " + module);
- try {
- IModule[] modules = getAllContainedModules(server, monitor);
- if (modules != null) {
- int size = modules.length;
- for (int i = 0; i < size; i++) {
- Trace.trace(Trace.FINEST, "module: " + modules[i] + " " + module.equals(modules[i]));
- if (module.equals(modules[i]))
- return true;
- }
- }
- } catch (Throwable t) {
- // ignore
- }
- return false;
- }
-
- /**
- * Returns all projects contained by the server. This included the
- * projects that are in the configuration, as well as their
- * children, and their children...
- *
- * @param server org.eclipse.wst.server.core.IServer
- * @return java.util.List
- */
- public static IModule[] getAllContainedModules(IServer server, IProgressMonitor monitor) {
- //Trace.trace("> getAllContainedModules: " + getName(configuration));
- List modules = new ArrayList();
- if (server == null)
- return new IModule[0];
-
- // get all of the directly contained projects
- IModule[] deploys = server.getModules(monitor);
- if (deploys == null || deploys.length == 0)
- return new IModule[0];
-
- int size = deploys.length;
- for (int i = 0; i < size; i++) {
- if (deploys[i] != null && !modules.contains(deploys[i]))
- modules.add(deploys[i]);
- }
-
- //Trace.trace(" getAllContainedModules: root level done");
-
- // get all of the module's children
- int count = 0;
- while (count < modules.size()) {
- IModule module = (IModule) modules.get(count);
- try {
- IModule[] children = server.getChildModules(module, monitor);
- if (children != null) {
- size = children.length;
- for (int i = 0; i < size; i++) {
- if (children[i] != null && !modules.contains(children[i]))
- modules.add(children[i]);
- }
- }
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error getting child modules for: " + module.getName(), e);
- }
- count ++;
- }
-
- //Trace.trace("< getAllContainedModules");
-
- IModule[] modules2 = new IModule[modules.size()];
- modules.toArray(modules2);
- return modules2;
- }
-
- /**
- * Returns a list of all servers that this module is configured on.
- *
- * @param module org.eclipse.wst.server.core.model.IModule
- * @return java.util.List
- */
- public static IServer[] getServersByModule(IModule module, IProgressMonitor monitor) {
- if (module == null)
- return new IServer[0];
-
- // do it the slow way - go through all servers and
- // see if this module is configured in it
- List list = new ArrayList();
- IServer[] servers = ServerCore.getServers();
- if (servers != null) {
- int size = servers.length;
- for (int i = 0; i < size; i++) {
- if (containsModule(servers[i], module, monitor))
- list.add(servers[i]);
- }
- }
-
- IServer[] allServers = new IServer[list.size()];
- list.toArray(allServers);
- return allServers;
- }
-
- /**
- * Returns the project modules attached to a project.
- */
- public static IModule[] getModules(IProject project) {
- if (project == null)
- return null;
-
- List list = new ArrayList();
- IModule[] modules = getModules();
- if (modules != null) {
- int size = modules.length;
- for (int i = 0; i < size; i++) {
- if (modules[i] != null && project.equals(modules[i].getProject()))
- list.add(modules[i]);
- }
- }
-
- IModule[] modules2 = new IModule[list.size()];
- list.toArray(modules2);
- return modules2;
- }
-
- /**
- * Returns a module from the given moduleId.
- *
- * @param java.lang.String moduleId
- * @return the module
- */
- public static IModule getModule(String moduleId) {
- int index = moduleId.indexOf(":");
- if (index <= 0)
- return null;
-
- String factoryId = moduleId.substring(0, index);
- ModuleFactory moduleFactory = ServerCore.findModuleFactory(factoryId);
- if (moduleFactory == null)
- return null;
-
- String moduleSubId = moduleId.substring(index+1);
- IModule module = moduleFactory.getModule(moduleSubId);
- if (module != null)
- return module;
- return null;
- }
-
- /**
- * Returns true if the given class name s is a superclass or interface of
- * the class obj.
- *
- * @param c java.lang.Class
- * @param s java.lang.String
- * @return boolean
- */
- protected static boolean isEnabled(Class c, String s) {
- if (s == null || s.length() == 0)
- return true;
-
- while (c != null && c != Object.class) {
- if (s.equals(c.getName()))
- return true;
- Class[] inf = c.getInterfaces();
- if (inf != null) {
- int size = inf.length;
- for (int i = 0; i < size; i++) {
- if (s.equals(inf[i].getName()))
- return true;
- }
- }
- c = c.getSuperclass();
- }
- return false;
- }
-
- /**
- * Returns a module for the given object that may be launchable on
- * a server using the Run on Server option. Throws an exception if it
- * can't determine the object without possible plugin loading.
- *
- * @param obj java.lang.Object
- * @return IModule
- * @throws java.lang.Exception
- */
- public static IModule getModule(Object obj, boolean initialized) throws Exception {
- if (obj == null)
- return null;
- Trace.trace(Trace.FINEST, "ServerUtil.getModule()");
- IModuleArtifactAdapter[] adapters = ServerCore.getModuleArtifactAdapters();
- if (adapters != null) {
- int size = adapters.length;
- for (int i = 0; i < size; i++) {
- if (isEnabled(obj.getClass(), adapters[i].getObjectClassName())) {
- if (!initialized) {
- Trace.trace(Trace.FINEST, "getModule(): " + obj.getClass() + " " + adapters[i].getObjectClassName());
- throw new Exception();
- }
- IModuleArtifact moduleObject = adapters[i].getModuleObject(obj);
- if (moduleObject != null)
- return moduleObject.getModule();
- }
- }
- }
- return null;
- }
-
- /**
- * Returns a list of the launchable clients for the given object.
- *
- * @return java.util.List
- */
- public static IModuleArtifact[] getModuleObjects(Object obj) {
- List list = new ArrayList();
- Trace.trace(Trace.FINEST, "ServerUtil.getModuleObjects()");
- IModuleArtifactAdapter[] adapters = ServerCore.getModuleArtifactAdapters();
- if (adapters != null) {
- int size = adapters.length;
- for (int i = 0; i < size; i++) {
- if (isEnabled(obj.getClass(), adapters[i].getObjectClassName())) {
- IModuleArtifact moduleObject = adapters[i].getModuleObject(obj);
- Trace.trace(Trace.FINEST, "moduleObject: " + moduleObject);
- if (moduleObject != null)
- list.add(moduleObject);
- }
- }
- }
-
- IModuleArtifact[] mo = new IModuleArtifact[list.size()];
- list.toArray(mo);
- return mo;
- }
-
- /**
- * Returns the first launchable object for the given server and module
- * object.
- *
- * @param server
- * @param moduleObject
- * @return ILaunchable
- */
- /*public static ILaunchable getLaunchable(IServer server, IModuleArtifact moduleObject) {
- ILaunchableAdapter[] adapters = ServerCore.getLaunchableAdapters();
- if (adapters != null) {
- int size = adapters.length;
- for (int i = 0; i < size; i++) {
- try {
- ILaunchable launchable = adapters[i].getLaunchable(server, moduleObject);
- Trace.trace(Trace.FINEST, "adapter= " + adapters[i] + ", launchable= " + launchable);
- if (launchable != null)
- return launchable;
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error in launchable adapter", e);
- }
- }
- }
- return null;
- }*/
-
- /**
- * Returns the first launchable object for the given server and module
- * object.
- *
- * @param server
- * @param moduleObject
- * @return ILaunchable
- */
- /*public static ILaunchable getLaunchable(IServer server, List moduleObjects) {
- Iterator iterator = moduleObjects.iterator();
- while (iterator.hasNext()) {
- IModuleArtifact moduleObject = (IModuleArtifact) iterator.next();
- ILaunchable launchable = getLaunchable(server, moduleObject);
- if (launchable != null)
- return launchable;
- }
- return null;
- }*/
-
- /**
- * Returns the factory that created the given module.
- *
- * @param org.eclipse.wst.server.core.IModule
- * @return org.eclipse.wst.server.core.IModuleFactory
- */
- /*public static IModuleFactory getModuleFactory(IModule module) {
- String id = module.getFactoryId();
- if (id == null)
- return null;
-
- IModuleFactory[] factories = ServerCore.getModuleFactories();
- if (factories != null) {
- int size = factories.length;
- for (int i = 0; i < size; i++) {
- if (id.equals(factories[i].getId()))
- return factories[i];
- }
- }
- return null;
- }*/
-
- /**
- * Return all the available modules from all factories whose
- * type includes the given id.
- *
- * @param type java.lang.String
- * @param onlyProjectModules boolean
- * @return java.util.List
- */
- public static IModule[] getModules(IModuleType[] moduleTypes) {
- List list = new ArrayList();
-
- ModuleFactory[] factories = ServerCore.getModuleFactories();
- if (factories != null) {
- int size = factories.length;
- for (int i = 0; i < size; i++) {
- if (isSupportedModule(factories[i].getModuleTypes(), moduleTypes)) {
- IModule[] modules = factories[i].getModules();
- if (modules != null) {
- int size2 = modules.length;
- for (int j = 0; j < size2; j++)
- list.add(modules[j]);
- }
- }
- }
- }
- IModule[] modules = new IModule[list.size()];
- list.toArray(modules);
- return modules;
- }
-
- public static IModule[] getModules(String type) {
- List list = new ArrayList();
-
- ModuleFactory[] factories = ServerCore.getModuleFactories();
- if (factories != null) {
- int size = factories.length;
- for (int i = 0; i < size; i++) {
- if (isSupportedModule(factories[i].getModuleTypes(), type, null)) {
- IModule[] modules = factories[i].getModules();
- if (modules != null) {
- int size2 = modules.length;
- for (int j = 0; j < size2; j++)
- list.add(modules[j]);
- }
- }
- }
- }
- IModule[] modules = new IModule[list.size()];
- list.toArray(modules);
- return modules;
- }
-
- /*public static boolean isSupportedModule(IServerType serverType, IModuleType moduleType) {
- IRuntimeType runtimeType = serverType.getRuntimeType();
- return isSupportedModule(runtimeType.getModuleTypes(), moduleType.getId(), moduleType.getVersion());
- }*/
-
- public static boolean isSupportedModule(IModuleType[] moduleTypes, String type, String version) {
- if (moduleTypes != null) {
- int size = moduleTypes.length;
- for (int i = 0; i < size; i++) {
- if (isSupportedModule(moduleTypes[i], type, version))
- return true;
- }
- }
- return false;
- }
-
- protected static boolean isSupportedModule(IModuleType[] moduleTypes, IModuleType[] mt) {
- if (mt != null) {
- int size = mt.length;
- for (int i = 0; i < size; i++) {
- if (isSupportedModule(moduleTypes, mt[i]))
- return true;
- }
- }
- return false;
- }
-
- public static boolean isSupportedModule(IModuleType[] moduleTypes, IModuleType mt) {
- if (moduleTypes != null) {
- int size = moduleTypes.length;
- for (int i = 0; i < size; i++) {
- if (isSupportedModule(moduleTypes[i], mt))
- return true;
- }
- }
- return false;
- }
-
- protected static boolean isSupportedModule(IModuleType moduleType, String type, String version) {
- String type2 = moduleType.getId();
- if (matches(type, type2)) {
- String version2 = moduleType.getVersion();
- if (matches(version, version2))
- return true;
- }
- return false;
- }
-
- public static boolean isSupportedModule(IModuleType moduleType, IModuleType mt) {
- String type2 = moduleType.getId();
- if (matches(mt.getId(), type2)) {
- String version2 = moduleType.getVersion();
- if (matches(mt.getVersion(), version2))
- return true;
- }
- return false;
- }
-
- protected static boolean matches(String a, String b) {
- if (a == null || b == null || "*".equals(a) || "*".equals(b) || a.startsWith(b) || b.startsWith(a))
- return true;
- return false;
- }
-
- /**
- * Return all the available modules from all factories.
- *
- * @return java.util.List
- */
- protected static IModule[] getModules() {
- List list = new ArrayList();
-
- ModuleFactory[] factories = ServerCore.getModuleFactories();
- if (factories != null) {
- int size = factories.length;
- for (int i = 0; i < size; i++) {
- IModule[] modules = factories[i].getModules();
- if (modules != null) {
- int size2 = modules.length;
- for (int j = 0; j < size2; j++) {
- if (!list.contains(modules[j]))
- list.add(modules[j]);
- }
- }
- }
- }
- IModule[] modules = new IModule[list.size()];
- list.toArray(modules);
- return modules;
- }
-
- /**
- * Adds or removes modules from a server. Will search for the first parent module
- * of each module and add it to the server instead. This method will handle multiple
- * modules having the same parent (the parent will only be added once), but may not
- * handle the case where the same module or parent is being both added and removed.
- *
- * @param server
- * @param add
- * @param remove
- * @param monitor
- * @throws CoreException
- */
- public static void modifyModules(IServerWorkingCopy server, IModule[] add, IModule[] remove, IProgressMonitor monitor) throws CoreException {
- if (add == null)
- add = new IModule[0];
- if (remove == null)
- remove = new IModule[0];
-
- int size = add.length;
- List addParentModules = new ArrayList();
- for (int i = 0; i < size; i++) {
- boolean found = false;
- try {
- IModule[] parents = server.getParentModules(add[i], monitor);
- if (parents != null) {
- found = true;
- if (parents.length > 0) {
- Object parent = parents[0];
- found = true;
- if (!addParentModules.contains(parent))
- addParentModules.add(parent);
- }
- }
- } catch (Exception e) {
- Trace.trace(Trace.WARNING, "Could not find parent module", e);
- }
-
- if (!found)
- addParentModules.add(add[i]);
- }
-
- size = remove.length;
- List removeParentModules = new ArrayList();
- for (int i = 0; i < size; i++) {
- boolean found = false;
- try {
- IModule[] parents = server.getParentModules(remove[i], monitor);
- if (parents != null) {
- found = true;
- if (parents.length > 0) {
- Object parent = parents[0];
- found = true;
- if (!removeParentModules.contains(parent))
- removeParentModules.add(parent);
- }
- }
- } catch (Exception e) {
- Trace.trace(Trace.WARNING, "Could not find parent module 2", e);
- }
-
- if (!found)
- removeParentModules.add(remove[i]);
- }
-
- IModule[] add2 = new IModule[addParentModules.size()];
- addParentModules.toArray(add2);
- IModule[] remove2 = new IModule[removeParentModules.size()];
- removeParentModules.toArray(remove2);
-
- server.modifyModules(add2, remove2, monitor);
- }
-
- /**
- * Returns true if the given server is already started in the given
- * mode, or could be (re)started in the start mode.
- *
- * @param server org.eclipse.wst.server.core.IServer
- * @param launchMode java.lang.String
- * @return boolean
- */
- public static boolean isCompatibleWithLaunchMode(IServer server, String launchMode) {
- if (server == null || launchMode == null)
- return false;
-
- int state = server.getServerState();
- if (state == IServer.STATE_STARTED && launchMode.equals(server.getMode()))
- return true;
-
- if (server.getServerType().supportsLaunchMode(launchMode))
- return true;
- return false;
- }
-
- /**
- * Filters the servers to those that are already started in the given launchMode
- * or can be (re)started in the given launchMode.
- *
- * @param server org.eclipse.wst.server.core.IServer[]
- * @param launchMode java.lang.String
- * @return org.eclipse.wst.server.core.IServer[]
- */
- /*public static IServer[] filterServersByLaunchMode(IServer[] servers, String launchMode) {
- if (servers == null || servers.length == 0)
- return servers;
-
- int size = servers.length;
- List list = new ArrayList();
- for (int i = 0; i < size; i++) {
- if (isCompatibleWithLaunchMode(servers[i], launchMode))
- list.add(servers[i]);
- }
- IServer[] temp = new IServer[list.size()];
- list.toArray(temp);
- return temp;
- }*/
-
- /**
- * Visit all the modules in the server configuration.
- */
- public static void visit(IServerAttributes server, IModuleVisitor visitor, IProgressMonitor monitor) {
- if (server == null)
- return;
-
- IModule[] modules = server.getModules(monitor);
- if (modules != null) {
- int size = modules.length;
- for (int i = 0; i < size; i++) {
- if (!visitModule(server, new IModule[0], modules[i], visitor, monitor))
- return;
- }
- }
- }
-
- /**
- * Returns true to keep visiting, and false to stop.
- */
- private static boolean visitModule(IServerAttributes server, IModule[] parents, IModule module, IModuleVisitor visitor, IProgressMonitor monitor) {
- if (server == null || module == null || parents == null)
- return true;
-
- if (!visitor.visit(parents, module))
- return false;
-
- IModule[] children = server.getChildModules(module, monitor);
- if (children != null) {
- int size = children.length;
- for (int i = 0; i < size; i++) {
- IModule module2 = children[i];
- IModule[] parents2 = new IModule[parents.length + 1];
- System.arraycopy(parents, 0, parents2, 0, parents.length);
- parents2[parents.length] = module;
-
- if (!visitModule(server, parents2, module2, visitor, monitor))
- return false;
- }
- }
-
- return true;
- }
-
- public static void setRuntimeDefaultName(IRuntimeWorkingCopy wc) {
- String typeName = wc.getRuntimeType().getName();
-
- String name = ServerPlugin.getResource("%defaultRuntimeName", new String[] {typeName});
- int i = 2;
- while (isNameInUse(name)) {
- name = ServerPlugin.getResource("%defaultRuntimeName2", new String[] {typeName, i + ""});
- i++;
- }
- wc.setName(name);
- }
-
- public static void setServerDefaultName(IServerWorkingCopy wc) {
- String typeName = wc.getServerType().getName();
- String host = wc.getHost();
-
- String name = ServerPlugin.getResource("%defaultServerName", new String[] {typeName, host});
- int i = 2;
- while (isNameInUse(name)) {
- name = ServerPlugin.getResource("%defaultServerName2", new String[] {typeName, host, i + ""});
- i++;
- }
- wc.setName(name);
- }
-
- private static boolean isValidFilename(String name) {
- IStatus status = ResourcesPlugin.getWorkspace().validateName(name, IResource.FILE);
- if (status != null && !status.isOK())
- return false;
-
- status = ResourcesPlugin.getWorkspace().validateName(name, IResource.FOLDER);
- if (status != null && !status.isOK())
- return false;
-
- return true;
- }
-
- private static String getValidFileName(String name) {
- if (isValidFilename(name))
- return name;
-
- // remove invalid characters
- String[] s = new String[] {".", "\\", "/", "?", ":", "*", "\"", "|", "<", ">"};
- int ind = 0;
- while (ind < s.length) {
- int index = name.indexOf(s[ind]);
- while (index >= 0) {
- name = name.substring(0, index) + name.substring(index+1);
- index = name.indexOf(s[ind]);
- }
- ind++;
- }
- return name;
- }
-
- public static IFile getUnusedServerFile(IProject project, IServerType type) {
- String typeName = getValidFileName(type.getName());
- String name = ServerPlugin.getResource("%defaultServerName3", new String[] {typeName})+ "." + IServer.FILE_EXTENSION;
- int i = 2;
- while (isFileNameInUse(project, name)) {
- name = ServerPlugin.getResource("%defaultServerName4", new String[] {typeName, i + ""}) + "." + IServer.FILE_EXTENSION;
- i++;
- }
- return project.getFile(name);
- }
-
- /**
- * Returns true if an element exists with the given name.
- *
- * @param name java.lang.String
- * @return boolean
- */
- private static boolean isNameInUse(String name) {
- if (name == null)
- return true;
-
- List list = new ArrayList();
-
- addAll(list, ServerCore.getRuntimes());
- addAll(list, ServerCore.getServers());
-
- Iterator iterator = list.iterator();
- while (iterator.hasNext()) {
- Object obj = iterator.next();
- if (obj instanceof IServerAttributes && name.equalsIgnoreCase(((IServerAttributes)obj).getName()))
- return true;
- if (obj instanceof IRuntime && name.equalsIgnoreCase(((IRuntime)obj).getName()))
- return true;
- }
-
- return false;
- }
-
- private static void addAll(List list, Object[] obj) {
- if (obj == null)
- return;
-
- int size = obj.length;
- for (int i = 0; i < size; i++) {
- list.add(obj[i]);
- }
- }
-
- /**
- * Returns true if an element exists with the given name.
- *
- * @param name java.lang.String
- * @return boolean
- */
- private static boolean isFileNameInUse(IProject project, String name) {
- if (name == null || project == null)
- return false;
-
- if (project.getFile(name).exists())
- return true;
- if (project.getFolder(name).exists())
- return true;
-
- return false;
- }
-
- /**
- * Return a list of all runtime targets that match the given type and version.
- * If type or version is null, it matches all of that type or version.
- *
- * @param type
- * @param version
- * @return
- */
- public static IRuntime[] getRuntimes(String type, String version) {
- List list = new ArrayList();
- IRuntime[] runtimes = ServerCore.getRuntimes();
- if (runtimes != null) {
- int size = runtimes.length;
- for (int i = 0; i < size; i++) {
- IRuntimeType runtimeType = runtimes[i].getRuntimeType();
- if (runtimeType != null && isSupportedModule(runtimeType.getModuleTypes(), type, version)) {
- list.add(runtimes[i]);
- }
- }
- }
-
- IRuntime[] runtimes2 = new IRuntime[list.size()];
- list.toArray(runtimes2);
- return runtimes2;
- }
-
- /**
- * Return a list of all runtime types that match the given type and version.
- * If type or version is null, it matches all of that type or version.
- *
- * @param type
- * @param version
- * @return
- */
- public static IRuntimeType[] getRuntimeTypes(String type, String version) {
- List list = new ArrayList();
- IRuntimeType[] runtimeTypes = ServerCore.getRuntimeTypes();
- if (runtimeTypes != null) {
- int size = runtimeTypes.length;
- for (int i = 0; i < size; i++) {
- if (isSupportedModule(runtimeTypes[i].getModuleTypes(), type, version)) {
- list.add(runtimeTypes[i]);
- }
- }
- }
-
- IRuntimeType[] rt = new IRuntimeType[list.size()];
- list.toArray(rt);
- return rt;
- }
-
- /**
- * Return a list of all runtime types that match the given type, version,
- * and partial runtime type id. If type, version, or runtimeTypeId is null,
- * it matches all of that type or version.
- *
- * @param type
- * @param version
- * @return
- */
- public static IRuntimeType[] getRuntimeTypes(String type, String version, String runtimeTypeId) {
- List list = new ArrayList();
- IRuntimeType[] runtimeTypes = ServerCore.getRuntimeTypes();
- if (runtimeTypes != null) {
- int size = runtimeTypes.length;
- for (int i = 0; i < size; i++) {
- if (isSupportedModule(runtimeTypes[i].getModuleTypes(), type, version)) {
- if (runtimeTypeId == null || runtimeTypes[i].getId().startsWith(runtimeTypeId))
- list.add(runtimeTypes[i]);
- }
- }
- }
-
- IRuntimeType[] rt = new IRuntimeType[list.size()];
- list.toArray(rt);
- return rt;
- }
-
- /**
- * Returns a list of all servers that this deployable is not currently
- * configured on, but could be added to. If includeErrors is true, this
- * method return servers where the parent deployable may throw errors. For
- * instance, this deployable may be the wrong spec level.
- *
- * @param module com.ibm.etools.server.core.IModule
- * @return com.ibm.etools.server.core.IServer[]
- */
- public static IServer[] getAvailableServersForModule(IModule module, boolean includeErrors, IProgressMonitor monitor) {
- if (module == null)
- return new IServer[0];
-
- // do it the slow way - go through all servers and
- // see if this deployable is not configured in it
- // but could be added
- List list = new ArrayList();
- IServer[] servers = ServerCore.getServers();
- if (servers != null) {
- int size = servers.length;
- for (int i = 0; i < size; i++) {
- if (!containsModule(servers[i], module, monitor)) {
- try {
- IModule[] parents = servers[i].getParentModules(module, monitor);
- if (parents != null && parents.length > 0) {
- boolean found = false;
- if (parents != null) {
- int size2 = parents.length;
- for (int j = 0; !found && j < size2; j++) {
- IModule parent = parents[j];
- IStatus status = servers[i].canModifyModules(new IModule[] { parent }, new IModule[0], monitor);
- if (status == null || status.isOK()){
- list.add(servers[i]);
- found = true;
- }
- }
- }
- }
- } catch (Exception se) {
- if (includeErrors)
- list.add(servers[i]);
- }
- }
- }
- }
-
- // make sure that the preferred server is the first one
- //IServer server = ServerCore.getServerPreferences().getDeployableServerPreference(deployable);
- //if (server != null && list.contains(server) && list.indexOf(server) != 0) {
- // list.remove(server);
- // list.add(0, server);
- //}
-
- IServer[] allServers = new IServer[list.size()];
- list.toArray(allServers);
- return allServers;
- }
-
- /*public static boolean isDefaultAvailable(IServerType serverType, IModuleType moduleType) {
- if (!isSupportedModule(serverType, moduleType))
- return false;
-
- // remote servers won't automatically work (i.e. without hostname)
- if (!serverType.supportsLocalhost())
- return false;
-
- // if it needs a runtime, check if there is one
- if (serverType.hasRuntime()) {
- IRuntime[] runtimes = ServerCore.getResourceManager().getRuntimes(serverType.getRuntimeType());
- if (runtimes == null || runtimes.length == 0)
- return false;
- }
- return true;
- }*/
-
- /**
- * Returns an array of all known runtime instances of
- * the given runtime type. This convenience method filters the list of known
- * runtime ({@link #getRuntimes()}) for ones with a matching
- * runtime type ({@link IRuntime#getRuntimeType()}). The array will not
- * contain any working copies.
- * <p>
- * A new array is returned on each call, so clients may store or modify the result.
- * </p>
- * <p>
- * [issue: Is this convenience method really necessary?
- * It's straightforward enough for a client to do.]
- * </p>
- *
- * @param runtimeType the runtime type
- * @return a possibly-empty list of runtime instances {@link IRuntime}
- * of the given runtime type
- */
- public static IRuntime[] getRuntimes(IRuntimeType runtimeType) {
- List list = new ArrayList();
- IRuntime[] runtimes = ServerCore.getRuntimes();
- if (runtimes != null) {
- int size = runtimes.length;
- for (int i = 0; i < size; i++) {
- if (runtimes[i].getRuntimeType() != null && runtimes[i].getRuntimeType().equals(runtimeType))
- list.add(runtimes[i]);
- }
- }
-
- IRuntime[] r = new IRuntime[list.size()];
- list.toArray(r);
- return r;
- }
-
- /**
- * Returns the server that came from the given file, or <code>null</code>
- * if none. This convenience method searches the list of known
- * servers ({@link #getServers()}) for the one with a matching
- * location ({@link IServer#getFile()}). The file may not be null.
- * <p>
- * [issue: Is this convenience method really necessary?
- * It's straightforward enough for a client to do.]
- * </p>
- *
- * @param a server file
- * @return the server instance, or <code>null</code> if
- * there is no server associated with the given file
- */
- public static IServer findServer(IFile file) {
- if (file == null)
- throw new IllegalArgumentException();
-
- IServer[] servers = ServerCore.getServers();
- if (servers != null) {
- int size = servers.length;
- for (int i = 0; i < size; i++) {
- if (file.equals(servers[i].getFile()))
- return servers[i];
- }
- }
- return null;
- }
-
- /**
- * Returns an array of all known server instances of
- * the given server type. This convenience method filters the list of known
- * servers ({@link #getServers()}) for ones with a matching
- * server type ({@link IServer#getServerType()}). The array will not contain
- * any working copies.
- * <p>
- * A new array is returned on each call, so clients may store or modify the result.
- * </p>
- *
- * @param serverType the server type
- * @return a possibly-empty array of server instances {@link IServer}
- * of the given server type
- */
- /*public static IServer[] getServers(IServerType serverType) {
- List list = new ArrayList();
- IServer[] servers = ServerCore.getServers();
- if (servers != null) {
- int size = servers.length;
- for (int i = 0; i < size; i++) {
- if (servers[i].getServerType().equals(serverType))
- list.add(servers[i]);
- }
- }
-
- IServer[] s = new IServer[list.size()];
- list.toArray(s);
- return s;
- }*/
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/Base.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/Base.java
deleted file mode 100644
index 5876cda..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/Base.java
+++ /dev/null
@@ -1,350 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal;
-
-import java.io.FileInputStream;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.*;
-/**
- *
- */
-public abstract class Base {
- protected static final String PROP_LOCKED = "locked";
- protected static final String PROP_PRIVATE = "private";
- protected static final String PROP_NAME = "name";
- protected static final String PROP_ID = "id";
-
- protected Map map = new HashMap();
-
- // file loaded from, or null if it is saved in metadata
- protected IFile file;
-
- public Base(IFile file) {
- this.file = file;
- }
-
- public Base(IFile file, String id) {
- this.file = file;
- //this.map = map;
- map.put(PROP_ID, id);
- }
-
- public int getTimestamp() {
- return getAttribute("timestamp", -1);
- }
-
- public IFile getFile() {
- return file;
- }
-
- public String getAttribute(String attributeName, String defaultValue) {
- try {
- Object obj = map.get(attributeName);
- if (obj == null)
- return defaultValue;
- return (String) obj;
- } catch (Exception e) {
- // ignore
- }
- return defaultValue;
- }
-
- public int getAttribute(String attributeName, int defaultValue) {
- try {
- Object obj = map.get(attributeName);
- if (obj == null)
- return defaultValue;
- return Integer.parseInt((String) obj);
- } catch (Exception e) {
- // ignore
- }
- return defaultValue;
- }
-
- public boolean getAttribute(String attributeName, boolean defaultValue) {
- try {
- Object obj = map.get(attributeName);
- if (obj == null)
- return defaultValue;
- return Boolean.valueOf((String) obj).booleanValue();
- } catch (Exception e) {
- // ignore
- }
- return defaultValue;
- }
-
- public List getAttribute(String attributeName, List defaultValue) {
- try {
- Object obj = map.get(attributeName);
- if (obj == null)
- return defaultValue;
- List list = (List) obj;
- if (list != null)
- return list;
- } catch (Exception e) {
- // ignore
- }
- return defaultValue;
- }
-
- public Map getAttribute(String attributeName, Map defaultValue) {
- try {
- Object obj = map.get(attributeName);
- if (obj == null)
- return defaultValue;
- Map map2 = (Map) obj;
- if (map2 != null)
- return map2;
- } catch (Exception e) {
- // ignore
- }
- return defaultValue;
- }
-
- public String getId() {
- return getAttribute(PROP_ID, "");
- }
-
- public String getName() {
- return getAttribute(PROP_NAME, "");
- }
-
- public boolean isLocked() {
- return getAttribute(PROP_LOCKED, false);
- }
-
- public boolean isPrivate() {
- return getAttribute(PROP_PRIVATE, false);
- }
-
- public boolean isWorkingCopy() {
- return false;
- }
-
- protected abstract String getXMLRoot();
-
- protected void save(IMemento memento) {
- //IMemento child = memento.createChild("properties");
- IMemento child = memento;
- Iterator iterator = map.keySet().iterator();
- while (iterator.hasNext()) {
- String key = (String) iterator.next();
- Object obj = map.get(key);
- if (obj instanceof String)
- child.putString(key, (String) obj);
- else if (obj instanceof Integer) {
- Integer in = (Integer) obj;
- child.putInteger(key, in.intValue());
- } else if (obj instanceof Boolean) {
- Boolean bool = (Boolean) obj;
- child.putBoolean(key, bool.booleanValue());
- } else if (obj instanceof List) {
- List list = (List) obj;
- saveList(child, key, list);
- } else if (obj instanceof Map) {
- Map vMap = (Map) obj;
- saveMap(child,key,vMap);
-
- }
- }
- saveState(child);
- }
- protected void saveMap(IMemento memento, String key, Map map2) {
- IMemento child = memento.createChild("map");
- child.putString("key", key);
- Iterator iterator = map2.keySet().iterator();
- while (iterator.hasNext()) {
- String s = (String) iterator.next();
- child.putString(s,(String)map2.get(s));
- }
- }
-
- protected void saveList(IMemento memento, String key, List list) {
- IMemento child = memento.createChild("list");
- child.putString("key", key);
- int i = 1;
- Iterator iterator = list.iterator();
- while (iterator.hasNext()) {
- String s = (String) iterator.next();
- child.putString(s + (i++), s);
- }
- }
-
- protected void saveToFile(IProgressMonitor monitor) throws CoreException {
- try {
- XMLMemento memento = XMLMemento.createWriteRoot(getXMLRoot());
- save(memento);
-
- InputStream in = memento.getInputStream();
- if (file.exists())
- file.setContents(in, true, true, ProgressUtil.getSubMonitorFor(monitor, 1000));
- else
- file.create(in, true, ProgressUtil.getSubMonitorFor(monitor, 1000));
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Could not save " + getXMLRoot(), e);
- throw new CoreException(new Status(IStatus.ERROR, ServerPlugin.PLUGIN_ID, 0, ServerPlugin.getResource("%errorSaving", getFile().toString()), e));
- }
- }
-
- protected void doSave(IProgressMonitor monitor) throws CoreException {
- if (file != null)
- saveToFile(monitor);
- else
- saveToMetadata(monitor);
- ResourceManager.getInstance().resolveServers();
- }
-
- protected void saveToMetadata(IProgressMonitor monitor) {
- // do nothing
- }
-
- protected abstract void saveState(IMemento memento);
-
- protected void load(IMemento memento) {
- map = new HashMap();
-
- Iterator iterator = memento.getNames().iterator();
- while (iterator.hasNext()) {
- String key = (String) iterator.next();
- map.put(key, memento.getString(key));
- }
- IMemento[] children = memento.getChildren("list");
- if (children != null) {
- int size = children.length;
- for (int i = 0; i < size; i++) {
- loadList(children[i]);
- }
- }
- IMemento[] maps = memento.getChildren("map");
- if (maps != null) {
- for (int i = 0; i <maps.length ; i++) {
- loadMap(maps[i]);
- }
- }
-
- loadState(memento);
- }
-
-
- protected void loadMap(IMemento memento) {
- String key = memento.getString("key");
- Map vMap = new HashMap();
- List keys = memento.getNames();
- Iterator iterator = keys.iterator();
- while(iterator.hasNext())
- {
- String s = (String)iterator.next();
- String v = memento.getString(s);
- vMap.put(s,v);
- }
- map.put(key, vMap);
- }
-
-
- protected void loadList(IMemento memento) {
- String key = memento.getString("key");
- List list = new ArrayList();
- int i = 1;
- String key2 = memento.getString("value" + (i++));
- while (key2 != null) {
- list.add(key2);
- key2 = memento.getString("value" + (i++));
- }
- map.put(key, list);
- }
-
- protected abstract void loadState(IMemento memento);
-
- protected void resolve() {
- // do nothing
- }
-
- public void delete() throws CoreException {
- if (file != null)
- file.delete(true, true, new NullProgressMonitor());
- else
- deleteFromMetadata();
- }
-
- protected void deleteFromMetadata() {
- // do nothing
- }
-
- public boolean equals(Object obj) {
- if (!(obj instanceof Base))
- return false;
-
- Base base = (Base) obj;
- if (getId() == null)
- return false;
- return getId().equals(base.getId());
- }
-
- /**
- *
- */
- protected void loadFromFile(IProgressMonitor monitor) throws CoreException {
- InputStream in = null;
- try {
- in = file.getContents();
- IMemento memento = XMLMemento.loadMemento(in);
- load(memento);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Could not load from file" + e.getMessage(), e);
- throw new CoreException(new Status(IStatus.ERROR, ServerPlugin.PLUGIN_ID, 0, ServerPlugin.getResource("%errorLoading", getFile().toString()), e));
- } finally {
- try {
- in.close();
- } catch (Exception e) {
- // ignore
- }
- }
- }
-
- protected void loadFromMemento(IMemento memento, IProgressMonitor monitor) {
- load(memento);
- }
-
- /**
- *
- */
- protected void loadFromPath(IPath path, IProgressMonitor monitor) throws CoreException {
- FileInputStream fin = null;
- try {
- fin = new FileInputStream(path.toFile());
- IMemento memento = XMLMemento.loadMemento(fin);
- load(memento);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Could not load from path: " + e.getMessage(), e);
- throw new CoreException(new Status(IStatus.ERROR, ServerPlugin.PLUGIN_ID, 0, ServerPlugin.getResource("%errorLoading", path.toString()), e));
- } finally {
- try {
- fin.close();
- } catch (Exception e) {
- // ignore
- }
- }
- }
-
- public IStatus validateEdit(Object context) {
- if (file == null)
- return null;
-
- return file.getWorkspace().validateEdit(new IFile[] { file }, context);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/Client.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/Client.java
deleted file mode 100644
index 4a99b6b..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/Client.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.debug.core.ILaunch;
-
-import org.eclipse.wst.server.core.IClient;
-import org.eclipse.wst.server.core.ILaunchable;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.model.ClientDelegate;
-/**
- *
- */
-public class Client implements IClient {
- private IConfigurationElement element;
- private ClientDelegate delegate;
-
- /**
- * LaunchableClient constructor comment.
- */
- public Client(IConfigurationElement element) {
- super();
- this.element = element;
- }
-
- /**
- * Returns the id of this LaunchableClient.
- *
- * @return java.lang.String
- */
- public String getId() {
- return element.getAttribute("id");
- }
-
- /*
- * @see IPublishManager#getDescription()
- */
- public String getDescription() {
- return element.getAttribute("description");
- }
-
- /*
- * @see IPublishManager#getLabel()
- */
- public String getName() {
- String label = element.getAttribute("name");
- if (label == null)
- return "n/a";
- return label;
- }
-
- /*
- * @see IPublishManager#getDelegate()
- */
- public ClientDelegate getDelegate() {
- if (delegate == null) {
- try {
- delegate = (ClientDelegate) element.createExecutableExtension("class");
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Could not create delegate" + toString() + ": " + e.getMessage());
- }
- }
- return delegate;
- }
-
- /**
- *
- */
- public boolean supports(IServer server, ILaunchable launchable, String launchMode) {
- try {
- return getDelegate().supports(server, launchable, launchMode);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error calling delegate " + toString() + ": " + e.getMessage());
- return false;
- }
- }
-
- /**
- * Opens or executes on the launchable.
- */
- public IStatus launch(IServer server, ILaunchable launchable, String launchMode, ILaunch launch) {
- try {
- return getDelegate().launch(server, launchable, launchMode, launch);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error calling delegate " + toString() + ": " + e.getMessage());
- }
- return null;
- }
-
- /**
- * Return a string representation of this object.
- *
- * @return java.lang.String
- */
- public String toString() {
- return "Client[" + getId() + "]";
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/IMemento.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/IMemento.java
deleted file mode 100644
index 8b1768c9..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/IMemento.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal;
-
-import java.util.List;
-/**
- * Interface to a memento used for saving the important state of an object
- * in a form that can be persisted in the file system.
- * <p>
- * Mementos were designed with the following requirements in mind:
- * <ol>
- * <li>Certain objects need to be saved and restored across platform sessions.
- * </li>
- * <li>When an object is restored, an appropriate class for an object might not
- * be available. It must be possible to skip an object in this case.</li>
- * <li>When an object is restored, the appropriate class for the object may be
- * different from the one when the object was originally saved. If so, the
- * new class should still be able to read the old form of the data.</li>
- * </ol>
- * </p>
- * <p>
- * Mementos meet these requirements by providing support for storing a
- * mapping of arbitrary string keys to primitive values, and by allowing
- * mementos to have other mementos as children (arranged into a tree).
- * A robust external storage format based on XML is used.
- * </p><p>
- * The key for an attribute may be any alpha numeric value. However, the
- * value of <code>TAG_ID</code> is reserved for internal use.
- * </p><p>
- * This interface is not intended to be implemented by clients.
- * </p>
- *
- * @see IPersistableElement
- * @see IElementFactory
- */
-public interface IMemento {
- /**
- * Special reserved key used to store the memento id
- * (value <code>"org.eclipse.ui.id"</code>).
- *
- * @see #getId
- */
- public static final String TAG_ID = "IMemento.internal.id"; //$NON-NLS-1$
-
- /**
- * Creates a new child of this memento with the given type.
- * <p>
- * The <code>getChild</code> and <code>getChildren</code> methods
- * are used to retrieve children of a given type.
- * </p>
- *
- * @param type the type
- * @return a new child memento
- * @see #getChild
- * @see #getChildren
- */
- public IMemento createChild(String type);
-
- /**
- * Creates a new child of this memento with the given type and id.
- * The id is stored in the child memento (using a special reserved
- * key, <code>TAG_ID</code>) and can be retrieved using <code>getId</code>.
- * <p>
- * The <code>getChild</code> and <code>getChildren</code> methods
- * are used to retrieve children of a given type.
- * </p>
- *
- * @param type the type
- * @param id the child id
- * @return a new child memento with the given type and id
- * @see #getId
- */
- public IMemento createChild(String type, String id);
-
- /**
- * Returns the first child with the given type id.
- *
- * @param type the type id
- * @return the first child with the given type
- */
- public IMemento getChild(String type);
-
- /**
- * Returns all children with the given type id.
- *
- * @param type the type id
- * @return the list of children with the given type
- */
- public IMemento[] getChildren(String type);
-
- /**
- * Returns the floating point value of the given key.
- *
- * @param key the key
- * @return the value, or <code>null</code> if the key was not found or was found
- * but was not a floating point number
- */
- public Float getFloat(String key);
-
- /**
- * Returns the id for this memento.
- *
- * @return the memento id, or <code>null</code> if none
- * @see #createChild(java.lang.String,java.lang.String)
- */
- public String getId();
-
- /**
- * Returns the name for this memento.
- *
- * @return the memento name, or <code>null</code> if none
- * @see #createChild(java.lang.String,java.lang.String)
- */
- public String getName();
-
- /**
- * Returns the integer value of the given key.
- *
- * @param key the key
- * @return the value, or <code>null</code> if the key was not found or was found
- * but was not an integer
- */
- public Integer getInteger(String key);
-
- /**
- * Returns the string value of the given key.
- *
- * @param key the key
- * @return the value, or <code>null</code> if the key was not found or was found
- * but was not an integer
- */
- public String getString(String key);
-
- /**
- * Returns the boolean value of the given key.
- *
- * @param key the key
- * @return the value, or <code>null</code> if the key was not found or was found
- * but was not a boolean
- */
- public Boolean getBoolean(String key);
-
- public List getNames();
-
- /**
- * Sets the value of the given key to the given floating point number.
- *
- * @param key the key
- * @param value the value
- */
- public void putFloat(String key, float value);
-
- /**
- * Sets the value of the given key to the given integer.
- *
- * @param key the key
- * @param value the value
- */
- public void putInteger(String key, int value);
-
- /**
- * Sets the value of the given key to the given boolean value.
- *
- * @param key the key
- * @param value the value
- */
- public void putBoolean(String key, boolean value);
-
- /**
- * Copy the attributes and children from <code>memento</code>
- * to the receiver.
- *
- * @param memento the IMemento to be copied.
- */
- public void putMemento(IMemento memento);
-
- /**
- * Sets the value of the given key to the given string.
- *
- * @param key the key
- * @param value the value
- */
- public void putString(String key, String value);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/IOrdered.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/IOrdered.java
deleted file mode 100644
index 3afa850..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/IOrdered.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal;
-/**
- * An object that has an absolute ordering, and can be ordered against other objects.
- *
- * <p>
- * [issue: It is notoriously difficult to place any kind of
- * useful order on objects that are contributed independently by
- * non-collaborating parties. The IOrdered mechanism is weak, and
- * can't really solve the problem. Issues of presentation are usually
- * best left to the UI, which can sort objects based on arbitrary
- * properties.]
- * </p>
- *
- * <p>This interface is not intended to be implemented by clients.</p>
- */
-public interface IOrdered {
- /**
- * Returns the order (index/priority).
- *
- * @return int
- */
- public int getOrder();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/IServerMonitor.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/IServerMonitor.java
deleted file mode 100644
index 25165ee..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/IServerMonitor.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal;
-/**
- * An interface to a TCP/IP monitor.
- *
- * <p>This interface is not intended to be implemented by clients.</p>
- */
-public interface IServerMonitor {
- /**
- * Returns the id of the monitor.
- *
- * @return java.lang.String
- */
- public String getId();
-
- /**
- * Returns the label (name) of this monitor.
- *
- * @return java.lang.String
- */
- public String getName();
-
- /**
- * Returns the description of this monitor.
- *
- * @return java.lang.String
- */
- public String getDescription();
-
- /**
- * Start monitoring the given port, and return the port number to
- * tunnel requests through. The monitorPort is the new port to use, or
- * -1 to pick a random port.
- *
- * @param port
- * @return
- */
- //public int startMonitoring(IServer server, IServerPort port, int monitorPort) throws CoreException;
-
- /**
- * Stop monitoring the given port.
- *
- * @param port
- */
- //public void stopMonitoring(IServer server, IServerPort port);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/LaunchableAdapter.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/LaunchableAdapter.java
deleted file mode 100644
index 8a6ce66..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/LaunchableAdapter.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-
-import org.eclipse.wst.server.core.ILaunchable;
-import org.eclipse.wst.server.core.ILaunchableAdapter;
-import org.eclipse.wst.server.core.IModuleArtifact;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.model.*;
-/**
- *
- */
-public class LaunchableAdapter implements ILaunchableAdapter {
- private IConfigurationElement element;
- private LaunchableAdapterDelegate delegate;
-
- /**
- * LaunchableAdapter constructor comment.
- */
- public LaunchableAdapter(IConfigurationElement element) {
- super();
- this.element = element;
- }
-
- /**
- * Returns the id of this LaunchableAdapter.
- *
- * @return java.lang.String
- */
- public String getId() {
- return element.getAttribute("id");
- }
-
- /*
- * @see IPublishManager#getDelegate()
- */
- public LaunchableAdapterDelegate getDelegate() {
- if (delegate == null) {
- try {
- delegate = (LaunchableAdapterDelegate) element.createExecutableExtension("class");
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Could not create delegate" + toString() + ": " + e.getMessage());
- }
- }
- return delegate;
- }
-
- /**
- *
- */
- public ILaunchable getLaunchable(IServer server, IModuleArtifact object) {
- try {
- return getDelegate().getLaunchable(server, object);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error calling delegate " + toString() + ": " + e.getMessage());
- return null;
- }
- }
-
- /**
- * Return a string representation of this object.
- *
- * @return java.lang.String
- */
- public String toString() {
- return "LaunchableAdapter[" + getId() + "]";
- }
-}
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ModuleArtifactAdapter.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ModuleArtifactAdapter.java
deleted file mode 100644
index 867114c..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ModuleArtifactAdapter.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.Platform;
-import org.osgi.framework.Bundle;
-
-import org.eclipse.wst.server.core.IModuleArtifact;
-import org.eclipse.wst.server.core.IModuleArtifactAdapter;
-import org.eclipse.wst.server.core.model.ModuleArtifactAdapterDelegate;
-/**
- *
- */
-public class ModuleArtifactAdapter implements IModuleArtifactAdapter {
- private IConfigurationElement element;
- private ModuleArtifactAdapterDelegate delegate;
-
- /**
- * ModuleArtifactAdapter constructor comment.
- */
- public ModuleArtifactAdapter(IConfigurationElement element) {
- super();
- this.element = element;
- }
-
- /**
- * Returns the id of this ModuleArtifactAdapter.
- *
- * @return java.lang.String
- */
- public String getId() {
- return element.getAttribute("id");
- }
-
- /**
- * Returns the (super) class name that this adapter can work with.
- *
- * @return java.lang.String
- */
- public String getObjectClassName() {
- return element.getAttribute("objectClass");
- }
-
- /**
- * Returns true if the plugin that loaded this class has been loaded.
- *
- * @return boolean
- */
- public boolean isPluginActivated() {
- String pluginId = element.getDeclaringExtension().getNamespace();
- return Platform.getBundle(pluginId).getState() == Bundle.ACTIVE;
- }
-
- /*
- * @see IPublishManager#getDelegate()
- */
- public ModuleArtifactAdapterDelegate getDelegate() {
- if (delegate == null) {
- try {
- delegate = (ModuleArtifactAdapterDelegate) element.createExecutableExtension("class");
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Could not create delegate " + toString() + ": " + e.getMessage());
- }
- }
- return delegate;
- }
-
- /**
- * Converts from a model object to an IModuleArtifact.
- */
- public IModuleArtifact getModuleObject(Object obj) {
- try {
- return getDelegate().getModuleObject(obj);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error calling delegate (" + obj + ") " + toString() + ": " + e.getMessage());
- return null;
- }
- }
-
- /**
- * Return a string representation of this object.
- *
- * @return java.lang.String
- */
- public String toString() {
- return "ModuleArtifactAdapter[" + getId() + "]";
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ModuleFactory.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ModuleFactory.java
deleted file mode 100644
index 592a0bb..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ModuleFactory.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IModuleType;
-import org.eclipse.wst.server.core.model.ModuleFactoryDelegate;
-import org.eclipse.wst.server.core.model.IModuleFactoryListener;
-/**
- *
- */
-public class ModuleFactory implements IOrdered {
- private IConfigurationElement element;
- private ModuleFactoryDelegate delegate;
- private List moduleTypes;
-
- private List modules;
-
- /**
- * ModuleFactory constructor comment.
- */
- public ModuleFactory(IConfigurationElement element) {
- super();
- this.element = element;
- }
-
- /**
- * Returns the id of this factory.
- *
- * @return java.lang.String
- */
- public String getId() {
- return element.getAttribute("id");
- }
-
- /**
- * Returns the index (ordering) of this task.
- *
- * @return int
- */
- public int getOrder() {
- try {
- return Integer.parseInt(element.getAttribute("order"));
- } catch (NumberFormatException e) {
- return -1;
- }
- }
-
- /**
- *
- * @return
- */
- public IModuleType[] getModuleTypes() {
- if (moduleTypes == null)
- moduleTypes = ServerPlugin.getModuleTypes(element.getChildren("moduleType"));
-
- IModuleType[] mt = new IModuleType[moduleTypes.size()];
- moduleTypes.toArray(mt);
- return mt;
- }
-
- /**
- * Returns true if this modules factory produces project modules.
- *
- * @return boolean
- */
- public boolean isProjectModuleFactory() {
- return "true".equalsIgnoreCase(element.getAttribute("projects"));
- }
-
- /*
- * @see IModuleFactoryDelegate#getDelegate()
- */
- public ModuleFactoryDelegate getDelegate() {
- if (delegate == null) {
- try {
- delegate = (ModuleFactoryDelegate) element.createExecutableExtension("class");
- delegate.initialize(this);
- ResourceManager.getInstance().addModuleFactoryListener(delegate);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Could not create delegate " + toString() + ": " + e.getMessage());
- }
- }
- return delegate;
- }
-
- /*
- * @see
- */
- public IModule getModule(String id) {
- IModule[] modules2 = getModules();
- if (modules2 != null) {
- int size = modules2.length;
- for (int i = 0; i < size; i++) {
- Module module = (Module) modules2[i];
- if (id.equals(module.getInternalId()))
- return module;
- }
- }
- return null;
- }
-
- /*
- * @see
- */
- public IModule[] getModules() {
- modules = null;
- if (modules == null) {
- try {
- modules = new ArrayList();
- IModule[] modules2 = getDelegate().getModules();
- if (modules2 != null) {
- int size = modules2.length;
- for (int i = 0; i < size; i++)
- modules.add(modules2[i]);
- }
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error calling delegate " + toString() + ": " + e.getMessage());
- return null;
- }
- }
-
- IModule[] m = new IModule[modules.size()];
- modules.toArray(m);
- return m;
- }
-
- /**
- * Add a listener for modules that are added/removed from this
- * factory.
- *
- * @param listener org.eclipse.wst.server.core.model.IModuleFactoryListener
- */
- public void addModuleFactoryListener(IModuleFactoryListener listener) {
- try {
- getDelegate().addModuleFactoryListener(listener);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error calling delegate " + toString() + ": " + e.getMessage());
- }
- }
-
- /**
- * Add a listener for modules that are added/removed from this
- * factory.
- *
- * @param listener org.eclipse.wst.server.core.model.IModuleFactoryListener
- */
- public void removeModuleFactoryListener(IModuleFactoryListener listener) {
- try {
- getDelegate().removeModuleFactoryListener(listener);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error calling delegate " + toString() + ": " + e.getMessage());
- }
- }
-
- /**
- * Return a string representation of this object.
- *
- * @return java.lang.String
- */
- public String toString() {
- return "ModuleFactory[" + getId() + "]";
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ModuleKind.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ModuleKind.java
deleted file mode 100644
index 88c2947..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ModuleKind.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-/**
- *
- */
-public class ModuleKind {
- protected String id;
- protected String name;
-
- public ModuleKind(IConfigurationElement ce) {
- super();
- this.id = ce.getAttribute("id");
- this.name = ce.getAttribute("name");
- }
-
- public ModuleKind(String id, String name) {
- super();
- this.id = id;
- this.name = name;
- }
-
- public String getId() {
- return id;
- }
-
- public String getName() {
- return name;
- }
-
- public String toString() {
- return "ModuleType[" + id + ", " + name + "]";
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ModuleType.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ModuleType.java
deleted file mode 100644
index b01d72c..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ModuleType.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.wst.server.core.IModuleType;
-/**
- *
- */
-public class ModuleType implements IModuleType {
- protected String id;
- protected String version;
-
- // cached copy of all module types
- private static List moduleTypes;
-
- public ModuleType(String id, String version) {
- super();
- this.id = id;
- this.version = version;
- }
-
- public String getId() {
- return id;
- }
-
- public String getName() {
- ModuleKind mt = getModuleType(id);
- if (mt != null)
- return mt.getName();
- return null;
- }
-
- public String getVersion() {
- return version;
- }
-
- /**
- * Returns an array of all known module types.
- * <p>
- * A new array is returned on each call, so clients may store or modify the result.
- * </p>
- *
- * @return the array of module types {@link IModuleType}
- */
- /*public static IModuleType[] getModuleTypes() {
- if (moduleTypes == null)
- loadModuleTypes();
-
- IModuleType[] mt = new IModuleType[moduleTypes.size()];
- moduleTypes.toArray(mt);
- return mt;
- }*/
-
- /**
- * Returns the module type with the given id, or <code>null</code>
- * if none. This convenience method searches the list of known
- * module types ({@link #getModuleTypes()}) for the one a matching
- * module type id ({@link ModuleKind#getId()}). The id may not be null.
- * <p>
- * [issue: Consider renaming this method findModuleType
- * to make it clear that it is searching.]
- * </p>
- *
- * @param the module type id
- * @return the module type, or <code>null</code> if there is no module type
- * with the given id
- */
- public static ModuleKind getModuleType(String id) {
- if (id == null)
- throw new IllegalArgumentException();
-
- if (moduleTypes == null)
- loadModuleTypes();
-
- Iterator iterator = moduleTypes.iterator();
- while (iterator.hasNext()) {
- ModuleKind moduleType = (ModuleKind) iterator.next();
- if (id.equals(moduleType.getId()))
- return moduleType;
- }
- return null;
- }
-
- /**
- * Load the module types.
- */
- private static synchronized void loadModuleTypes() {
- if (moduleTypes != null)
- return;
- Trace.trace(Trace.EXTENSION_POINT, "->- Loading .moduleTypes extension point ->-");
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IConfigurationElement[] cf = registry.getConfigurationElementsFor(ServerPlugin.PLUGIN_ID, "moduleTypes");
-
- int size = cf.length;
- moduleTypes = new ArrayList(size);
- for (int i = 0; i < size; i++) {
- try {
- ModuleKind moduleType = new ModuleKind(cf[i]);
- moduleTypes.add(moduleType);
- Trace.trace(Trace.EXTENSION_POINT, " Loaded moduleType: " + cf[i].getAttribute("id"));
- } catch (Throwable t) {
- Trace.trace(Trace.SEVERE, " Could not load moduleType: " + cf[i].getAttribute("id"), t);
- }
- }
-
- Trace.trace(Trace.EXTENSION_POINT, "-<- Done loading .moduleTypes extension point -<-");
- }
-
- public String toString() {
- return "ModuleType[" + id + ", " + version + "]";
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ProgressUtil.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ProgressUtil.java
deleted file mode 100644
index 8efa4a9..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ProgressUtil.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal;
-
-import org.eclipse.core.runtime.*;
-/**
- * Progress Monitor utility.
- */
-public class ProgressUtil {
- /**
- * ProgressUtil constructor comment.
- */
- private ProgressUtil() {
- super();
- }
-
- /**
- * Return a valid progress monitor.
- *
- * @param monitor org.eclipse.core.runtime.IProgressMonitor
- * @return org.eclipse.core.runtime.IProgressMonitor
- */
- public static IProgressMonitor getMonitorFor(IProgressMonitor monitor) {
- if (monitor == null)
- return new NullProgressMonitor();
- return monitor;
- }
-
- /**
- * Return a sub-progress monitor with the given amount on the
- * current progress monitor.
- *
- * @param monitor org.eclipse.core.runtime.IProgressMonitor
- * @param ticks int
- * @return org.eclipse.core.runtime.IProgressMonitor
- */
- public static IProgressMonitor getSubMonitorFor(IProgressMonitor monitor, int ticks) {
- if (monitor == null)
- return new NullProgressMonitor();
- if (monitor instanceof NullProgressMonitor)
- return monitor;
- return new SubProgressMonitor(monitor, ticks);
- }
-
- /**
- * Return a sub-progress monitor with the given amount on the
- * current progress monitor.
- *
- * @param monitor org.eclipse.core.runtime.IProgressMonitor
- * @param ticks int
- * @return org.eclipse.core.runtime.IProgressMonitor
- */
- public static IProgressMonitor getSubMonitorFor(IProgressMonitor monitor, int ticks, int style) {
- if (monitor == null)
- return new NullProgressMonitor();
- if (monitor instanceof NullProgressMonitor)
- return monitor;
- return new SubProgressMonitor(monitor, ticks, style);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ProjectProperties.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ProjectProperties.java
deleted file mode 100644
index c39ed0d..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ProjectProperties.java
+++ /dev/null
@@ -1,345 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal;
-
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-
-import org.eclipse.wst.server.core.*;
-/**
- * Helper class that stores preference information for the server tools.
- */
-public class ProjectProperties implements IProjectProperties {
- private static final String PROJECT_PREFERENCE_FILE = ".runtime";
-
- protected IProject project;
-
- protected String serverId;
- protected String runtimeId;
- protected boolean serverProject = false;
-
- // project properties listeners
- protected transient List listeners;
-
- /**
- * ProjectProperties constructor comment.
- */
- public ProjectProperties(IProject project) {
- super();
- this.project = project;
- }
-
- /**
- * Load the preferences.
- */
- private void loadPreferences() {
- Trace.trace(Trace.FINEST, "Loading project preferences: " + project);
-
- InputStream in = null;
- try {
- IMemento memento = null;
- if (!project.exists() || !project.isOpen())
- return;
- IFile file = project.getFile(PROJECT_PREFERENCE_FILE);
- if (file != null && file.exists()) {
- in = file.getContents();
- memento = XMLMemento.loadMemento(in);
- }
-
- if (memento == null)
- return;
-
- serverId = memento.getString("server-id");
- runtimeId = memento.getString("runtime-id");
- String s = memento.getString("servers");
- if (s != null && "true".equals(s))
- serverProject = true;
- else
- serverProject = false;
- } catch (Exception e) {
- Trace.trace("Could not load preferences: " + e.getMessage());
- } finally {
- try {
- in.close();
- } catch (Exception e) {
- // ignore
- }
- }
- }
-
- private void savePreferences(IProgressMonitor monitor) throws CoreException {
- if (project.exists() && project.isOpen()) {
- IFile file = project.getFile(PROJECT_PREFERENCE_FILE);
-
- if (file.exists() && file.isReadOnly()) {
- IStatus status = ResourcesPlugin.getWorkspace().validateEdit(new IFile[] { file }, null);
- if (status.getSeverity() == IStatus.ERROR)
- // didn't work or not under source control
- throw new CoreException(status);
- }
-
- InputStream in = null;
- try {
- XMLMemento memento = XMLMemento.createWriteRoot("runtime");
-
- if (runtimeId != null)
- memento.putString("runtime-id", runtimeId);
- if (serverId != null)
- memento.putString("server-id", serverId);
- if (serverProject)
- memento.putString("servers", "true");
- else
- memento.putString("servers", "false");
- in = memento.getInputStream();
-
- if (file.exists())
- file.setContents(in, true, true, monitor);
- else
- file.create(in, true, monitor);
- } catch (Exception e) {
- throw new CoreException(new Status(IStatus.ERROR, ServerPlugin.PLUGIN_ID, 0, "", e));
- } finally {
- try {
- in.close();
- } catch (Exception e) {
- // ignore
- }
- }
- return;
- }
- }
-
- /**
- * Returns the preferred runtime server for the project. This method
- * returns null if the server was never chosen or does not currently exist. (if the
- * server is recreated or was in a closed project, etc. this method will return
- * the original value if it becomes available again)
- *
- * @return server org.eclipse.wst.server.core.model.IServer
- */
- public IServer getDefaultServer() {
- loadPreferences();
-
- if (serverId == null || serverId.length() == 0)
- return null;
-
- IServer server = ServerCore.findServer(serverId);
- /*if (server != null && ServerUtil.containsModule(server, module))
- return server;
- else
- return null;*/
- return server;
- }
-
- /**
- * Sets the preferred runtime server for the project.
- *
- * @param server org.eclipse.wst.server.core.IServer
- */
- public void setDefaultServer(IServer server, IProgressMonitor monitor) throws CoreException {
- loadPreferences();
-
- String newServerId = null;
- if (server != null)
- newServerId = server.getId();
- if (serverId == null && newServerId == null)
- return;
- if (serverId != null && serverId.equals(newServerId))
- return;
-
- savePreferences(monitor);
- fireDefaultServerChanged(server);
- }
-
- protected String getRuntimeTargetId() {
- loadPreferences();
- return runtimeId;
- }
-
- protected void setRuntimeTargetId(String newRuntimeId, IProgressMonitor monitor) throws CoreException {
- loadPreferences();
- runtimeId = newRuntimeId;
- savePreferences(monitor);
- }
-
- /**
- * Returns the current runtime target type for the given project.
- *
- * @return
- */
- public IRuntime getRuntimeTarget() {
- loadPreferences();
- if (runtimeId == null)
- return null;
- return ServerCore.findRuntime(runtimeId);
- }
-
- /**
- * Sets the runtime target for the project.
- *
- * @param target
- * @param monitor
- */
- public void setRuntimeTarget(IRuntime runtime, IProgressMonitor monitor) throws CoreException {
- loadPreferences();
- IRuntime oldRuntime = null;
- if (runtimeId != null)
- oldRuntime = ServerCore.findRuntime(runtimeId);
- setRuntimeTarget(oldRuntime, runtime, true, monitor);
- }
-
- protected void setRuntimeTarget(IRuntime oldRuntime, IRuntime newRuntime, boolean save, IProgressMonitor monitor) throws CoreException {
- Trace.trace(Trace.RUNTIME_TARGET, "setRuntimeTarget : " + oldRuntime + " -> " + newRuntime);
-
- if (oldRuntime == null && newRuntime == null)
- return;
- if (oldRuntime != null && oldRuntime.equals(newRuntime))
- return;
-
- IRuntimeTargetHandler[] handlers = ServerCore.getRuntimeTargetHandlers();
- if (handlers == null)
- return;
-
- int size = handlers.length;
- // remove old target
- if (oldRuntime != null) {
- IRuntimeType runtimeType = oldRuntime.getRuntimeType();
- for (int i = 0; i < size; i++) {
- IRuntimeTargetHandler handler = handlers[i];
- long time = System.currentTimeMillis();
- boolean supports = handler.supportsRuntimeType(runtimeType);
- Trace.trace(Trace.RUNTIME_TARGET, " < " + handler + " " + supports);
- if (supports)
- handler.removeRuntimeTarget(project, oldRuntime, monitor);
- Trace.trace(Trace.PERFORMANCE, "Runtime target: <" + (System.currentTimeMillis() - time) + "> " + handler.getId());
- }
- }
-
- // add new target
- if (newRuntime != null) {
- runtimeId = newRuntime.getId();
- if (save)
- savePreferences(monitor);
- IRuntimeType runtimeType = newRuntime.getRuntimeType();
- for (int i = 0; i < size; i++) {
- IRuntimeTargetHandler handler = handlers[i];
- long time = System.currentTimeMillis();
- boolean supports = handler.supportsRuntimeType(runtimeType);
- Trace.trace(Trace.RUNTIME_TARGET, " > " + handler + " " + supports);
- if (supports)
- handler.setRuntimeTarget(project, newRuntime, monitor);
- Trace.trace(Trace.PERFORMANCE, "Runtime target: <" + (System.currentTimeMillis() - time) + "> " + handler.getId());
- }
- } else {
- runtimeId = null;
- if (save)
- savePreferences(monitor);
- }
-
- fireRuntimeTargetChanged(newRuntime);
- Trace.trace(Trace.RUNTIME_TARGET, "setRuntimeTarget <");
- }
-
- public void addProjectPropertiesListener(IProjectPropertiesListener listener) {
- Trace.trace(Trace.LISTENERS, "Adding project properties listener " + listener + " to " + this);
-
- if (listeners == null)
- listeners = new ArrayList();
- listeners.add(listener);
- }
-
- public void removeProjectPropertiesListener(IProjectPropertiesListener listener) {
- Trace.trace(Trace.LISTENERS, "Removing project properties listener " + listener + " from " + this);
-
- if (listeners != null)
- listeners.remove(listener);
- }
-
- /**
- * Fire a event because the default server changed.
- *
- * @param server org.eclipse.wst.server.core.IServer
- */
- private void fireDefaultServerChanged(IServer server) {
- Trace.trace(Trace.LISTENERS, "->- Firing defaultServerChanged event: " + server + " ->-");
-
- if (listeners == null || listeners.isEmpty())
- return;
-
- int size = listeners.size();
- IProjectPropertiesListener[] ppl = new IProjectPropertiesListener[size];
- listeners.toArray(ppl);
-
- for (int i = 0; i < size; i++) {
- Trace.trace(Trace.LISTENERS, " Firing defaultServerChanged event to " + ppl[i]);
- try {
- ppl[i].defaultServerChanged(project, server);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, " Error firing defaultServerChanged event to " + ppl[i], e);
- }
- }
-
- Trace.trace(Trace.LISTENERS, "-<- Done firing defaultServerChanged event -<-");
- }
-
- /**
- * Fire a event because the runtime target changed.
- *
- * @param server org.eclipse.wst.server.core.IRuntime
- */
- private void fireRuntimeTargetChanged(IRuntime runtime) {
- Trace.trace(Trace.LISTENERS, "->- Firing runtimeTargetChanged event: " + runtime + " ->-");
-
- if (listeners == null || listeners.isEmpty())
- return;
-
- int size = listeners.size();
- IProjectPropertiesListener[] ppl = new IProjectPropertiesListener[size];
- listeners.toArray(ppl);
-
- for (int i = 0; i < size; i++) {
- Trace.trace(Trace.LISTENERS, " Firing runtimeTargetChanged event to " + ppl[i]);
- try {
- ppl[i].runtimeTargetChanged(project, runtime);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, " Error firing runtimeTargetChanged event to " + ppl[i], e);
- }
- }
-
- Trace.trace(Trace.LISTENERS, "-<- Done firing runtimeTargetChanged event -<-");
- }
-
- /**
- *
- */
- public boolean isServerProject() {
- loadPreferences();
- return serverProject;
- }
-
- /**
- *
- * @param b
- */
- public void setServerProject(boolean b, IProgressMonitor monitor) throws CoreException {
- loadPreferences();
- serverProject = b;
- savePreferences(monitor);
- }
-
- public String toString() {
- return "ProjectProperties[" + project + ", " + serverId + ", " + runtimeId + "]";
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/PublishControl.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/PublishControl.java
deleted file mode 100644
index 9a9d34e..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/PublishControl.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal;
-
-import java.util.*;
-import org.eclipse.core.runtime.*;
-/**
- * Publish controller.
- */
-public class PublishControl {
- public String memento;
- public String parents;
- public boolean isDirty = true;
- public List resourceInfo = new ArrayList();
-
- public class ResourcePublishInfo {
- IPath localPath;
- long localTimestamp;
- IPath remotePath;
- long remoteTimestamp;
-
- public boolean equals(Object obj) {
- if (!(obj instanceof ResourcePublishInfo))
- return false;
-
- // return true if local or remote paths are equal
- ResourcePublishInfo rpi = (ResourcePublishInfo) obj;
- if (localPath == null && rpi.localPath == null)
- return true;
- else if (localPath != null && localPath.equals(rpi.localPath))
- return true;
- else if (remotePath != null && rpi.remotePath == null)
- return true;
- else if (remotePath != null && remotePath.equals(rpi.remotePath))
- return true;
- else
- return false;
- }
- }
-
- /**
- * PublishControl constructor comment.
- */
- public PublishControl(String parents, String memento) {
- super();
-
- this.parents = parents;
- this.memento = memento;
- }
-
- /**
- * PublishControl constructor comment.
- */
- public PublishControl(IMemento memento) {
- super();
-
- load(memento);
- }
-
- public String getMemento() {
- return memento;
- }
-
- public String getParentsRef() {
- return parents;
- }
-
- /**
- * Returns true if the project is dirty.
- *
- * @return boolean
- */
- public boolean isDirty() {
- return isDirty;
- }
-
- /**
- * Sets the dirty flag.
- *
- * @param boolean
- */
- public void setDirty(boolean b) {
- isDirty = b;
- }
-
- /**
- *
- */
- protected void load(IMemento memento2) {
- Trace.trace(Trace.FINEST, "Loading publish control for: " + memento2);
-
- try {
- memento = memento2.getString("memento");
- parents = memento2.getString("parents");
- /*String temp = projectChild[i].getString("dirty");
- if ("true".equals(temp))
- ppi.isDirty = true;
- else
- ppi.isDirty = false;*/
-
- IMemento[] resourceChild = memento2.getChildren("resource");
- int size2 = resourceChild.length;
- resourceInfo = new ArrayList(size2 + 5);
- for (int j = 0; j < size2; j++) {
- ResourcePublishInfo rpi = new ResourcePublishInfo();
- String temp = resourceChild[j].getString("localPath");
- if (temp != null && temp.length() > 1)
- rpi.localPath = new Path(temp);
- temp = resourceChild[j].getString("remotePath");
- if (temp != null && temp.length() > 1)
- rpi.remotePath = new Path(temp);
- temp = resourceChild[j].getString("localTimestamp");
- if (temp != null && temp.length() > 1)
- rpi.localTimestamp = Long.parseLong(temp);
- temp = resourceChild[j].getString("remoteTimestamp");
- if (temp != null && temp.length() > 1)
- rpi.remoteTimestamp = Long.parseLong(temp);
- resourceInfo.add(rpi);
- }
- } catch (Exception e) {
- Trace.trace(Trace.WARNING, "Could not load publish control information: " + e.getMessage());
- }
- }
-
- /**
- *
- */
- protected void save(IMemento memento2) {
- try {
- memento2.putString("memento", memento);
- memento2.putString("parents", parents);
- /*if (ppi.isDirty)
- project.putString("dirty", "true");
- else
- project.putString("dirty", "false");*/
-
- Iterator ite = resourceInfo.iterator();
- while (ite.hasNext()) {
- ResourcePublishInfo rpi = (ResourcePublishInfo) ite.next();
- IMemento resource = memento2.createChild("resource");
-
- if (rpi.localPath != null) {
- resource.putString("localPath", rpi.localPath.toString());
- resource.putString("localTimestamp", new Long(rpi.localTimestamp).toString());
- }
- if (rpi.remotePath != null) {
- resource.putString("remotePath", rpi.remotePath.toString());
- resource.putString("remoteTimestamp", new Long(rpi.remoteTimestamp).toString());
- }
- }
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Could not save publish control info", e);
- }
- }
-
- public String toString() {
- return "PublishControl [" + memento + " " + isDirty + "]";
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/PublishInfo.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/PublishInfo.java
deleted file mode 100644
index b42d957..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/PublishInfo.java
+++ /dev/null
@@ -1,266 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal;
-
-import java.util.*;
-import java.io.File;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IServer;
-/**
- * Helper to obtain and store the global publish information.
- * (what files were published and when) Delegates to PublishState
- * for all server specific publishing information.
- */
-public class PublishInfo {
- protected static PublishInfo instance;
-
- protected static final String PUBLISH_DIR = "publish";
-
- // map of server refs to IPaths
- protected Map servers;
-
- // map of control ref to PublishControl
- protected Map publishControls;
-
- // list of serverRefs that have been loaded
- protected List loadedServers;
-
- /**
- * PublishInfo constructor comment.
- */
- private PublishInfo() {
- super();
-
- servers = new HashMap();
- loadedServers = new ArrayList();
- publishControls = new HashMap();
- load();
- }
-
- /**
- * Return the publish info.
- *
- * @return org.eclipse.wst.server.core.internal.PublishInfo
- */
- public static PublishInfo getPublishInfo() {
- if (instance == null)
- instance = new PublishInfo();
- return instance;
- }
-
- protected String getPublishControlRef(IServer server, IModule[] parents, IModule module) {
- StringBuffer sb = new StringBuffer();
- sb.append(server.getId());
-
- if (parents != null) {
- int size = parents.length;
- for (int i = 0; i < size; i++) {
- sb.append("#");
- sb.append(parents[i].getId());
- }
- }
-
- sb.append("#");
- sb.append(module.getId());
- return sb.toString();
- }
-
- protected String getPublishControlRef(String serverId, String parentsRef, String memento) {
- StringBuffer sb = new StringBuffer();
- sb.append(serverId);
-
- if (parentsRef != null && parentsRef.length() > 0) {
- sb.append("#");
- sb.append(parentsRef);
- }
-
- sb.append("#");
- sb.append(memento);
- return sb.toString();
- }
-
- protected String getParentsMemento(IModule[] parents) {
- StringBuffer sb = new StringBuffer();
- boolean first = true;
-
- if (parents != null) {
- int size = parents.length;
- for (int i = 0; i < size; i++) {
- if (!first)
- sb.append("#");
- else
- first = false;
- sb.append(parents[i].getId());
- }
- }
-
- return sb.toString();
- }
-
- /**
- * Return the publish state.
- *
- * @return org.eclipse.wst.server.core.internal.PublishState
- * @param server org.eclipse.wst.server.core.model.IServer
- */
- public PublishControl getPublishControl(IServer server, IModule[] parents, IModule module) {
- String controlRef = getPublishControlRef(server, parents, module);
-
- // have we tried loading yet?
- String serverId = server.getId();
- if (servers.containsKey(serverId)) {
- if (!loadedServers.contains(serverId)) {
- loadServerPublishControls(serverId);
- loadedServers.add(serverId);
- } else {
- // already loaded
- }
- } else {
- // first time server is being used
- IPath path = ServerPlugin.getInstance().getStateLocation().append(PUBLISH_DIR);
- File file = new File(path.toOSString());
- if (!file.exists())
- file.mkdir();
-
- file = null;
- int i = 0;
- while (file == null || file.exists()) {
- path = ServerPlugin.getInstance().getStateLocation().append(PUBLISH_DIR).append("data" + i + ".xml");
- if (servers.get(path) == null)
- file = new File(path.toOSString());
- i++;
- }
-
- servers.put(serverId, path);
- loadedServers.add(serverId);
- save();
- }
-
- // check if it now exists
- if (publishControls.containsKey(controlRef)) {
- PublishControl control = (PublishControl) publishControls.get(controlRef);
- if (control != null)
- return control;
- }
-
- // have to create a new one
- PublishControl control = new PublishControl(getParentsMemento(parents), module.getId());
- publishControls.put(controlRef, control);
- return control;
- }
-
- /**
- *
- */
- protected void load() {
- Trace.trace(Trace.FINEST, "Loading publish info");
- String filename = ServerPlugin.getInstance().getStateLocation().append("publish.xml").toOSString();
-
- try {
- IMemento memento = XMLMemento.loadMemento(filename);
-
- IMemento[] serverChild = memento.getChildren("server");
- int size = serverChild.length;
- servers = new HashMap(size + 2);
-
- for (int i = 0; i < size; i++) {
- String id = serverChild[i].getString("id");
- String path = serverChild[i].getString("path");
-
- servers.put(id, new Path(path));
- }
- } catch (Exception e) {
- Trace.trace(Trace.WARNING, "Could not load global publish info: " + e.getMessage());
- }
- }
-
- /**
- *
- */
- protected void save() {
- String filename = ServerPlugin.getInstance().getStateLocation().append("publish.xml").toOSString();
-
- try {
- XMLMemento memento = XMLMemento.createWriteRoot("publish-info");
-
- Iterator iterator = servers.keySet().iterator();
- while (iterator.hasNext()) {
- String serverId = (String) iterator.next();
- IPath path = (IPath) servers.get(serverId);
-
- IMemento server = memento.createChild("server");
- server.putString("id", serverId);
- server.putString("path", path.toString());
- }
-
- memento.saveToFile(filename);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Could not save global publish info", e);
- }
- }
-
- public void save(IServer server) {
- saveServerPublishControls(server.getId());
- }
-
- /**
- *
- */
- protected void loadServerPublishControls(String serverRef) {
- IPath path = (IPath) servers.get(serverRef);
- String filename = path.toOSString();
- Trace.trace(Trace.FINEST, "Loading publish controls from " + filename);
-
- try {
- IMemento memento2 = XMLMemento.loadMemento(filename);
- IMemento[] children = memento2.getChildren("module");
-
- int size = children.length;
- for (int i = 0; i < size; i++) {
- PublishControl control = new PublishControl(children[i]);
- publishControls.put(getPublishControlRef(serverRef, control.getParentsRef(), control.getMemento()), control);
- }
- } catch (Exception e) {
- Trace.trace(Trace.WARNING, "Could not load publish control information: " + e.getMessage());
- }
- }
-
- /**
- *
- */
- protected void saveServerPublishControls(String serverRef) {
- if (!servers.containsKey(serverRef))
- return;
-
- IPath path = (IPath) servers.get(serverRef);
- String filename = path.toOSString();
- Trace.trace(Trace.FINEST, "Saving publish controls to " + filename);
-
- try {
- XMLMemento memento = XMLMemento.createWriteRoot("server");
-
- Iterator iterator = publishControls.keySet().iterator();
- while (iterator.hasNext()) {
- String controlRef = (String) iterator.next();
- if (controlRef.startsWith(serverRef + "#")) {
- PublishControl control = (PublishControl) publishControls.get(controlRef);
- IMemento child = memento.createChild("module");
- control.save(child);
- }
- }
- memento.saveToFile(filename);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Could not save publish control information", e);
- }
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/PublishStatusItem.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/PublishStatusItem.java
deleted file mode 100644
index 1afcd68..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/PublishStatusItem.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal;
-
-import org.eclipse.core.runtime.IStatus;
-/**
- * IStatus used as child of a PublishStatus. It is just a
- * wrapper around another IStatus, used to give information
- * about the contained IStatus.
- */
-public class PublishStatusItem implements IStatus {
- // Unique identifier of plug-in.
- private String pluginId;
-
- // Message, localized to the current locale.
- private String message;
-
- private IStatus child;
-
- /**
- * PublishStatus constructor comment.
- */
- public PublishStatusItem(String pluginId, String message, IStatus child) {
- super();
- this.pluginId = pluginId;
- this.message = message;
- this.child = child;
- }
-
- /**
- * Returns a list of status object immediately contained in this
- * multi-status, or an empty list if this is not a multi-status.
- *
- * @return an array of status objects
- * @see #isMultiStatus
- */
- public IStatus[] getChildren() {
- if (child == null)
- return new IStatus[0];
- return new IStatus[] { child };
- }
-
- /**
- * Returns the plug-in-specific status code describing the outcome.
- *
- * @return plug-in-specific status code
- */
- public int getCode() {
- return 0;
- }
-
- /**
- * Returns the relevant low-level exception, or <code>null</code> if none.
- * For example, when an operation fails because of a network communications
- * failure, this might return the <code>java.io.IOException</code>
- * describing the exact nature of that failure.
- *
- * @return the relevant low-level exception, or <code>null</code> if none
- */
- public Throwable getException() {
- return null;
- }
-
- /**
- * Returns the message describing the outcome.
- * The message is localized to the current locale.
- *
- * @return a localized message
- */
- public String getMessage() {
- return message;
- }
-
- /**
- * Returns the unique identifier of the plug-in associated with this status
- * (this is the plug-in that defines the meaning of the status code).
- *
- * @return the unique identifier of the relevant plug-in
- */
- public String getPlugin() {
- return pluginId;
- }
-
- /**
- * Returns the severity. The severities are as follows (in
- * descending order):
- * <ul>
- * <li><code>ERROR</code> - a serious error (most severe)</li>
- * <li><code>WARNING</code> - a warning (less severe)</li>
- * <li><code>INFO</code> - an informational ("fyi") message (least severe)</li>
- * <li><code>OK</code> - everything is just fine</li>
- * </ul>
- * <p>
- * The severity of a multi-status is defined to be the maximum
- * severity of any of its children, or <code>OK</code> if it has
- * no children.
- * </p>
- *
- * @return the severity: one of <code>OK</code>,
- * <code>ERROR</code>, <code>INFO</code>, or <code>WARNING</code>
- * @see #matches
- */
- public int getSeverity() {
- if (child == null)
- return IStatus.OK;
- return child.getSeverity();
- }
-
- /**
- * Returns whether this status is a multi-status.
- * A multi-status describes the outcome of an operation
- * involving multiple operands.
- * <p>
- * The severity of a multi-status is derived from the severities
- * of its children; a multi-status with no children is
- * <code>OK</code> by definition.
- * A multi-status carries a plug-in identifier, a status code,
- * a message, and an optional exception. Clients may treat
- * multi-status objects in a multi-status unaware way.
- * </p>
- *
- * @return <code>true</code> for a multi-status,
- * <code>false</code> otherwise
- * @see #getChildren
- */
- public boolean isMultiStatus() {
- return true;
- }
-
- /**
- * Returns whether this status indicates everything is okay
- * (neither info, warning, nor error).
- *
- * @return <code>true</code> if this status has severity
- * <code>OK</code>, and <code>false</code> otherwise
- */
- public boolean isOK() {
- return (getSeverity() == IStatus.OK);
- }
-
- /**
- * Returns whether the severity of this status matches the given
- * specification.
- *
- * @param severityMask a mask formed by bitwise or'ing severity mask
- * constants (<code>ERROR</code>, <code>WARNING</code>,
- * <code>INFO</code>)
- * @return <code>true</code> if there is at least one match,
- * <code>false</code> if there are no matches
- * @see #getSeverity
- * @see #ERROR
- * @see #WARNING
- * @see #INFO
- */
- public boolean matches(int severityMask) {
- return (getSeverity() & severityMask) != 0;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ResourceManager.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ResourceManager.java
deleted file mode 100644
index ef3829b..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ResourceManager.java
+++ /dev/null
@@ -1,1091 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal;
-
-import java.io.ByteArrayInputStream;
-import java.util.*;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.resources.*;
-
-import org.eclipse.wst.server.core.*;
-import org.eclipse.wst.server.core.model.*;
-/**
- * ResourceManager handles the mappings between resources
- * and servers or server configurations, and creates
- * notification of servers or server configurations
- * being added and removed.
- *
- * <p>Servers and server configurations may be a single
- * resource, or they may be a folder that contains a group
- * of files. Folder-resource may not contain other servers
- * or configurations.</p>
- */
-public class ResourceManager {
- private static final String SERVER_DATA_FILE = "servers.xml";
-
- private static final byte EVENT_ADDED = 0;
- private static final byte EVENT_CHANGED = 1;
- private static final byte EVENT_REMOVED = 2;
-
- private static ResourceManager instance;
-
- // currently active runtimes, servers, and server configurations
- protected List runtimes;
- protected List servers;
- protected List configurations;
- protected IRuntime defaultRuntime;
-
- // lifecycle listeners
- protected transient List runtimeListeners;
- protected transient List serverListeners;
- protected transient List serverConfigurationListeners;
-
- // resource change listeners
- private IResourceChangeListener modelResourceChangeListener;
- private IResourceChangeListener publishResourceChangeListener;
- private Preferences.IPropertyChangeListener pcl;
- protected boolean ignorePreferenceChanges = false;
-
- // module factory listener
- private IModuleFactoryListener moduleFactoryListener;
- protected List moduleFactoryEvents = new ArrayList(5);
-
- // module listener
- protected IModuleListener moduleListener;
- protected List moduleEvents = new ArrayList(5);
-
- // module events listeners
- protected transient List moduleEventListeners;
-
- /**
- * Resource listener - tracks changes on server resources so that
- * we can reload/drop server instances and configurations that
- * may change outside of our control.
- * Listens for two types of changes:
- * 1. Servers or configurations being added or removed
- * from their respective folders. (in the future, including
- * the addition or removal of a full server project, which
- * we currently can't listen for because there is no nature
- * attached to the project at this point - OTI defect)
- * 2. Projects being deleted.
- */
- public class ServerModelResourceChangeListener implements IResourceChangeListener {
- /**
- * Create a new ServerModelResourceChangeListener.
- */
- public ServerModelResourceChangeListener() {
- super();
- }
-
- /**
- * Listen for projects being added or removed and act accordingly.
- *
- * @param event org.eclipse.core.resources.IResourceChangeEvent
- */
- public void resourceChanged(IResourceChangeEvent event) {
- IResourceDelta delta = event.getDelta();
- if (delta == null)
- return;
-
- Trace.trace(Trace.RESOURCES, "->- ServerModelResourceManager responding to resource change: " + event.getType() + " ->-");
- IResourceDelta[] children = delta.getAffectedChildren();
- if (children != null) {
- int size = children.length;
- for (int i = 0; i < size; i++) {
- IResource resource = children[i].getResource();
- if (resource != null && resource instanceof IProject) {
- projectChanged((IProject) resource, children[i]);
- }
- }
- }
-
- Trace.trace(Trace.RESOURCES, "-<- Done ServerModelResourceManager responding to resource change -<-");
- }
-
- /**
- * React to a change within a possible server project.
- *
- * @param delta org.eclipse.core.resources.IResourceDelta
- */
- protected void projectChanged(IProject project, IResourceDelta delta) {
- if (!ServerCore.getProjectProperties(project).isServerProject()) {
- Trace.trace(Trace.RESOURCES, "Not a server project: " + project.getName());
- return;
- }
-
- IResourceDelta[] children = delta.getAffectedChildren();
-
- int size = children.length;
- for (int i = 0; i < size; i++) {
- IResourceDelta child = children[i];
-
- // look for servers and server configurations
- try {
- child.accept(new IResourceDeltaVisitor() {
- public boolean visit(IResourceDelta delta2) {
- return handleResourceDelta(delta2);
- }
- });
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error responding to resource change", e);
- }
- }
- }
- }
-
- /**
- * Publish resource listener
- */
- public class PublishResourceChangeListener implements IResourceChangeListener {
- /**
- * Create a new PublishResourceChangeListener.
- */
- public PublishResourceChangeListener() {
- super();
- }
-
- /**
- * Listen for projects being added or removed and act accordingly.
- *
- * @param event org.eclipse.core.resources.IResourceChangeEvent
- */
- public void resourceChanged(IResourceChangeEvent event) {
- IResourceDelta delta = event.getDelta();
- if (delta == null)
- return;
-
- Trace.trace(Trace.FINEST, "->- PublishResourceManager responding to resource change: " + event.getType() + " ->-");
- // search for changes to any project using a visitor
- try {
- delta.accept(new IResourceDeltaVisitor() {
- public boolean visit(IResourceDelta visitorDelta) {
- IResource resource = visitorDelta.getResource();
-
- // only respond to project changes
- if (resource != null && resource instanceof IProject) {
- publishHandleProjectChange(visitorDelta);
- return false;
- }
- return true;
- }
- });
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error responding to resource change", e);
- }
- Trace.trace(Trace.FINEST, "-<- Done PublishResourceManager responding to resource change -<-");
- }
- }
-
- public class ModuleFactoryListener implements IModuleFactoryListener {
- public void moduleFactoryChanged(IModuleFactoryEvent event) {
- Trace.trace(Trace.FINEST, "Module factory changed: " + event.getFactoryId());
- moduleFactoryEvents.add(event);
-
- // add new listeners
- IModule[] modules = event.getAddedModules();
- if (modules != null) {
- int size = modules.length;
- for (int i = 0; i < size; i++) {
- Trace.trace(Trace.FINEST, "Adding module listener to: " + modules[i]);
- modules[i].addModuleListener(moduleListener);
- }
- }
-
- // remove old listeners
- modules = event.getRemovedModules();
- if (modules != null) {
- int size = modules.length;
- for (int i = 0; i < size; i++) {
- Trace.trace(Trace.FINEST, "Removing module listener from: " + modules[i]);
- modules[i].removeModuleListener(moduleListener);
- }
- }
- }
- }
-
- public class ModuleListener implements IModuleListener {
- public void moduleChanged(IModuleEvent event) {
- Trace.trace(Trace.FINEST, "Module changed: " + event);
- if (!moduleEvents.contains(event))
- moduleEvents.add(event);
- }
- }
-
- protected List moduleServerEventHandlers;
- protected List moduleServerEventHandlerIndexes;
-
- /**
- * Cannot directly create a ResourceManager. Use
- * ServersCore.getResourceManager().
- */
- private ResourceManager() {
- super();
- instance = this;
-
- init();
- }
-
- protected void init() {
- servers = new ArrayList();
- configurations = new ArrayList();
- loadRuntimesList();
- loadServersList();
-
- pcl = new Preferences.IPropertyChangeListener() {
- public void propertyChange(Preferences.PropertyChangeEvent event) {
- if (ignorePreferenceChanges)
- return;
- String property = event.getProperty();
- if (property.equals("runtimes")) {
- loadRuntimesList();
- saveRuntimesList();
- }
- }
- };
-
- ServerPlugin.getInstance().getPluginPreferences().addPropertyChangeListener(pcl);
-
- resolveServers();
-
- // keep track of future changes to the file system
- modelResourceChangeListener = new ServerModelResourceChangeListener();
- ResourcesPlugin.getWorkspace().addResourceChangeListener(modelResourceChangeListener, IResourceChangeEvent.POST_CHANGE | IResourceChangeEvent.PRE_CLOSE | IResourceChangeEvent.PRE_DELETE);
-
- // add listener for future changes
- publishResourceChangeListener = new PublishResourceChangeListener();
- ResourcesPlugin.getWorkspace().addResourceChangeListener(publishResourceChangeListener, IResourceChangeEvent.POST_CHANGE | IResourceChangeEvent.PRE_DELETE);
-
- /*configurationListener = new IServerConfigurationListener() {
- public void childProjectChange(IServerConfiguration configuration) {
- handleConfigurationChildProjectsChange(configuration);
- }
- };*/
-
- Trace.trace(Trace.FINER, "Loading workspace servers and server configurations");
- IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- if (projects != null) {
- int size = projects.length;
- for (int i = 0; i < size; i++) {
- if (ServerCore.getProjectProperties(projects[i]).isServerProject())
- loadFromProject(projects[i]);
- }
- }
-
- moduleFactoryListener = new ModuleFactoryListener();
- moduleListener = new ModuleListener();
-
- addServerLifecycleListener(ServerListener.getInstance());
- }
-
- /**
- * Load all of the servers and server configurations from the given project.
- */
- protected static void loadFromProject(IProject project) {
- Trace.trace(Trace.FINER, "Initial server resource load for " + project.getName(), null);
- final ResourceManager rm = ResourceManager.getInstance();
-
- try {
- project.accept(new IResourceVisitor() {
- public boolean visit(IResource resource) {
- try {
- if (resource instanceof IFile) {
- IFile file = (IFile) resource;
- rm.handleNewFile(file, new NullProgressMonitor());
- return false;
- }
- return true;
- //return !rm.handleNewServerResource(resource, new NullProgressMonitor());
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error during initial server resource load", e);
- }
- return true;
- }
- });
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Could not load server project " + project.getName(), e);
- }
- }
-
- public static ResourceManager getInstance() {
- if (instance == null)
- new ResourceManager();
-
- return instance;
- }
-
- public static void shutdown() {
- if (instance == null)
- return;
-
- try {
- instance.shutdownImpl();
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error during shutdown", e);
- }
- }
-
- protected void shutdownImpl() {
- // stop all running servers
- // REMOVING FEATURE - can't be supported since we can't reload downstream plugins
- // during shutdown. Individual downstream plugins should contain their own similar
- // code to stop the servers.
- /*Iterator iterator = getServers().iterator();
- while (iterator.hasNext()) {
- IServer server = (IServer) iterator.next();
- try {
- if (server.getServerState() != IServer.STATE_STOPPED) {
- ServerDelegate delegate = server.getDelegate();
- if (delegate instanceof IStartableServer && ((IStartableServer)delegate).isTerminateOnShutdown())
- ((IStartableServer) delegate).terminate();
- }
- } catch (Exception e) { }
- }*/
-
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- if (workspace != null) {
- workspace.removeResourceChangeListener(modelResourceChangeListener);
- workspace.removeResourceChangeListener(publishResourceChangeListener);
- }
-
- ServerPlugin.getInstance().getPluginPreferences().removePropertyChangeListener(pcl);
-
- removeServerLifecycleListener(ServerListener.getInstance());
- }
-
- /*
- *
- */
- public void addRuntimeLifecycleListener(IRuntimeLifecycleListener listener) {
- Trace.trace(Trace.LISTENERS, "Adding server resource listener " + listener + " to " + this);
-
- if (runtimeListeners == null)
- runtimeListeners = new ArrayList(3);
- runtimeListeners.add(listener);
- }
-
- /*
- *
- */
- public void removeRuntimeLifecycleListener(IRuntimeLifecycleListener listener) {
- Trace.trace(Trace.LISTENERS, "Removing server resource listener " + listener + " from " + this);
-
- if (runtimeListeners != null)
- runtimeListeners.remove(listener);
- }
-
- /*
- *
- */
- public void addServerLifecycleListener(IServerLifecycleListener listener) {
- Trace.trace(Trace.LISTENERS, "Adding server resource listener " + listener + " to " + this);
-
- if (serverListeners == null)
- serverListeners = new ArrayList(3);
- serverListeners.add(listener);
- }
-
- /*
- *
- */
- public void removeServerLifecycleListener(IServerLifecycleListener listener) {
- Trace.trace(Trace.LISTENERS, "Removing server resource listener " + listener + " from " + this);
-
- if (serverListeners != null)
- serverListeners.remove(listener);
- }
-
- /**
- * Deregister an existing runtime.
- *
- * @param resource org.eclipse.core.resources.IResource
- */
- protected void deregisterRuntime(IRuntime runtime) {
- if (runtime == null)
- return;
-
- Trace.trace(Trace.RESOURCES, "Deregistering runtime: " + runtime.getName());
-
- ((Runtime)runtime).dispose();
- fireRuntimeEvent(runtime, EVENT_REMOVED);
- runtimes.remove(runtime);
- }
-
- /**
- * Deregister an existing server resource.
- *
- * @param resource org.eclipse.core.resources.IResource
- */
- protected void deregisterServer(IServer server) {
- if (server == null)
- return;
-
- Trace.trace(Trace.RESOURCES, "Deregistering server: " + server.getName());
-
- ((Server) server).deleteLaunchConfigurations();
- ServerPlugin.getInstance().removeTempDirectory(server.getId(), new NullProgressMonitor());
-
- ((Server)server).dispose();
- fireServerEvent(server, EVENT_REMOVED);
- servers.remove(server);
- }
-
- /**
- * Fire a runtime event.
- */
- private void fireRuntimeEvent(final IRuntime runtime, byte b) {
- Trace.trace(Trace.LISTENERS, "->- Firing runtime event: " + runtime.getName() + " ->-");
-
- if (runtimeListeners == null || runtimeListeners.isEmpty())
- return;
-
- int size = runtimeListeners.size();
- IRuntimeLifecycleListener[] srl = new IRuntimeLifecycleListener[size];
- runtimeListeners.toArray(srl);
-
- for (int i = 0; i < size; i++) {
- Trace.trace(Trace.LISTENERS, " Firing runtime event to " + srl[i]);
- try {
- if (b == EVENT_ADDED)
- srl[i].runtimeAdded(runtime);
- else if (b == EVENT_CHANGED)
- srl[i].runtimeChanged(runtime);
- else
- srl[i].runtimeRemoved(runtime);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, " Error firing runtime event to " + srl[i], e);
- }
- }
- Trace.trace(Trace.LISTENERS, "-<- Done firing runtime event -<-");
- }
-
- /**
- * Fire a server event.
- */
- private void fireServerEvent(final IServer server, byte b) {
- Trace.trace(Trace.LISTENERS, "->- Firing server event: " + server.getName() + " ->-");
-
- if (serverListeners == null || serverListeners.isEmpty())
- return;
-
- int size = serverListeners.size();
- IServerLifecycleListener[] srl = new IServerLifecycleListener[size];
- serverListeners.toArray(srl);
-
- for (int i = 0; i < size; i++) {
- Trace.trace(Trace.LISTENERS, " Firing server event to " + srl[i]);
- try {
- if (b == EVENT_ADDED)
- srl[i].serverAdded(server);
- else if (b == EVENT_CHANGED)
- srl[i].serverChanged(server);
- else
- srl[i].serverRemoved(server);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, " Error firing server event to " + srl[i], e);
- }
- }
- Trace.trace(Trace.LISTENERS, "-<- Done firing server event -<-");
- }
-
- protected void saveRuntimesList() {
- try {
- ignorePreferenceChanges = true;
- XMLMemento memento = XMLMemento.createWriteRoot("runtimes");
-
- if (defaultRuntime != null) {
- int ind = runtimes.indexOf(defaultRuntime);
- if (ind >= 0)
- memento.putString("default", ind + "");
- }
-
- Iterator iterator = runtimes.iterator();
- while (iterator.hasNext()) {
- Runtime runtime = (Runtime) iterator.next();
-
- IMemento child = memento.createChild("runtime");
- runtime.save(child);
- }
-
- String xmlString = memento.saveToString();
- Preferences prefs = ServerPlugin.getInstance().getPluginPreferences();
- prefs.setValue("runtimes", xmlString);
- ServerPlugin.getInstance().savePluginPreferences();
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Could not save runtimes", e);
- }
- ignorePreferenceChanges = false;
- }
-
- protected void saveServersList() {
- String filename = ServerPlugin.getInstance().getStateLocation().append(SERVER_DATA_FILE).toOSString();
-
- try {
- XMLMemento memento = XMLMemento.createWriteRoot("servers");
-
- Iterator iterator = servers.iterator();
- while (iterator.hasNext()) {
- Server server = (Server) iterator.next();
-
- IMemento child = memento.createChild("server");
- server.save(child);
- }
-
- memento.saveToFile(filename);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Could not save servers", e);
- }
- }
-
- protected void loadRuntimesList() {
- Trace.trace(Trace.FINEST, "Loading runtime info");
- Preferences prefs = ServerPlugin.getInstance().getPluginPreferences();
- String xmlString = prefs.getString("runtimes");
-
- runtimes = new ArrayList();
- if (xmlString != null && xmlString.length() > 0) {
- try {
- ByteArrayInputStream in = new ByteArrayInputStream(xmlString.getBytes());
- IMemento memento = XMLMemento.loadMemento(in);
-
- IMemento[] children = memento.getChildren("runtime");
- int size = children.length;
-
- for (int i = 0; i < size; i++) {
- Runtime runtime = new Runtime(null);
- runtime.loadFromMemento(children[i], new NullProgressMonitor());
- runtimes.add(runtime);
- }
-
- String s = memento.getString("default");
- try {
- int ind = Integer.parseInt(s);
- defaultRuntime = (IRuntime) runtimes.get(ind);
- } catch (Exception ex) {
- // ignore
- }
- } catch (Exception e) {
- Trace.trace(Trace.WARNING, "Could not load runtimes: " + e.getMessage());
- }
- }
- }
-
- protected void loadServersList() {
- Trace.trace(Trace.FINEST, "Loading server info");
- String filename = ServerPlugin.getInstance().getStateLocation().append(SERVER_DATA_FILE).toOSString();
-
- try {
- IMemento memento = XMLMemento.loadMemento(filename);
-
- IMemento[] children = memento.getChildren("server");
- int size = children.length;
-
- for (int i = 0; i < size; i++) {
- Server server = new Server(null);
- server.loadFromMemento(children[i], new NullProgressMonitor());
- servers.add(server);
- }
- } catch (Exception e) {
- Trace.trace(Trace.WARNING, "Could not load servers: " + e.getMessage());
- }
- }
-
- protected void addRuntime(IRuntime runtime) {
- if (runtime == null)
- return;
- if (!runtimes.contains(runtime))
- registerRuntime(runtime);
- else
- fireRuntimeEvent(runtime, EVENT_CHANGED);
- saveRuntimesList();
- resolveServers();
- RuntimeWorkingCopy.rebuildRuntime(runtime, true);
- }
-
- protected void removeRuntime(IRuntime runtime) {
- if (runtimes.contains(runtime)) {
- deregisterRuntime(runtime);
- saveRuntimesList();
- resolveServers();
- RuntimeWorkingCopy.rebuildRuntime(runtime, false);
- }
- }
-
- protected void addServer(IServer server) {
- if (!servers.contains(server))
- registerServer(server);
- else
- fireServerEvent(server, EVENT_CHANGED);
- saveServersList();
- resolveServers();
- }
-
- protected void removeServer(IServer server) {
- if (servers.contains(server)) {
- deregisterServer(server);
- saveServersList();
- resolveServers();
- }
- }
-
- /**
- * Returns an array of all runtimes.
- *
- * @return
- */
- public IRuntime[] getRuntimes() {
- List list = new ArrayList(runtimes);
-
- int size = list.size();
- for (int i = 0; i < size - 1; i++) {
- for (int j = i + 1; j < size; j++) {
- IRuntime a = (IRuntime) list.get(i);
- IRuntime b = (IRuntime) list.get(j);
- if (a.getRuntimeType() != null && b.getRuntimeType() != null &&
- ((RuntimeType)a.getRuntimeType()).getOrder() < ((RuntimeType)b.getRuntimeType()).getOrder()) {
- Object temp = a;
- list.set(i, b);
- list.set(j, temp);
- }
- }
- }
-
- if (defaultRuntime != null) {
- list.remove(defaultRuntime);
- list.add(0, defaultRuntime);
- }
-
- IRuntime[] r = new IRuntime[list.size()];
- list.toArray(r);
- return r;
- }
-
- /**
- * Returns the runtime with the given id.
- *
- * @return IRuntime
- */
- public IRuntime getRuntime(String id) {
- if (id == null)
- throw new IllegalArgumentException();
-
- Iterator iterator = runtimes.iterator();
- while (iterator.hasNext()) {
- IRuntime runtime = (IRuntime) iterator.next();
- if (runtime.getId().equals(id))
- return runtime;
- }
- return null;
- }
-
- /**
- * Returns the default runtime. Test API - do not use.
- *
- * @return java.util.List
- */
- public IRuntime getDefaultRuntime() {
- return defaultRuntime;
- }
-
- /**
- * Sets the default runtime. Test API - do not use.
- *
- * @return java.util.List
- */
- public void setDefaultRuntime(IRuntime runtime) {
- defaultRuntime = runtime;
- saveRuntimesList();
- }
-
- protected void resolveServers() {
- Iterator iterator = servers.iterator();
- while (iterator.hasNext()) {
- Server server = (Server) iterator.next();
- server.resolve();
- }
- }
-
- /**
- * Returns an array of all servers.
- *
- * @return
- */
- public IServer[] getServers() {
- List list = new ArrayList(servers);
- List list2 = ServerPlugin.sortServerList(list);
-
- IServer[] s = new IServer[list2.size()];
- list2.toArray(s);
- return s;
- }
-
- /**
- * Returns the server with the given id.
- *
- * @return
- */
- public IServer getServer(String id) {
- if (id == null)
- throw new IllegalArgumentException();
-
- Iterator iterator = servers.iterator();
- while (iterator.hasNext()) {
- Server server = (Server) iterator.next();
- if (id.equals(server.getId()))
- return server;
- }
- return null;
- }
-
- /**
- * Returns true if the resource change was handled.
- *
- * @param delta org.eclipse.core.resources.IResourceDelta
- * @return boolean
- */
- protected boolean handleResourceDelta(IResourceDelta delta) {
- int kind = delta.getKind();
- IResource resource2 = delta.getResource();
-
- // ignore markers
- if (kind == IResourceDelta.CHANGED && (delta.getFlags() & IResourceDelta.MARKERS) != 0)
- return false;
-
- Trace.trace(Trace.RESOURCES, "Resource changed: " + resource2 + " " + kind);
-
- if (resource2 instanceof IFile) {
- IFile file = (IFile) resource2;
- IProgressMonitor monitor = new NullProgressMonitor();
- if (kind == IResourceDelta.ADDED) {
- handleNewFile(file, monitor);
- } else if (kind == IResourceDelta.REMOVED) {
- handleRemovedFile(file);
- } else
- handleChangedFile(file, monitor);
- monitor.done();
- return false;
- }
- return true;
-
- /*IProgressMonitor monitor = new NullProgressMonitor();
- List list = getResourceParentList(resource2);
- monitor.beginTask("", list.size() * 1000);
-
- Iterator iterator = list.iterator();
- while (iterator.hasNext()) {
- IResource resource = (IResource) iterator.next();
- if (!visited.contains(resource.getFullPath())) {
- visited.add(resource.getFullPath());
- if (kind == IResourceDelta.REMOVED) {
- boolean b = handleRemovedFile(resource);
- if (b) {
- if (resource instanceof IContainer)
- removeServerResourcesBelow((IContainer) resource);
- return false;
- } else
- return true;
- } else if (kind == IResourceDelta.ADDED) {
- return !handleNewServerResource(resource, monitor);
- } else {
- boolean b = handleChangedServerResource(resource, monitor);
- if (!b) {
- handleRemovedFile(resource);
- }
- return true;
- }
- }
- }
-
- monitor.done();
- Trace.trace(Trace.RESOURCES, "Ignored resource change: " + resource2);
- return true;*/
- }
-
- protected IServer loadServer(IFile file, IProgressMonitor monitor) throws CoreException {
- Server server = new Server(file);
- server.loadFromFile(monitor);
- return server;
- }
-
- /**
- * Tries to load a new server resource from the given resource.
- * Returns true if the load and register were successful.
- *
- * @param resource org.eclipse.core.resources.IResource
- * @return boolean
- */
- protected boolean handleNewFile(IFile file, IProgressMonitor monitor) {
- Trace.trace(Trace.RESOURCES, "handleNewFile: " + file);
- monitor = ProgressUtil.getMonitorFor(monitor);
- monitor.beginTask("", 2000);
-
- // try loading a server
- if (file.getFileExtension().equals(IServer.FILE_EXTENSION)) {
- try {
- IServer server = loadServer(file, ProgressUtil.getSubMonitorFor(monitor, 1000));
- if (server != null) {
- registerServer(server);
- monitor.done();
- return true;
- }
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error loading server", e);
- }
- }
-
- monitor.done();
- return false;
- }
-
- /**
- * Tries to handle a resource change. Returns true if the reload
- * was successful.
- *
- * @param resource org.eclipse.core.resources.IResource
- * @return boolean
- */
- protected boolean handleChangedFile(IFile file, IProgressMonitor monitor) {
- Trace.trace(Trace.RESOURCES, "handleChangedFile: " + file);
- monitor = ProgressUtil.getMonitorFor(monitor);
- monitor.beginTask("", 1000);
- boolean found = false;
-
- IServer server = ServerUtil.findServer(file);
- if (server != null) {
- found = true;
- try {
- Trace.trace(Trace.RESOURCES, "Reloading server: " + server);
- ((Server) server).loadFromFile(monitor);
- fireServerEvent(server, EVENT_CHANGED);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error reloading server " + server.getName() + " from " + file + ": " + e.getMessage());
- deregisterServer(server);
- }
- }
-
- Trace.trace(Trace.RESOURCES, "No server resource found at: " + file);
-
- monitor.done();
- return found;
- }
-
- /**
- * Tries to remove a current resource. Returns true if the
- * deregistering was successful.
- *
- * @param resource org.eclipse.core.resources.IResource
- * @return boolean
- */
- protected boolean handleRemovedFile(IFile file) {
- Trace.trace(Trace.RESOURCES, "handleRemovedServerResource: " + file);
-
- IServer server = ServerUtil.findServer(file);
- if (server != null) {
- deregisterServer(server);
- return true;
- }
-
- Trace.trace(Trace.RESOURCES, "No server resource found at: " + file);
- return false;
- }
-
- /**
- * A project has changed. If this is an add or remove, check
- * to see if it is part of a current server configuration.
- *
- * @param delta org.eclipse.core.resources.IResourceDelta
- */
- protected void publishHandleProjectChange(IResourceDelta delta) {
- Trace.trace(Trace.FINEST, "> publishHandleProjectChange " + delta.getResource());
- IProject project = (IProject) delta.getResource();
-
- if (project == null)
- return;
-
- if (isDeltaOnlyMarkers(delta))
- return;
-
- final IModule[] moduleProject = ServerUtil.getModules(project);
- if (moduleProject == null)
- return;
-
- Trace.trace(Trace.FINEST, "- publishHandleProjectChange");
-
- if (moduleProject != null) {
- int size2 = moduleProject.length;
- for (int j = 0; j < size2; j++) {
- IServer[] servers2 = getServers();
- if (servers2 != null) {
- int size = servers2.length;
- for (int i = 0; i < size; i++) {
- if (servers2[i].isDelegateLoaded())
- ((Server) servers2[i]).handleModuleProjectChange(delta, new IModule[] { moduleProject[j] });
- }
- }
- }
- }
- Trace.trace(Trace.FINEST, "< publishHandleProjectChange");
- }
-
- protected boolean isDeltaOnlyMarkers(IResourceDelta delta) {
- class Temp {
- boolean b = true;
- }
- final Temp t = new Temp();
- try {
- delta.accept(new IResourceDeltaVisitor() {
- public boolean visit(IResourceDelta delta2) throws CoreException {
- if (!t.b)
- return false;
- int flags = delta2.getFlags();
- if (flags != 0 && flags != IResourceDelta.MARKERS) {
- t.b = false;
- return false;
- }
- return true;
- }
- });
- } catch (Exception e) {
- // ignore
- }
- return t.b;
- }
-
- /**
- * Registers a new runtime.
- *
- * @param resource org.eclipse.core.resources.IResource
- * @param element org.eclipse.wst.server.core.model.IServerResource
- */
- protected void registerRuntime(IRuntime runtime) {
- if (runtime == null)
- return;
-
- Trace.trace(Trace.RESOURCES, "Registering runtime: " + runtime.getName());
-
- runtimes.add(runtime);
- fireRuntimeEvent(runtime, EVENT_ADDED);
- }
-
- /**
- * Registers a new server.
- *
- * @param resource org.eclipse.core.resources.IResource
- * @param element org.eclipse.wst.server.core.model.IServerResource
- */
- protected void registerServer(IServer server) {
- if (server == null)
- return;
-
- Trace.trace(Trace.RESOURCES, "Registering server: " + server.getName());
-
- servers.add(server);
- fireServerEvent(server, EVENT_ADDED);
- }
-
- /**
- *
- */
- protected void addModuleFactoryListener(ModuleFactoryDelegate delegate) {
- if (delegate == null)
- return;
-
- Trace.trace(Trace.LISTENERS, "Adding module factory listener to: " + delegate);
- delegate.addModuleFactoryListener(moduleFactoryListener);
-
- IModule[] modules = delegate.getModules();
- if (modules != null) {
- int size = modules.length;
- for (int i = 0; i < size; i++) {
- Trace.trace(Trace.LISTENERS, "Adding module listener to: " + modules[i]);
- modules[i].addModuleListener(moduleListener);
- }
- }
- }
-
- /**
- * Adds a new module events listener.
- *
- * @param listener org.eclipse.wst.server.core.model.IModuleEventsListener
- */
- public void addModuleEventsListener(IModuleEventsListener listener) {
- Trace.trace(Trace.LISTENERS, "Adding moduleEvents listener " + listener + " to " + this);
-
- if (moduleEventListeners == null)
- moduleEventListeners = new ArrayList();
- moduleEventListeners.add(listener);
- }
-
- /**
- * Removes an existing module events listener.
- *
- * @param listener org.eclipse.wst.server.core.model.IModuleEventsListener
- */
- public void removeModuleEventsListener(IModuleEventsListener listener) {
- Trace.trace(Trace.LISTENERS, "Removing moduleEvents listener " + listener + " to " + this);
-
- if (moduleEventListeners != null)
- moduleEventListeners.remove(listener);
- }
-
- /**
- * Module events have momentarily stopped firing and should be
- * handled appropriately.
- */
- public void syncModuleEvents() {
- if (moduleEvents.isEmpty() && moduleFactoryEvents.isEmpty())
- return;
-
- Trace.trace(Trace.LISTENERS, "->- Firing moduleEvents " + moduleEvents.size() + " " + moduleFactoryEvents.size());
- Iterator iterator = moduleEvents.iterator();
- while (iterator.hasNext()) {
- IModuleEvent event = (IModuleEvent) iterator.next();
- Trace.trace(Trace.LISTENERS, " 1> " + event);
- }
- iterator = moduleFactoryEvents.iterator();
- while (iterator.hasNext()) {
- IModuleFactoryEvent event = (IModuleFactoryEvent) iterator.next();
- Trace.trace(Trace.LISTENERS, " 2> " + event);
- }
-
- IModuleEvent[] events = new IModuleEvent[moduleEvents.size()];
- moduleEvents.toArray(events);
-
- IModuleFactoryEvent[] factoryEvents = new IModuleFactoryEvent[moduleFactoryEvents.size()];
- moduleFactoryEvents.toArray(factoryEvents);
-
- if (moduleEventListeners != null) {
- iterator = moduleEventListeners.iterator();
- while (iterator.hasNext()) {
- IModuleEventsListener listener = (IModuleEventsListener) iterator.next();
- try {
- Trace.trace(Trace.LISTENERS, " Firing moduleEvents to " + listener);
- listener.moduleEvents(factoryEvents, events);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, " Error firing moduleEvents to " + listener);
- }
- }
- }
-
- // fire module server events
- fireModuleServerEvent(factoryEvents, events);
-
- // clear cache
- moduleEvents = new ArrayList(5);
- moduleFactoryEvents = new ArrayList(5);
-
- Trace.trace(Trace.LISTENERS, "-<- Firing moduleEvents " + moduleEvents.size() + " " + moduleFactoryEvents.size());
- }
-
- protected void fireModuleServerEvent(IModuleFactoryEvent[] factoryEvents, IModuleEvent[] events) {
- // do nothing
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/Runtime.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/Runtime.java
deleted file mode 100644
index 2511ddd..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/Runtime.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.*;
-import org.eclipse.wst.server.core.*;
-import org.eclipse.wst.server.core.model.RuntimeDelegate;
-import org.osgi.framework.Bundle;
-/**
- *
- */
-public class Runtime extends Base implements IRuntime {
- protected static final String PROP_RUNTIME_TYPE_ID = "runtime-type-id";
- protected static final String PROP_LOCATION = "location";
- protected static final String PROP_TEST_ENVIRONMENT = "test-environment";
- protected static final String PROP_STUB = "stub";
-
- protected IRuntimeType runtimeType;
- protected RuntimeDelegate delegate;
-
- public Runtime(IFile file) {
- super(file);
- }
-
- public Runtime(IFile file, String id, IRuntimeType runtimeType) {
- super(file, id);
- this.runtimeType = runtimeType;
- map.put(PROP_NAME, runtimeType.getName());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.IRuntime#getRuntimeType()
- */
- public IRuntimeType getRuntimeType() {
- return runtimeType;
- }
-
- /**
- * Return the validation status of the runtime.
- *
- * @return
- */
- public IStatus validate(IProgressMonitor monitor) {
- try {
- return getDelegate(monitor).validate();
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error calling delegate validate() " + toString(), e);
- return null;
- }
- }
-
- public RuntimeDelegate getDelegate(IProgressMonitor monitor) {
- if (delegate != null)
- return delegate;
-
- synchronized (this) {
- if (delegate == null) {
- try {
- long time = System.currentTimeMillis();
- RuntimeType runtimeType2 = (RuntimeType) runtimeType;
- delegate = (RuntimeDelegate) runtimeType2.getElement().createExecutableExtension("class");
- delegate.initialize(this);
- Trace.trace(Trace.PERFORMANCE, "Runtime.getDelegate(): <" + (System.currentTimeMillis() - time) + "> " + getRuntimeType().getId());
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Could not create delegate " + toString(), e);
- }
- }
- }
- return delegate;
- }
-
- /**
- * Returns true if the delegate has been loaded.
- *
- * @return
- */
- public boolean isDelegateLoaded() {
- return delegate != null;
- }
-
- public void dispose() {
- if (delegate != null)
- delegate.dispose();
- }
-
- public IRuntimeWorkingCopy createWorkingCopy() {
- return new RuntimeWorkingCopy(this);
- }
-
- public boolean isWorkingCopy() {
- return false;
- }
-
- public boolean isDelegatePluginActivated() {
- IConfigurationElement element = ((RuntimeType) runtimeType).getElement();
- String pluginId = element.getDeclaringExtension().getNamespace();
- return Platform.getBundle(pluginId).getState() == Bundle.ACTIVE;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.IRuntime#getLocation()
- */
- public IPath getLocation() {
- String temp = getAttribute(PROP_LOCATION, (String)null);
- if (temp == null)
- return null;
- return new Path(temp);
- }
-
- protected void deleteFromMetadata() {
- ResourceManager.getInstance().removeRuntime(this);
- }
-
- protected void saveToMetadata(IProgressMonitor monitor) {
- super.saveToMetadata(monitor);
- ResourceManager.getInstance().addRuntime(this);
- }
-
- protected String getXMLRoot() {
- return "runtime";
- }
-
- public boolean isTestEnvironment() {
- return getAttribute(PROP_TEST_ENVIRONMENT, false);
- }
-
- public boolean isStub() {
- return getAttribute(PROP_STUB, false);
- }
-
- protected void setInternal(RuntimeWorkingCopy wc) {
- map = wc.map;
- runtimeType = wc.runtimeType;
- file = wc.file;
- delegate = wc.delegate;
-
- int timestamp = wc.getTimestamp();
- map.put("timestamp", Integer.toString(timestamp+1));
- }
-
- protected void loadState(IMemento memento) {
- String runtimeTypeId = memento.getString(PROP_RUNTIME_TYPE_ID);
- if (runtimeTypeId != null)
- runtimeType = ServerCore.findRuntimeType(runtimeTypeId);
- else
- runtimeType = null;
- }
-
- protected void saveState(IMemento memento) {
- if (runtimeType != null)
- memento.putString(PROP_RUNTIME_TYPE_ID, runtimeType.getId());
- }
-
- public boolean equals(Object obj) {
- if (!(obj instanceof Runtime))
- return false;
-
- Runtime runtime = (Runtime) obj;
- return runtime.getId().equals(getId());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- RuntimeDelegate delegate2 = getDelegate(null);
- if (adapter.isInstance(delegate2))
- return delegate;
- return null;
- }
-
- public String toString() {
- return "Runtime[" + getId() + ", " + getName() + ", " + getLocation() + ", " + getRuntimeType() + "]";
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/RuntimeLocator.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/RuntimeLocator.java
deleted file mode 100644
index 44d702b..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/RuntimeLocator.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.wst.server.core.IRuntimeLocator;
-import org.eclipse.wst.server.core.model.RuntimeLocatorDelegate;
-/**
- *
- */
-public class RuntimeLocator implements IRuntimeLocator {
- private IConfigurationElement element;
- private RuntimeLocatorDelegate delegate;
-
- public RuntimeLocator(IConfigurationElement element) {
- super();
- this.element = element;
- }
-
- protected IConfigurationElement getElement() {
- return element;
- }
-
- /*
- * @see IRuntimeLocator#getId()
- */
- public String getId() {
- return element.getAttribute("id");
- }
-
- /*
- * @see IRuntimeLocator#getName()
- */
- public String getName() {
- return element.getAttribute("name");
- }
-
- /*
- * @see IRuntimeLocator#getDescription()
- */
- public String getDescription() {
- return element.getAttribute("description");
- }
-
- /*
- * @see IRuntimeLocator
- */
- protected String[] getTypeIds() {
- try {
- return ServerPlugin.tokenize(element.getAttribute("typeIds"), ",");
- } catch (Exception e) {
- return null;
- }
- }
-
- /*
- * @see IRuntimeLocator
- */
- public boolean supportsType(String id) {
- return ServerPlugin.supportsType(getTypeIds(), id);
- }
-
- protected RuntimeLocatorDelegate getDelegate() {
- if (delegate == null) {
- try {
- delegate = (RuntimeLocatorDelegate) element.createExecutableExtension("class");
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Could not create delegate " + toString() + ": " + e.getMessage());
- }
- }
- return delegate;
- }
-
- /*
- * @see IRuntimeLocator#searchForRuntimes()
- */
- public void searchForRuntimes(IPath path, RuntimeSearchListener found, IProgressMonitor monitor) {
- try {
- getDelegate().searchForRuntimes(path, found, monitor);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error calling delegate " + toString() + ": " + e.getMessage());
- }
- }
-
- public String toString() {
- return "RuntimeLocator[" + getId() + ", " + getName() + "]";
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/RuntimeTargetHandler.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/RuntimeTargetHandler.java
deleted file mode 100644
index 503d9b1..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/RuntimeTargetHandler.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.wst.server.core.*;
-import org.eclipse.wst.server.core.model.RuntimeTargetHandlerDelegate;
-/**
- *
- */
-public class RuntimeTargetHandler implements IRuntimeTargetHandler, IOrdered {
- private IConfigurationElement element;
- private RuntimeTargetHandlerDelegate delegate;
-
- public RuntimeTargetHandler(IConfigurationElement element) {
- super();
- this.element = element;
- }
-
- protected IConfigurationElement getElement() {
- return element;
- }
-
- /**
- *
- * @return
- */
- public String getId() {
- return element.getAttribute("id");
- }
-
- /**
- * Returns the order.
- *
- * @return int
- */
- public int getOrder() {
- try {
- String o = element.getAttribute("order");
- return Integer.parseInt(o);
- } catch (NumberFormatException e) {
- return -1;
- }
- }
-
- public String[] getRuntimeTypeIds() {
- try {
- List list = new ArrayList();
- StringTokenizer st = new StringTokenizer(element.getAttribute("runtimeTypeIds"), ",");
- while (st.hasMoreTokens()) {
- String str = st.nextToken();
- if (str != null && str.length() > 0)
- list.add(str.trim());
- }
- String[] s = new String[list.size()];
- list.toArray(s);
- return s;
- } catch (Exception e) {
- Trace.trace("Could not parse runtime type ids: " + element);
- return null;
- }
- }
-
- /**
- * Returns true if the given server resource type (given by the
- * id) can be opened with this editor. This result is based on
- * the result of the getServerResources() method.
- *
- * @return boolean
- */
- public boolean supportsRuntimeType(IRuntimeType runtimeType) {
- if (runtimeType == null)
- return false;
- String id = runtimeType.getId();
- if (id == null || id.length() == 0)
- return false;
-
- String[] s = getRuntimeTypeIds();
- if (s == null)
- return false;
-
- int size = s.length;
- for (int i = 0; i < size; i++) {
- if (s[i].endsWith("*")) {
- if (id.length() >= s[i].length() && id.startsWith(s[i].substring(0, s[i].length() - 1)))
- return true;
- } else if (id.equals(s[i]))
- return true;
- }
- return false;
- }
-
- /*
- * @see IPublishManager#getDelegate()
- */
- public RuntimeTargetHandlerDelegate getDelegate() {
- if (delegate == null) {
- try {
- delegate = (RuntimeTargetHandlerDelegate) element.createExecutableExtension("class");
- delegate.initialize(this);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Could not create delegate " + toString() + ": " + e.getMessage());
- }
- }
- return delegate;
- }
-
- /**
- *
- */
- public void setRuntimeTarget(IProject project, IRuntime runtime, IProgressMonitor monitor) {
- try {
- getDelegate().setRuntimeTarget(project, runtime, monitor);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error calling delegate " + toString() + ": " + e.getMessage());
- }
- }
-
- /**
- *
- */
- public void removeRuntimeTarget(IProject project, IRuntime runtime, IProgressMonitor monitor) {
- try {
- getDelegate().removeRuntimeTarget(project, runtime, monitor);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error calling delegate " + toString() + ": " + e.getMessage());
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- RuntimeTargetHandlerDelegate delegate2 = getDelegate();
- if (adapter.isInstance(delegate2))
- return delegate;
- return null;
- }
-
- public String toString() {
- return "RuntimeTargetHandler[" + getId() + "]";
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/RuntimeType.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/RuntimeType.java
deleted file mode 100644
index 0855f4a..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/RuntimeType.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal;
-
-import java.util.List;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.wst.server.core.*;
-/**
- *
- */
-public class RuntimeType implements IRuntimeType, IOrdered {
- private IConfigurationElement element;
- private List moduleTypes;
-
- public RuntimeType(IConfigurationElement element) {
- super();
- this.element = element;
- }
-
- protected IConfigurationElement getElement() {
- return element;
- }
-
- /**
- *
- * @return
- */
- public String getId() {
- return element.getAttribute("id");
- }
-
- /**
- *
- * @return
- */
- public String getName() {
- return element.getAttribute("name");
- }
-
- /**
- *
- * @return
- */
- public String getDescription() {
- return element.getAttribute("description");
- }
-
- /**
- * Returns the order.
- *
- * @return int
- */
- public int getOrder() {
- try {
- String o = element.getAttribute("order");
- return Integer.parseInt(o);
- } catch (NumberFormatException e) {
- return -1;
- }
- }
-
- public String getVendor() {
- String vendor = element.getAttribute("vendor");
- if (vendor == null)
- return ServerPlugin.getResource("%defaultVendor");
- return vendor;
- }
-
- public String getVersion() {
- String version = element.getAttribute("version");
- if (version == null)
- return ServerPlugin.getResource("%defaultVersion");
- return version;
- }
-
- /**
- *
- * @return
- */
- public IModuleType[] getModuleTypes() {
- if (moduleTypes == null)
- moduleTypes = ServerPlugin.getModuleTypes(element.getChildren("moduleType"));
-
- IModuleType[] mt = new IModuleType[moduleTypes.size()];
- moduleTypes.toArray(mt);
- return mt;
- }
-
- public boolean canCreate() {
- String a = element.getAttribute("class");
- return a != null && a.length() > 0;
- }
-
- public IRuntimeWorkingCopy createRuntime(String id, IProgressMonitor monitor) {
- RuntimeWorkingCopy rwc = new RuntimeWorkingCopy(null, id, this);
- rwc.setDefaults(monitor);
- return rwc;
- }
-
- public String toString() {
- return "RuntimeType[" + getId() + ", " + getName() + "]";
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/RuntimeWorkingCopy.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/RuntimeWorkingCopy.java
deleted file mode 100644
index a37d05f..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/RuntimeWorkingCopy.java
+++ /dev/null
@@ -1,304 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal;
-
-import java.beans.PropertyChangeListener;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IncrementalProjectBuilder;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.wst.server.core.*;
-import org.eclipse.wst.server.core.model.RuntimeDelegate;
-/**
- *
- */
-public class RuntimeWorkingCopy extends Runtime implements IRuntimeWorkingCopy {
- protected String PROP_ID_SET = "id-set";
- protected Runtime runtime;
- protected WorkingCopyHelper wch;
-
- protected RuntimeDelegate workingCopyDelegate;
-
- // from existing runtime
- public RuntimeWorkingCopy(Runtime runtime) {
- super(runtime.getFile());
- this.runtime = runtime;
-
- runtimeType = runtime.getRuntimeType();
-
- map = new HashMap(runtime.map);
- wch = new WorkingCopyHelper(this);
- }
-
- // new runtime
- public RuntimeWorkingCopy(IFile file, String id, IRuntimeType runtimeType) {
- super(file, id, runtimeType);
- wch = new WorkingCopyHelper(this);
- wch.setDirty(true);
-
- if (id == null || id.length() == 0) {
- id = ServerPlugin.generateId();
- map.put(PROP_ID, id);
- } else
- setAttribute(PROP_ID_SET, true);
-
- // throw CoreException if the id already exists
- }
-
- public boolean isWorkingCopy() {
- return true;
- }
-
- public IRuntimeWorkingCopy createWorkingCopy() {
- return this;
- }
-
- public void setAttribute(String attributeName, int value) {
- wch.setAttribute(attributeName, value);
- }
-
- public void setAttribute(String attributeName, boolean value) {
- wch.setAttribute(attributeName, value);
- }
-
- public void setAttribute(String attributeName, String value) {
- wch.setAttribute(attributeName, value);
- }
-
- public void setAttribute(String attributeName, List value) {
- wch.setAttribute(attributeName, value);
- }
-
- public void setAttribute(String attributeName, Map value) {
- wch.setAttribute(attributeName, value);
- }
-
- public void setName(String name) {
- wch.setName(name);
- boolean set = getAttribute(PROP_ID_SET, false);
- if (runtime == null && !set)
- setAttribute("id", name);
- }
-
- public void setTestEnvironment(boolean b) {
- setAttribute(PROP_TEST_ENVIRONMENT, b);
- }
-
- public boolean isDirty() {
- return wch.isDirty();
- }
-
- public IRuntime getOriginal() {
- return runtime;
- }
-
- public void setLocked(boolean b) {
- wch.setLocked(b);
- }
-
- public void setPrivate(boolean b) {
- wch.setPrivate(b);
- }
-
- public void setLocation(IPath path) {
- if (path == null)
- setAttribute(PROP_LOCATION, (String)null);
- else
- setAttribute(PROP_LOCATION, path.toString());
- }
-
- public IRuntime save(boolean force, IProgressMonitor monitor) throws CoreException {
- monitor = ProgressUtil.getMonitorFor(monitor);
- monitor.subTask(ServerPlugin.getResource("%savingTask", getName()));
-
- if (!force)
- wch.validateTimestamp(getOriginal());
-
- IRuntime origRuntime = runtime;
- if (runtime == null)
- runtime = new Runtime(file);
-
- String oldId = getId();
- String name = getName();
- boolean set = getAttribute(PROP_ID_SET, false);
- if (!oldId.equals(name) && !set) {
- setAttribute("id", name);
- } else
- oldId = null;
-
- runtime.setInternal(this);
- runtime.saveToMetadata(monitor);
- wch.setDirty(false);
-
- if (oldId != null)
- updateRuntimeReferences(oldId, name, origRuntime);
-
- return runtime;
- }
-
- protected void updateRuntimeReferences(final String oldId, final String newId, final IRuntime origRuntime) {
- class UpdateRuntimeReferencesJob extends Job {
- public UpdateRuntimeReferencesJob() {
- super(ServerPlugin.getResource("%savingTask", newId));
- }
-
- public IStatus run(IProgressMonitor monitor) {
- // fix .runtime files
- IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- if (projects != null) {
- int size = projects.length;
- for (int i = 0; i < size; i++) {
- ProjectProperties props = (ProjectProperties) ServerCore.getProjectProperties(projects[i]);
- if (oldId.equals(props.getRuntimeTargetId())) {
- try {
- props.setRuntimeTargetId(newId, monitor);
- } catch (Exception e) {
- // ignore
- }
- }
- }
- }
-
- // save servers
- if (runtime != null) {
- ResourceManager rm = ResourceManager.getInstance();
- IServer[] servers = rm.getServers();
- if (servers != null) {
- int size = servers.length;
- for (int i = 0; i < size; i++) {
- if (oldId.equals(((Server)servers[i]).getRuntimeId())) {
- try {
- ServerWorkingCopy wc = (ServerWorkingCopy) servers[i].createWorkingCopy();
- wc.setRuntimeId(newId);
- wc.save(false, monitor);
- } catch (Exception e) {
- // ignore
- }
- }
- }
- }
- }
-
- return new Status(IStatus.OK, ServerPlugin.PLUGIN_ID, 0, "", null);
- }
- }
- UpdateRuntimeReferencesJob job = new UpdateRuntimeReferencesJob();
- job.schedule();
- }
-
- /**
- * Rebuild any projects that are targetted to this runtime.
- *
- * @param id
- */
- protected static void rebuildRuntime(final IRuntime runtime, final boolean add) {
- if (runtime == null)
- return;
-
- class RebuildRuntimeReferencesJob extends Job {
- public RebuildRuntimeReferencesJob() {
- super(ServerPlugin.getResource("%taskPerforming"));
- }
-
- public IStatus run(IProgressMonitor monitor) {
- String id = runtime.getId();
-
- IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- if (projects != null) {
- int size = projects.length;
- for (int i = 0; i < size; i++) {
- ProjectProperties props = (ProjectProperties) ServerCore.getProjectProperties(projects[i]);
- if (id.equals(props.getRuntimeTargetId())) {
- try {
- if (add)
- props.setRuntimeTarget(null, runtime, false, monitor);
- else
- props.setRuntimeTarget(runtime, null, false, monitor);
- projects[i].build(IncrementalProjectBuilder.FULL_BUILD, monitor);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- }
- }
-
- return new Status(IStatus.OK, ServerPlugin.PLUGIN_ID, 0, "", null);
- }
- }
- RebuildRuntimeReferencesJob job = new RebuildRuntimeReferencesJob();
- job.schedule();
- }
-
- public RuntimeDelegate getWorkingCopyDelegate(IProgressMonitor monitor) {
- if (workingCopyDelegate != null)
- return workingCopyDelegate;
-
- synchronized (this) {
- if (workingCopyDelegate == null) {
- try {
- long time = System.currentTimeMillis();
- RuntimeType runtimeType2 = (RuntimeType) runtimeType;
- workingCopyDelegate = (RuntimeDelegate) runtimeType2.getElement().createExecutableExtension("class");
- workingCopyDelegate.initialize(this);
- Trace.trace(Trace.PERFORMANCE, "RuntimeWorkingCopy.getWorkingCopyDelegate(): <" + (System.currentTimeMillis() - time) + "> " + getRuntimeType().getId());
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Could not create delegate " + toString(), e);
- }
- }
- }
- return workingCopyDelegate;
- }
-
- public void dispose() {
- super.dispose();
- if (workingCopyDelegate != null)
- workingCopyDelegate.dispose();
- }
-
- /**
- * Add a property change listener to this server.
- *
- * @param listener java.beans.PropertyChangeListener
- */
- public void addPropertyChangeListener(PropertyChangeListener listener) {
- wch.addPropertyChangeListener(listener);
- }
-
- /**
- * Remove a property change listener from this server.
- *
- * @param listener java.beans.PropertyChangeListener
- */
- public void removePropertyChangeListener(PropertyChangeListener listener) {
- wch.removePropertyChangeListener(listener);
- }
-
- /**
- * Fire a property change event.
- */
- public void firePropertyChangeEvent(String propertyName, Object oldValue, Object newValue) {
- wch.firePropertyChangeEvent(propertyName, oldValue, newValue);
- }
-
- public void setDefaults(IProgressMonitor monitor) {
- try {
- getWorkingCopyDelegate(monitor).setDefaults();
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error calling delegate setDefaults() " + toString(), e);
- }
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/Server.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/Server.java
deleted file mode 100644
index 12344ee..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/Server.java
+++ /dev/null
@@ -1,1748 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal;
-
-import java.util.*;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.*;
-import org.eclipse.debug.core.*;
-import org.osgi.framework.Bundle;
-
-import org.eclipse.wst.server.core.*;
-import org.eclipse.wst.server.core.model.*;
-import org.eclipse.wst.server.core.util.ServerAdapter;
-/**
- *
- */
-public class Server extends Base implements IServer {
- protected static final List EMPTY_LIST = new ArrayList(0);
-
- protected static final String PROP_HOSTNAME = "hostname";
- protected static final String SERVER_ID = "server-id";
- protected static final String RUNTIME_ID = "runtime-id";
- protected static final String CONFIGURATION_ID = "configuration-id";
-
- protected IServerType serverType;
- protected ServerDelegate delegate;
- protected ServerBehaviourDelegate behaviourDelegate;
-
- protected IRuntime runtime;
- protected IFolder configuration;
- protected String mode;
-
- protected int serverState = STATE_UNKNOWN;
- protected int serverSyncState;
- protected boolean serverRestartNeeded;
-
- protected Map moduleState = new HashMap();
- protected Map modulePublishState = new HashMap();
- protected Map moduleRestartState = new HashMap();
-
-/* private static final String[] stateStrings = new String[] {
- "unknown", "starting", "started", "started_debug",
- "stopping", "stopped", "started_unsupported", "started_profile"
- };*/
-
- // publish listeners
- protected transient List publishListeners;
-
- // server listeners
- protected transient List serverListeners;
-
- // working copy, loaded resource
- public Server(IFile file) {
- super(file);
- map.put(PROP_HOSTNAME, "localhost");
- }
-
- // creation (working copy)
- public Server(String id, IFile file, IRuntime runtime, IServerType serverType) {
- super(file, id);
- this.runtime = runtime;
- this.serverType = serverType;
- map.put("server-type-id", serverType.getId());
- map.put(PROP_HOSTNAME, "localhost");
- if (runtime != null && runtime.getRuntimeType() != null) {
- String name = runtime.getRuntimeType().getName();
- map.put(PROP_NAME, name);
- }
- serverState = ((ServerType)serverType).getInitialState();
- }
-
- public IServerType getServerType() {
- return serverType;
- }
-
- public IServerWorkingCopy createWorkingCopy() {
- return new ServerWorkingCopy(this);
- }
-
- public boolean isWorkingCopy() {
- return false;
- }
-
- protected void deleteFromMetadata() {
- ResourceManager.getInstance().removeServer(this);
- }
-
- protected void saveToMetadata(IProgressMonitor monitor) {
- super.saveToMetadata(monitor);
- ResourceManager.getInstance().addServer(this);
- }
-
- /* (non-Javadoc)
- * @see com.ibm.wtp.server.core.IServer2#getRuntime()
- */
- public IRuntime getRuntime() {
- return runtime;
- }
-
- protected String getRuntimeId() {
- return getAttribute(RUNTIME_ID, (String) null);
- }
-
- /* (non-Javadoc)
- * @see com.ibm.wtp.server.core.IServer2#getServerConfiguration()
- */
- public IFolder getServerConfiguration() {
- return configuration;
- }
-
- protected ServerDelegate getDelegate() {
- if (delegate != null)
- return delegate;
-
- if (serverType != null) {
- synchronized (this) {
- if (delegate == null) {
- try {
- long time = System.currentTimeMillis();
- IConfigurationElement element = ((ServerType) serverType).getElement();
- delegate = (ServerDelegate) element.createExecutableExtension("class");
- delegate.initialize(this);
- Trace.trace(Trace.PERFORMANCE, "Server.getDelegate(): <" + (System.currentTimeMillis() - time) + "> " + getServerType().getId());
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Could not create delegate " + toString(), e);
- }
- }
- }
- }
- return delegate;
- }
-
- protected ServerBehaviourDelegate getBehaviourDelegate() {
- if (behaviourDelegate != null)
- return behaviourDelegate;
-
- if (serverType != null) {
- synchronized (this) {
- if (behaviourDelegate == null) {
- try {
- long time = System.currentTimeMillis();
- IConfigurationElement element = ((ServerType) serverType).getElement();
- behaviourDelegate = (ServerBehaviourDelegate) element.createExecutableExtension("behaviourClass");
- behaviourDelegate.initialize(this);
- Trace.trace(Trace.PERFORMANCE, "Server.getDelegate(): <" + (System.currentTimeMillis() - time) + "> " + getServerType().getId());
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Could not create delegate " + toString(), e);
- }
- }
- }
- }
- return behaviourDelegate;
- }
-
- /**
- * Returns true if the delegate has been loaded.
- *
- * @return
- */
- public boolean isDelegateLoaded() {
- return delegate != null;
- }
-
- public void dispose() {
- if (delegate != null)
- delegate.dispose();
- }
-
- public boolean isDelegatePluginActivated() {
- IConfigurationElement element = ((ServerType) serverType).getElement();
- String pluginId = element.getDeclaringExtension().getNamespace();
- return Platform.getBundle(pluginId).getState() == Bundle.ACTIVE;
- }
-
- /**
- * Returns true if this is a configuration that is
- * applicable to (can be used with) this server.
- *
- * @param configuration
- * @return boolean
- */
- public boolean isSupportedConfiguration(IPath configuration2) {
- /*if (!getServerType().hasServerConfiguration() || configuration2 == null)
- return false;
- return getServerType().getServerConfigurationType().equals(configuration2.getServerConfigurationType());*/
- try {
- return getDelegate().isSupportedConfiguration(configuration2);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error calling delegate getModules() " + toString(), e);
- return false;
- }
- }
-
- public String getHost() {
- return getAttribute(PROP_HOSTNAME, "localhost");
- }
-
- /**
- * Returns the current state of the server. (see SERVER_XXX constants)
- *
- * @return int
- */
- public int getServerState() {
- return serverState;
- }
-
- public String getMode() {
- return mode;
- }
-
- public void setServerState(int state) {
- if (state == serverState)
- return;
-
- this.serverState = state;
- fireServerStateChangeEvent();
- }
-
- /**
- * Add a listener to this server.
- *
- * @param listener org.eclipse.wst.server.model.IServerListener
- */
- public void addServerListener(IServerListener listener) {
- Trace.trace(Trace.LISTENERS, "Adding server listener " + listener + " to " + this);
-
- if (serverListeners == null)
- serverListeners = new ArrayList();
- serverListeners.add(listener);
- }
-
- /**
- * Remove a listener from this server.
- *
- * @param listener org.eclipse.wst.server.model.IServerListener
- */
- public void removeServerListener(IServerListener listener) {
- Trace.trace(Trace.LISTENERS, "Removing server listener " + listener + " from " + this);
-
- if (serverListeners != null)
- serverListeners.remove(listener);
- }
-
- /**
- * Fire a server listener configuration sync state change event.
- */
- protected void fireConfigurationSyncStateChangeEvent() {
- Trace.trace(Trace.LISTENERS, "->- Firing server configuration change event: " + getName() + " ->-");
-
- if (serverListeners == null || serverListeners.isEmpty())
- return;
-
- int size = serverListeners.size();
- IServerListener[] sil = new IServerListener[size];
- serverListeners.toArray(sil);
-
- for (int i = 0; i < size; i++) {
- try {
- Trace.trace(Trace.LISTENERS, " Firing server configuration change event to: " + sil[i]);
- sil[i].configurationSyncStateChange(this);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, " Error firing server configuration change event", e);
- }
- }
- Trace.trace(Trace.LISTENERS, "-<- Done firing server configuration change event -<-");
- }
-
- /**
- * Fire a server listener restart state change event.
- */
- protected void fireRestartStateChangeEvent() {
- Trace.trace(Trace.LISTENERS, "->- Firing server restart change event: " + getName() + " ->-");
-
- if (serverListeners == null || serverListeners.isEmpty())
- return;
-
- int size = serverListeners.size();
- IServerListener[] sil = new IServerListener[size];
- serverListeners.toArray(sil);
-
- for (int i = 0; i < size; i++) {
- try {
- Trace.trace(Trace.LISTENERS, " Firing server restart change event to: " + sil[i]);
- sil[i].restartStateChange(this);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, " Error firing server restart change event", e);
- }
- }
- Trace.trace(Trace.LISTENERS, "-<- Done firing server restart change event -<-");
- }
-
- /**
- * Fire a server listener state change event.
- */
- protected void fireServerStateChangeEvent() {
- Trace.trace(Trace.LISTENERS, "->- Firing server state change event: " + getName() + ", " + getServerState() + " ->-");
-
- if (serverListeners == null || serverListeners.isEmpty())
- return;
-
- int size = serverListeners.size();
- IServerListener[] sil = new IServerListener[size];
- serverListeners.toArray(sil);
-
- for (int i = 0; i < size; i++) {
- try {
- Trace.trace(Trace.LISTENERS, " Firing server state change event to: " + sil[i]);
- sil[i].serverStateChange(this);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, " Error firing server state change event", e);
- }
- }
- Trace.trace(Trace.LISTENERS, "-<- Done firing server state change event -<-");
- }
-
- /**
- * Fire a server listener module change event.
- */
- protected void fireServerModuleChangeEvent() {
- Trace.trace(Trace.LISTENERS, "->- Firing server module change event: " + getName() + ", " + getServerState() + " ->-");
-
- if (serverListeners == null || serverListeners.isEmpty())
- return;
-
- int size = serverListeners.size();
- IServerListener[] sil = new IServerListener[size];
- serverListeners.toArray(sil);
-
- for (int i = 0; i < size; i++) {
- try {
- Trace.trace(Trace.LISTENERS, " Firing server module change event to: " + sil[i]);
- sil[i].modulesChanged(this);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, " Error firing server module change event", e);
- }
- }
- Trace.trace(Trace.LISTENERS, "-<- Done firing server module change event -<-");
- }
-
- /**
- * Fire a server listener module state change event.
- */
- protected void fireServerModuleStateChangeEvent(IModule module) {
- Trace.trace(Trace.LISTENERS, "->- Firing server module state change event: " + getName() + ", " + getServerState() + " ->-");
-
- if (serverListeners == null || serverListeners.isEmpty())
- return;
-
- int size = serverListeners.size();
- IServerListener[] sil = new IServerListener[size];
- serverListeners.toArray(sil);
-
- for (int i = 0; i < size; i++) {
- try {
- Trace.trace(Trace.LISTENERS, " Firing server module state change event to: " + sil[i]);
- sil[i].moduleStateChange(this, module);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, " Error firing server module state change event", e);
- }
- }
- Trace.trace(Trace.LISTENERS, "-<- Done firing server module state change event -<-");
- }
-
- public void setMode(String m) {
- this.mode = m;
- }
-
- public void setModuleState(IModule module, int state) {
- Integer in = new Integer(state);
- moduleState.put(module.getId(), in);
- fireServerModuleStateChangeEvent(module);
- }
-
- public void setModulePublishState(IModule module, int state) {
- Integer in = new Integer(state);
- modulePublishState.put(module.getId(), in);
- //fireServerModuleStateChangeEvent(module);
- }
-
- public void setModuleRestartState(IModule module, boolean r) {
- Boolean b = new Boolean(r);
- moduleState.put(module.getId(), b);
- //fireServerModuleStateChangeEvent(module);
- }
-
- protected void handleModuleProjectChange(final IResourceDelta delta, final IModule[] moduleProjects) {
- //Trace.trace(Trace.FINEST, "> handleDeployableProjectChange() " + server + " " + delta + " " + moduleProjects);
- final int size = moduleProjects.length;
- //final IModuleResourceDelta[] deployableDelta = new IModuleResourceDelta[size];
- // TODO: module changes
- IModuleVisitor visitor = new IModuleVisitor() {
- public boolean visit(IModule[] parents, IModule module) {
- if (module.getProject() == null)
- return true;
-
- for (int i = 0; i < size; i++) {
- if (moduleProjects[i].equals(module)) {
- /*if (deployableDelta[i] == null)
- deployableDelta[i] = moduleProjects[i].getModuleResourceDelta(delta);
-
- if (deployableDelta[i] != null) {
- // updateDeployable(module, deployableDelta[i]);
-
- PublishControl control = PublishInfo.getPublishInfo().getPublishControl(Server.this, parents, module);
- if (control.isDirty())
- return true;
-
- control.setDirty(true);
- firePublishStateChange(parents, module);
- }*/
- return true;
- }
- }
- return true;
- }
- };
-
- ServerUtil.visit(this, visitor, null);
- //Trace.trace(Trace.FINEST, "< handleDeployableProjectChange()");
- }
-
- /**
- * Returns the configuration's sync state.
- *
- * @return int
- */
- public int getServerPublishState() {
- return serverSyncState;
- }
-
- /**
- * Sets the configuration sync state.
- *
- * @param state int
- */
- public void setServerPublishState(int state) {
- if (state == serverSyncState)
- return;
- serverSyncState = state;
- fireConfigurationSyncStateChangeEvent();
- }
-
- /**
- * Adds a publish listener to this server.
- *
- * @param listener org.eclipse.wst.server.core.model.IPublishListener
- */
- public void addPublishListener(IPublishListener listener) {
- Trace.trace(Trace.LISTENERS, "Adding publish listener " + listener + " to " + this);
-
- if (publishListeners == null)
- publishListeners = new ArrayList();
- publishListeners.add(listener);
- }
-
- /**
- * Removes a publish listener from this server.
- *
- * @param listener org.eclipse.wst.server.core.model.IPublishListener
- */
- public void removePublishListener(IPublishListener listener) {
- Trace.trace(Trace.LISTENERS, "Removing publish listener " + listener + " from " + this);
-
- if (publishListeners != null)
- publishListeners.remove(listener);
- }
-
- /**
- * Fire a publish start event.
- *
- * @param
- */
- private void firePublishStarted() {
- Trace.trace(Trace.FINEST, "->- Firing publish started event ->-");
-
- if (publishListeners == null || publishListeners.isEmpty())
- return;
-
- int size = publishListeners.size();
- IPublishListener[] srl = new IPublishListener[size];
- publishListeners.toArray(srl);
-
- for (int i = 0; i < size; i++) {
- Trace.trace(Trace.FINEST, " Firing publish started event to " + srl[i]);
- try {
- srl[i].publishStarted(this);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, " Error firing publish started event to " + srl[i], e);
- }
- }
-
- Trace.trace(Trace.FINEST, "-<- Done firing publish started event -<-");
- }
-
- /**
- * Fire a publish target event.
- *
- * @param
- */
- private void fireModulePublishStarted(IModule[] parents, IModule module) {
- Trace.trace(Trace.FINEST, "->- Firing module publish started event: " + module + " ->-");
-
- if (publishListeners == null || publishListeners.isEmpty())
- return;
-
- int size = publishListeners.size();
- IPublishListener[] srl = new IPublishListener[size];
- publishListeners.toArray(srl);
-
- for (int i = 0; i < size; i++) {
- Trace.trace(Trace.FINEST, " Firing module publish started event to " + srl[i]);
- try {
- srl[i].publishModuleStarted(this, parents, module);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, " Error firing module publish started event to " + srl[i], e);
- }
- }
-
- Trace.trace(Trace.FINEST, "-<- Done firing module publish started event -<-");
- }
-
- /**
- * Fire a publish target event.
- *
- * @param
- */
- private void fireModulePublishFinished(IModule[] parents, IModule module, IStatus status) {
- Trace.trace(Trace.FINEST, "->- Firing module finished event: " + module + " " + status + " ->-");
-
- if (publishListeners == null || publishListeners.isEmpty())
- return;
-
- int size = publishListeners.size();
- IPublishListener[] srl = new IPublishListener[size];
- publishListeners.toArray(srl);
-
- for (int i = 0; i < size; i++) {
- Trace.trace(Trace.FINEST, " Firing module finished event to " + srl[i]);
- try {
- srl[i].publishModuleFinished(this, parents, module, status);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, " Error firing module finished event to " + srl[i], e);
- }
- }
-
- Trace.trace(Trace.FINEST, "-<- Done firing module finished event -<-");
- }
-
- /**
- * Fire a publish stop event.
- *
- * @param
- */
- private void firePublishFinished(IStatus status) {
- Trace.trace(Trace.FINEST, "->- Firing publishing finished event: " + status + " ->-");
-
- if (publishListeners == null || publishListeners.isEmpty())
- return;
-
- int size = publishListeners.size();
- IPublishListener[] srl = new IPublishListener[size];
- publishListeners.toArray(srl);
-
- for (int i = 0; i < size; i++) {
- Trace.trace(Trace.FINEST, " Firing publishing finished event to " + srl[i]);
- try {
- srl[i].publishFinished(this, status);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, " Error firing publishing finished event to " + srl[i], e);
- }
- }
-
- Trace.trace(Trace.FINEST, "-<- Done firing publishing finished event -<-");
- }
-
- /**
- * Fire a publish state change event.
- *
- * @param
- */
- protected void firePublishStateChange(IModule[] parents, IModule module) {
- Trace.trace(Trace.FINEST, "->- Firing publish state change event: " + module + " ->-");
-
- if (serverListeners == null || serverListeners.isEmpty())
- return;
-
- int size = serverListeners.size();
- IServerListener[] sl = new IServerListener[size];
- serverListeners.toArray(sl);
-
- for (int i = 0; i < size; i++) {
- Trace.trace(Trace.FINEST, " Firing publish state change event to " + sl[i]);
- try {
- sl[i].moduleStateChange(this, parents, module);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, " Error firing publish state change event to " + sl[i], e);
- }
- }
-
- Trace.trace(Trace.FINEST, "-<- Done firing publish state change event -<-");
- }
-
- /**
- * Returns true if the server is in a state that it can
- * be published to.
- *
- * @return boolean
- */
- public boolean canPublish() {
- // can't publish if the server is starting or stopping
- int state = getServerState();
- if (state == STATE_STARTING || state == STATE_STOPPING)
- return false;
-
- // can't publish if there is no configuration
- if (getServerType() == null || getServerType().hasServerConfiguration() && configuration == null)
- return false;
-
- // return true if the configuration can be published
- if (getServerPublishState() != PUBLISH_STATE_NONE)
- return true;
-
- // return true if any modules can be published
- class Temp {
- boolean found = false;
- }
- final Temp temp = new Temp();
-
- IModuleVisitor visitor = new IModuleVisitor() {
- public boolean visit(IModule[] parents, IModule module) {
- if (getModulePublishState(module) != PUBLISH_STATE_NONE) {
- temp.found = true;
- return false;
- }
- return true;
- }
- };
- ServerUtil.visit(this, visitor, null);
-
- return temp.found;
- }
-
- /**
- * Returns true if the server is in a state that it can
- * be published to.
- *
- * @return boolean
- */
- public boolean shouldPublish() {
- if (!canPublish())
- return false;
-
- if (getServerPublishState() != PUBLISH_STATE_NONE)
- return true;
-
- if (getUnpublishedModules().length > 0)
- return true;
-
- return false;
- }
-
-
- /**
- * Returns a list of the projects that have not been published
- * since the last modification. (i.e. the projects that are
- * out of sync with the server.
- *
- * @return java.util.List
- */
- public IModule[] getUnpublishedModules() {
- final List modules = new ArrayList();
- IModuleVisitor visitor = new IModuleVisitor() {
- public boolean visit(IModule[] parents, IModule module) {
- if (getModulePublishState(module) != PUBLISH_STATE_NONE && !modules.contains(module)) {
- PublishControl control = PublishInfo.getPublishInfo().getPublishControl(Server.this, parents, module);
- if (control.isDirty)
- modules.add(module);
- }
- return true;
- }
- };
- ServerUtil.visit(this, visitor, null);
-
- Trace.trace(Trace.FINEST, "Unpublished modules: " + modules);
-
- IModule[] m = new IModule[modules.size()];
- modules.toArray(m);
- return m;
- }
-
- /**
- * Publish to the server using the progress monitor. The result of the
- * publish operation is returned as an IStatus.
- *
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting and cancellation are not desired
- * @return status indicating what (if anything) went wrong
- */
- public IStatus publish(IProgressMonitor monitor) {
- if (getServerType() == null)
- return new Status(IStatus.ERROR, ServerPlugin.PLUGIN_ID, 0, ServerPlugin.getResource("%errorPublishing"), null);
-
- // check what is out of sync and publish
- if (getServerType().hasServerConfiguration() && configuration == null)
- return new Status(IStatus.ERROR, ServerPlugin.PLUGIN_ID, 0, ServerPlugin.getResource("%errorNoConfiguration"), null);
-
- Trace.trace(Trace.FINEST, "-->-- Publishing to server: " + toString() + " -->--");
-
- final List parentList = new ArrayList();
- final List moduleList = new ArrayList();
- final List taskParentList = new ArrayList();
- final List taskModuleList = new ArrayList();
-
- IModuleVisitor visitor = new IModuleVisitor() {
- public boolean visit(IModule[] parents, IModule module) {
- int size = parents.length;
- List list = new ArrayList(size);
- for (int i = 0; i < size; i++)
- list.add(parents[i]);
-
- taskParentList.add(list);
- taskModuleList.add(module);
- if (parents != null)
- parentList.add(parents);
- else
- parentList.add(EMPTY_LIST);
- moduleList.add(module);
- return true;
- }
- };
-
- ServerUtil.visit(this, visitor, monitor);
-
- // get arrays without the server configuration
- List[] taskParents = new List[taskParentList.size()];
- taskParentList.toArray(taskParents);
- IModule[] taskModules = new IModule[taskModuleList.size()];
- taskModuleList.toArray(taskModules);
-
- // get arrays with the server configuration
- List parents = parentList;
- IModule[] modules = new IModule[moduleList.size()];
- moduleList.toArray(modules);
-
- int size = 2000 + 3500 * parentList.size();
-
- // find tasks
- List tasks = getTasks(taskParents, taskModules);
- size += tasks.size() * 500;
-
- monitor = ProgressUtil.getMonitorFor(monitor);
- monitor.beginTask(ServerPlugin.getResource("%publishingTask", toString()), size);
-
- MultiStatus multi = new MultiStatus(ServerPlugin.PLUGIN_ID, 0, ServerPlugin.getResource("%publishingStatus"), null);
-
- // perform tasks
- IStatus taskStatus = performTasks(tasks, monitor);
- if (taskStatus != null)
- multi.add(taskStatus);
-
- if (monitor.isCanceled())
- return new Status(IStatus.INFO, ServerPlugin.PLUGIN_ID, 0, ServerPlugin.getResource("%publishingCancelled"), null);
-
- // start publishing
- Trace.trace(Trace.FINEST, "Opening connection to the remote server");
- firePublishStarted();
- //boolean connectionOpen = false;
- try {
- getBehaviourDelegate().publishStart(ProgressUtil.getSubMonitorFor(monitor, 1000));
- } catch (CoreException ce) {
- Trace.trace(Trace.INFO, "CoreException publishing to " + toString(), ce);
- firePublishFinished(ce.getStatus());
- return ce.getStatus();
- }
-
- // publish the server
- try {
- if (!monitor.isCanceled() && serverType.hasServerConfiguration()) {
- getBehaviourDelegate().publishServer(ProgressUtil.getSubMonitorFor(monitor, 1000));
- }
- } catch (CoreException ce) {
- Trace.trace(Trace.INFO, "CoreException publishing to " + toString(), ce);
- multi.add(ce.getStatus());
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error publishing configuration to " + toString(), e);
- multi.add(new Status(IStatus.ERROR, ServerPlugin.PLUGIN_ID, 0, ServerPlugin.getResource("%errorPublishing"), e));
- }
-
- // remove old modules
-
- // publish modules
- if (!monitor.isCanceled()) {
- publishModules(parents, modules, multi, monitor);
- }
-
- // end the publishing
- Trace.trace(Trace.FINEST, "Closing connection with the remote server");
- try {
- getBehaviourDelegate().publishFinish(ProgressUtil.getSubMonitorFor(monitor, 500));
- } catch (CoreException ce) {
- Trace.trace(Trace.INFO, "CoreException publishing to " + toString(), ce);
- multi.add(ce.getStatus());
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error stopping publish to " + toString(), e);
- multi.add(new Status(IStatus.ERROR, ServerPlugin.PLUGIN_ID, 0, ServerPlugin.getResource("%errorPublishing"), e));
- }
-
- if (monitor.isCanceled()) {
- IStatus status = new Status(IStatus.INFO, ServerPlugin.PLUGIN_ID, 0, ServerPlugin.getResource("%publishingCancelled"), null);
- multi.add(status);
- }
-
- MultiStatus ps = new MultiStatus(ServerPlugin.PLUGIN_ID, 0, ServerPlugin.getResource("%publishingStop"), null);
- ps.add(multi);
- firePublishFinished(multi);
-
- PublishInfo.getPublishInfo().save(this);
-
- monitor.done();
-
- Trace.trace(Trace.FINEST, "--<-- Done publishing --<--");
- return multi;
- }
-
- /**
- * Publish a single module.
- */
- protected IStatus publishModule(IModule[] parents, IModule module, IProgressMonitor monitor) {
- Trace.trace(Trace.FINEST, "Publishing module: " + module);
-
- monitor.beginTask(ServerPlugin.getResource("%publishingProject", module.getName()), 1000);
-
- fireModulePublishStarted(parents, module);
-
- Status multi = new Status(IStatus.OK, ServerPlugin.PLUGIN_ID, 0, ServerPlugin.getResource("%publishingProject", module.getName()), null);
- try {
- getBehaviourDelegate().publishModule(parents, module, monitor);
- } catch (CoreException ce) {
- // ignore
- }
- fireModulePublishFinished(parents, module, multi);
-
- monitor.done();
-
- Trace.trace(Trace.FINEST, "Done publishing: " + module);
- return multi;
- }
-
- /**
- * Publishes the given modules. Returns true if the publishing
- * should continue, or false if publishing has failed or is cancelled.
- *
- * Uses 500 ticks plus 3500 ticks per module
- */
- protected void publishModules(List parents, IModule[] modules, MultiStatus multi, IProgressMonitor monitor) {
- if (parents == null)
- return;
-
- int size = parents.size();
- if (size == 0)
- return;
-
- if (monitor.isCanceled())
- return;
-
- // publish modules
- for (int i = 0; i < size; i++) {
- IStatus status = publishModule((IModule[]) parents.get(i), modules[i], ProgressUtil.getSubMonitorFor(monitor, 3000));
- multi.add(status);
- }
- }
-
- protected List getTasks(List[] parents, IModule[] modules) {
- List tasks = new ArrayList();
-
- String serverTypeId = getServerType().getId();
-
- IServerTask[] serverTasks = ServerCore.getServerTasks();
- if (serverTasks != null) {
- int size = serverTasks.length;
- for (int i = 0; i < size; i++) {
- IServerTask task = serverTasks[i];
- if (task.supportsType(serverTypeId)) {
- IOptionalTask[] tasks2 = task.getTasks(this, parents, modules);
- if (tasks2 != null) {
- int size2 = tasks2.length;
- for (int j = 0; j < size2; j++) {
- if (tasks2[j].getStatus() == IOptionalTask.TASK_MANDATORY)
- tasks.add(tasks2[j]);
- }
- }
- }
- }
- }
-
- sortOrderedList(tasks);
-
- return tasks;
- }
-
- /**
- * Sort the given list of IOrdered items into indexed order. This method
- * modifies the original list, but returns the value for convenience.
- *
- * @param list java.util.List
- * @return java.util.List
- */
- private static List sortOrderedList(List list) {
- if (list == null)
- return null;
-
- int size = list.size();
- for (int i = 0; i < size - 1; i++) {
- for (int j = i + 1; j < size; j++) {
- IOrdered a = (IOrdered) list.get(i);
- IOrdered b = (IOrdered) list.get(j);
- if (a.getOrder() > b.getOrder()) {
- Object temp = a;
- list.set(i, b);
- list.set(j, temp);
- }
- }
- }
- return list;
- }
-
- protected IStatus performTasks(List tasks, IProgressMonitor monitor) {
- Trace.trace(Trace.FINEST, "Performing tasks: " + tasks.size());
-
- if (tasks.isEmpty())
- return null;
-
- Status multi = new MultiStatus(ServerPlugin.PLUGIN_ID, 0, ServerPlugin.getResource("%taskPerforming"), null);
-
- Iterator iterator = tasks.iterator();
- while (iterator.hasNext()) {
- IOptionalTask task = (IOptionalTask) iterator.next();
- monitor.subTask(ServerPlugin.getResource("%taskPerforming", task.toString()));
- try {
- task.execute(ProgressUtil.getSubMonitorFor(monitor, 500));
- } catch (CoreException ce) {
- Trace.trace(Trace.SEVERE, "Task failed", ce);
- }
- if (monitor.isCanceled())
- return multi;
- }
-
- // save server and configuration
- /*try {
- ServerUtil.save(server, ProgressUtil.getSubMonitorFor(monitor, 1000));
- ServerUtil.save(configuration, ProgressUtil.getSubMonitorFor(monitor, 1000));
- } catch (CoreException se) {
- Trace.trace(Trace.SEVERE, "Error saving server and/or configuration", se);
- multi.addChild(se.getStatus());
- }*/
-
- return multi;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- ServerDelegate delegate2 = getDelegate();
- if (adapter.isInstance(delegate2))
- return delegate2;
- ServerBehaviourDelegate delegate3 = getBehaviourDelegate();
- if (adapter.isInstance(delegate3))
- return delegate3;
- return null;
- }
-
- public String toString() {
- return getName();
- }
-
- /**
- * Returns true if the server is in a state that it can
- * be started, and supports the given mode.
- *
- * @param mode
- * @return boolean
- */
- public boolean canStart(String mode2) {
- int state = getServerState();
- if (state != STATE_STOPPED && state != STATE_UNKNOWN)
- return false;
-
- if (getServerType() == null || !getServerType().supportsLaunchMode(mode2))
- return false;
-
- return true;
- }
-
- public ILaunch getExistingLaunch() {
- ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
-
- ILaunch[] launches = launchManager.getLaunches();
- int size = launches.length;
- for (int i = 0; i < size; i++) {
- ILaunchConfiguration launchConfig = launches[i].getLaunchConfiguration();
- try {
- if (launchConfig != null) {
- String serverId = launchConfig.getAttribute(SERVER_ID, (String) null);
- if (getId().equals(serverId)) {
- if (!launches[i].isTerminated())
- return launches[i];
- }
- }
- } catch (CoreException e) {
- // ignore
- }
- }
-
- return null;
- }
-
- public void setLaunchDefaults(ILaunchConfigurationWorkingCopy workingCopy, IProgressMonitor monitor) {
- try {
- getBehaviourDelegate().setLaunchDefaults(workingCopy);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error calling delegate setLaunchDefaults() " + toString(), e);
- }
- }
-
- public void importConfiguration(IRuntime runtime2, IProgressMonitor monitor) {
- try {
- getDelegate().importConfiguration(runtime2, monitor);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error calling delegate setLaunchDefaults() " + toString(), e);
- }
- }
-
- public ILaunchConfiguration getLaunchConfiguration(boolean create, IProgressMonitor monitor) throws CoreException {
- ILaunchConfigurationType launchConfigType = ((ServerType) getServerType()).getLaunchConfigurationType();
-
- ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
- ILaunchConfiguration[] launchConfigs = null;
- try {
- launchConfigs = launchManager.getLaunchConfigurations(launchConfigType);
- } catch (CoreException e) {
- // ignore
- }
-
- if (launchConfigs != null) {
- int size = launchConfigs.length;
- for (int i = 0; i < size; i++) {
- try {
- String serverId = launchConfigs[i].getAttribute(SERVER_ID, (String) null);
- if (getId().equals(serverId))
- return launchConfigs[i];
- } catch (CoreException e) {
- // ignore
- }
- }
- }
-
- if (!create)
- return null;
-
- // create a new launch configuration
- String name = launchManager.generateUniqueLaunchConfigurationNameFrom(getName());
- ILaunchConfigurationWorkingCopy wc = launchConfigType.newInstance(null, name);
- wc.setAttribute(SERVER_ID, getId());
- setLaunchDefaults(wc, monitor);
- return wc.doSave();
- }
-
- /**
- * Start the server in the given mode.
- *
- * @param launchMode String
- * @param monitor org.eclipse.core.runtime.IProgressMonitor
- * @return org.eclispe.core.runtime.IStatus
- */
- public ILaunch start(String mode2, IProgressMonitor monitor) throws CoreException {
- Trace.trace(Trace.FINEST, "Starting server: " + toString() + ", launchMode: " + mode2);
-
- try {
- ILaunchConfiguration launchConfig = getLaunchConfiguration(true, monitor);
- ILaunch launch = launchConfig.launch(mode2, monitor);
- Trace.trace(Trace.FINEST, "Launch: " + launch);
- return launch;
- } catch (CoreException e) {
- Trace.trace(Trace.SEVERE, "Error starting server " + toString(), e);
- throw e;
- }
- }
-
- /**
- * Clean up any launch configurations with the given server ref.
- *
- * @param serverRef java.lang.String
- */
- protected void deleteLaunchConfigurations() {
- if (getServerType() == null)
- return;
- ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
- ILaunchConfigurationType launchConfigType = ((ServerType) getServerType()).getLaunchConfigurationType();
-
- ILaunchConfiguration[] configs = null;
- try {
- configs = launchManager.getLaunchConfigurations(launchConfigType);
- int size = configs.length;
- for (int i = 0; i < size; i++) {
- try {
- if (getId().equals(configs[i].getAttribute(SERVER_ID, (String) null)))
- configs[i].delete();
- } catch (Exception e) {
- // ignore
- }
- }
- } catch (Exception e) {
- // ignore
- }
- }
-
- /**
- * Returns true if the server is in a state that it can
- * be restarted.
- *
- * @return boolean
- */
- public boolean canRestart(String mode2) {
- /*ServerDelegate delegate2 = getDelegate();
- if (!(delegate2 instanceof IStartableServer))
- return false;*/
- if (!getServerType().supportsLaunchMode(mode2))
- return false;
-
- int state = getServerState();
- return (state == STATE_STARTED);
- }
-
- /**
- * Returns the current restart state of the server. This
- * implementation will always return false when the server
- * is stopped.
- *
- * @return boolean
- */
- public boolean getServerRestartState() {
- if (getServerState() == STATE_STOPPED)
- return false;
- return serverRestartNeeded;
- }
-
- /**
- * Sets the server restart state.
- *
- * @param state boolean
- */
- public synchronized void setServerRestartState(boolean state) {
- if (state == serverRestartNeeded)
- return;
- serverRestartNeeded = state;
- fireRestartStateChangeEvent();
- }
-
- /**
- * Restart the server with the given debug mode.
- * A server may only be restarted when it is currently running.
- * This method is asynchronous.
- */
- public void restart(final String mode2) {
- if (getServerState() == STATE_STOPPED)
- return;
-
- Trace.trace(Trace.FINEST, "Restarting server: " + getName());
-
- try {
- try {
- getBehaviourDelegate().restart(mode2);
- return;
- } catch (CoreException ce) {
- Trace.trace(Trace.SEVERE, "Error calling delegate restart() " + toString());
- }
-
- // add listener to start it as soon as it is stopped
- addServerListener(new ServerAdapter() {
- public void serverStateChange(IServer server) {
- if (server.getServerState() == STATE_STOPPED) {
- server.removeServerListener(this);
-
- // restart in a quarter second (give other listeners a chance
- // to hear the stopped message)
- Thread t = new Thread() {
- public void run() {
- try {
- Thread.sleep(250);
- } catch (Exception e) {
- // ignore
- }
- try {
- Server.this.start(mode2, new NullProgressMonitor());
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error while restarting server", e);
- }
- }
- };
- t.setDaemon(true);
- t.setPriority(Thread.NORM_PRIORITY - 2);
- t.start();
- }
- }
- });
-
- // stop the server
- stop(false);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error restarting server", e);
- }
- }
-
-
- /**
- * Returns true if the server is in a state that it can
- * be stopped.
- *
- * @return boolean
- */
- public boolean canStop() {
- if (getServerState() == STATE_STOPPED)
- return false;
-
- return true;
- }
-
- /**
- * Stop the server if it is running.
- */
- public void stop(boolean force) {
- if (getServerState() == STATE_STOPPED)
- return;
-
- Trace.trace(Trace.FINEST, "Stopping server: " + toString());
-
- try {
- getBehaviourDelegate().stop(force);
- } catch (Throwable t) {
- Trace.trace(Trace.SEVERE, "Error calling delegate stop() " + toString(), t);
- }
- }
-
- /**
- * Start the server in the given start mode and waits until the server
- * has finished started.
- *
- * @param mode java.lang.String
- * @param monitor org.eclipse.core.runtime.IProgressMonitor
- * @exception org.eclipse.core.runtime.CoreException - thrown if an error occurs while trying to start the server
- */
- public void synchronousStart(String mode2, IProgressMonitor monitor) throws CoreException {
- Trace.trace(Trace.FINEST, "synchronousStart 1");
- final Object mutex = new Object();
-
- // add listener to the server
- IServerListener listener = new ServerAdapter() {
- public void serverStateChange(IServer server) {
- int state = server.getServerState();
- if (state == IServer.STATE_STARTED || state == IServer.STATE_STOPPED) {
- // notify waiter
- synchronized (mutex) {
- try {
- Trace.trace(Trace.FINEST, "synchronousStart notify");
- mutex.notifyAll();
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error notifying server start", e);
- }
- }
- }
- }
- };
- addServerListener(listener);
-
- class Timer {
- boolean timeout;
- boolean alreadyDone;
- }
- final Timer timer = new Timer();
-
- Thread thread = new Thread() {
- public void run() {
- try {
- Thread.sleep(120000);
- if (!timer.alreadyDone) {
- timer.timeout = true;
- // notify waiter
- synchronized (mutex) {
- Trace.trace(Trace.FINEST, "synchronousStart notify timeout");
- mutex.notifyAll();
- }
- }
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error notifying server start timeout", e);
- }
- }
- };
- thread.setDaemon(true);
- thread.start();
-
- Trace.trace(Trace.FINEST, "synchronousStart 2");
-
- // start the server
- try {
- start(mode2, monitor);
- } catch (CoreException e) {
- removeServerListener(listener);
- throw e;
- }
-
- Trace.trace(Trace.FINEST, "synchronousStart 3");
-
- // wait for it! wait for it! ...
- synchronized (mutex) {
- try {
- while (!timer.timeout && !(getServerState() == IServer.STATE_STARTED || getServerState() == IServer.STATE_STOPPED))
- mutex.wait();
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error waiting for server start", e);
- }
- }
- removeServerListener(listener);
-
- if (timer.timeout)
- throw new CoreException(new Status(IStatus.ERROR, ServerPlugin.PLUGIN_ID, 0, ServerPlugin.getResource("%errorStartFailed", getName()), null));
- timer.alreadyDone = true;
-
- if (getServerState() == IServer.STATE_STOPPED)
- throw new CoreException(new Status(IStatus.ERROR, ServerPlugin.PLUGIN_ID, 0, ServerPlugin.getResource("%errorStartFailed", getName()), null));
-
- Trace.trace(Trace.FINEST, "synchronousStart 4");
- }
-
- /*
- * @see IServer#synchronousRestart(String, IProgressMonitor)
- */
- public void synchronousRestart(String mode2, IProgressMonitor monitor) throws CoreException {
- // TODO: synchronousRestart
- }
-
- /*
- * @see IServer#synchronousStop()
- */
- public void synchronousStop() {
- if (getServerState() == IServer.STATE_STOPPED)
- return;
-
- final Object mutex = new Object();
-
- // add listener to the server
- IServerListener listener = new ServerAdapter() {
- public void serverStateChange(IServer server) {
- int state = server.getServerState();
- if (Server.this == server && state == IServer.STATE_STOPPED) {
- // notify waiter
- synchronized (mutex) {
- try {
- mutex.notifyAll();
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error notifying server stop", e);
- }
- }
- }
- }
- };
- addServerListener(listener);
-
- class Timer {
- boolean timeout;
- boolean alreadyDone;
- }
- final Timer timer = new Timer();
-
- Thread thread = new Thread() {
- public void run() {
- try {
- Thread.sleep(120000);
- if (!timer.alreadyDone) {
- timer.timeout = true;
- // notify waiter
- synchronized (mutex) {
- Trace.trace(Trace.FINEST, "stop notify timeout");
- mutex.notifyAll();
- }
- }
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error notifying server stop timeout", e);
- }
- }
- };
- thread.setDaemon(true);
- thread.start();
-
- // stop the server
- stop(false);
-
- // wait for it! wait for it!
- synchronized (mutex) {
- try {
- while (!timer.timeout && getServerState() != IServer.STATE_STOPPED)
- mutex.wait();
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error waiting for server stop", e);
- }
- }
- removeServerListener(listener);
-
- /*
- //can't throw exceptions
- if (timer.timeout)
- throw new CoreException(new Status(IStatus.ERROR, ServerCore.PLUGIN_ID, 0, ServerPlugin.getResource("%errorStartFailed", getName()), null));
- else
- timer.alreadyDone = true;
-
- if (getServerState() == IServer.STATE_STOPPED)
- throw new CoreException(new Status(IStatus.ERROR, ServerCore.PLUGIN_ID, 0, ServerPlugin.getResource("%errorStartFailed", getName()), null));*/
- }
-
- /**
- * Trigger a restart of the given module and wait until it has finished restarting.
- *
- * @param module org.eclipse.wst.server.core.IModule
- * @param monitor org.eclipse.core.runtime.IProgressMonitor
- * @exception org.eclipse.core.runtime.CoreException - thrown if an error occurs while trying to restart the module
- */
- public void synchronousRestartModule(final IModule module, IProgressMonitor monitor) throws CoreException {
- Trace.trace(Trace.FINEST, "synchronousModuleRestart 1");
-
- final Object mutex = new Object();
-
- // add listener to the module
- IServerListener listener = new ServerAdapter() {
- public void moduleStateChange(IServer server) {
- int state = server.getModuleState(module);
- if (state == IServer.STATE_STARTED || state == IServer.STATE_STOPPED) {
- // notify waiter
- synchronized (mutex) {
- try {
- Trace.trace(Trace.FINEST, "synchronousModuleRestart notify");
- mutex.notifyAll();
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error notifying module restart", e);
- }
- }
- }
- }
- };
- addServerListener(listener);
-
- // make sure it times out after 30s
- class Timer {
- boolean timeout;
- boolean alreadyDone;
- }
- final Timer timer = new Timer();
-
- Thread thread = new Thread() {
- public void run() {
- try {
- Thread.sleep(30000);
- if (!timer.alreadyDone) {
- timer.timeout = true;
- // notify waiter
- synchronized (mutex) {
- Trace.trace(Trace.FINEST, "synchronousModuleRestart notify timeout");
- mutex.notifyAll();
- }
- }
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error notifying module restart timeout", e);
- }
- }
- };
- thread.setDaemon(true);
- thread.start();
-
- Trace.trace(Trace.FINEST, "synchronousModuleRestart 2");
-
- // restart the module
- try {
- getBehaviourDelegate().restartModule(module, monitor);
- } catch (CoreException e) {
- removeServerListener(listener);
- throw e;
- }
-
- Trace.trace(Trace.FINEST, "synchronousModuleRestart 3");
-
- // wait for it! wait for it! ...
- synchronized (mutex) {
- try {
- while (!timer.timeout && !(getModuleState(module) == IServer.STATE_STARTED || getModuleState(module) == IServer.STATE_STOPPED))
- mutex.wait();
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error waiting for server start", e);
- }
- }
- removeServerListener(listener);
- if (timer.timeout)
- throw new CoreException(new Status(IStatus.ERROR, ServerPlugin.PLUGIN_ID, 0, ServerPlugin.getResource("%errorModuleRestartFailed", getName()), null));
- timer.alreadyDone = true;
-
- if (getModuleState(module) == IServer.STATE_STOPPED)
- throw new CoreException(new Status(IStatus.ERROR, ServerPlugin.PLUGIN_ID, 0, ServerPlugin.getResource("%errorModuleRestartFailed", getName()), null));
-
- Trace.trace(Trace.FINEST, "synchronousModuleRestart 4");
- }
-
- public IPath getTempDirectory() {
- return ServerPlugin.getInstance().getTempDirectory(getId());
- }
-
- protected String getXMLRoot() {
- return "server";
- }
-
- protected void loadState(IMemento memento) {
- /*String serverTypeId = memento.getString("server-type-id");
- serverType = ServerCore.getServerType(serverTypeId);
-
- String runtimeId = memento.getString("runtime-id");
- runtime = ServerCore.getResourceManager().getRuntime(runtimeId);
-
- String configurationId = memento.getString("configuration-id");
- configuration = ServerCore.getResourceManager().getServerConfiguration(configurationId);*/
- resolve();
- }
-
- protected void resolve() {
- IServerType oldServerType = serverType;
- String serverTypeId = getAttribute("server-type-id", (String)null);
- if (serverTypeId != null)
- serverType = ServerCore.findServerType(serverTypeId);
- else
- serverType = null;
- if (serverType != null && !serverType.equals(oldServerType))
- serverState = ((ServerType)serverType).getInitialState();
-
- String runtimeId = getAttribute(RUNTIME_ID, (String)null);
- if (runtimeId != null)
- runtime = ServerCore.findRuntime(runtimeId);
-
- String configPath = getAttribute(CONFIGURATION_ID, (String)null);
- configuration = null;
- if (configPath != null)
- configuration = ResourcesPlugin.getWorkspace().getRoot().getFolder(new Path(configPath));
- }
-
- protected void setInternal(ServerWorkingCopy wc) {
- map = wc.map;
- configuration = wc.configuration;
- runtime = wc.runtime;
- serverSyncState = wc.serverSyncState;
- //restartNeeded = wc.restartNeeded;
- serverType = wc.serverType;
-
- // can never modify the following properties via the working copy
- //serverState = wc.serverState;
- delegate = wc.delegate;
- }
-
- protected void saveState(IMemento memento) {
- if (serverType != null)
- memento.putString("server-type", serverType.getId());
-
- if (configuration != null)
- memento.putString(CONFIGURATION_ID, configuration.getFullPath().toString());
- else
- memento.putString(CONFIGURATION_ID, null);
-
- if (runtime != null)
- memento.putString(RUNTIME_ID, runtime.getId());
- else
- memento.putString(RUNTIME_ID, null);
- }
-
- /*public void updateConfiguration() {
- try {
- getDelegate(null).updateConfiguration();
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error calling delegate updateConfiguration() " + toString(), e);
- }
- }*/
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.IServerConfiguration#canModifyModule(org.eclipse.wst.server.core.model.IModule)
- */
- public IStatus canModifyModules(IModule[] add, IModule[] remove, IProgressMonitor monitor) {
- try {
- return getDelegate().canModifyModules(add, remove);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error calling delegate canModifyModules() " + toString(), e);
- return null;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.IServer#getModules()
- */
- public IModule[] getModules(IProgressMonitor monitor) {
- try {
- return getDelegate().getModules();
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error calling delegate getModules() " + toString(), e);
- return new IModule[0];
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.IServer#getModuleState()
- */
- public int getModuleState(IModule module) {
- try {
- Integer in = (Integer) moduleState.get(module.getId());
- if (in != null)
- return in.intValue();
- } catch (Exception e) {
- // ignore
- }
- return STATE_UNKNOWN;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.IServer#getModuleState()
- */
- public int getModulePublishState(IModule module) {
- try {
- Integer in = (Integer) modulePublishState.get(module.getId());
- if (in != null)
- return in.intValue();
- } catch (Exception e) {
- // ignore
- }
- return PUBLISH_STATE_UNKNOWN;
- }
-
- /*
- * @see IServer#getChildModule(IModule)
- */
- public IModule[] getChildModules(IModule module, IProgressMonitor monitor) {
- try {
- return getDelegate().getChildModules(module);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error calling delegate getChildModules() " + toString(), e);
- return null;
- }
- }
-
- /*
- * @see IServer#getParentModules(IModule)
- */
- public IModule[] getParentModules(IModule module, IProgressMonitor monitor) throws CoreException {
- try {
- return getDelegate().getParentModules(module);
- } catch (CoreException se) {
- //Trace.trace(Trace.FINER, "CoreException calling delegate getParentModules() " + toString() + ": " + se.getMessage());
- throw se;
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error calling delegate getParentModules() " + toString(), e);
- return null;
- }
- }
-
- /*
- *
- */
- /*public boolean hasRuntime() {
- try {
- return getDelegate().requiresRuntime();
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error calling delegate requiresRuntime() " + toString(), e);
- return false;
- }
- }*/
-
- /**
- * Returns whether the given module can be restarted.
- *
- * @param module the module
- * @return <code>true</code> if the given module can be
- * restarted, and <code>false</code> otherwise
- */
- public boolean canRestartModule(IModule module) {
- try {
- return getBehaviourDelegate().canRestartModule(module);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error calling delegate canRestartRuntime() " + toString(), e);
- return false;
- }
- }
-
- /**
- * Check if the given module is in sync on the server. It should
- * return true if the module should be restarted (is out of
- * sync) or false if the module does not need to be restarted.
- *
- * @param module org.eclipse.wst.server.core.model.IModule
- * @return boolean
- */
- public boolean getModuleRestartState(IModule module) {
- try {
- Boolean b = (Boolean) moduleRestartState.get(module.getId());
- if (b != null)
- return b.booleanValue();
- } catch (Exception e) {
- // ignore
- }
- return false;
- }
-
- /*
- * @see IServer#restartModule(IModule, IProgressMonitor)
- */
- public void restartModule(IModule module, IProgressMonitor monitor) throws CoreException {
- try {
- getBehaviourDelegate().restartModule(module, monitor);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error calling delegate restartModule() " + toString(), e);
- }
- }
-
- /**
- * Returns an array of IServerPorts that this server has.
- *
- * @return
- */
- public IServerPort[] getServerPorts() {
- try {
- return getDelegate().getServerPorts();
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error calling delegate getServerPorts() " + toString(), e);
- return null;
- }
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerListener.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerListener.java
deleted file mode 100644
index 27e7714..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerListener.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal;
-
-import org.eclipse.wst.server.core.*;
-import org.eclipse.wst.server.core.util.ServerLifecycleAdapter;
-/**
- * Listens for messages from the servers. This class keeps
- * track of server instances current state and any clients
- * that are waiting to run on the server.
- */
-public class ServerListener extends ServerLifecycleAdapter implements IServerListener {
- // static instance
- protected static ServerListener listener;
-
- /**
- * ServerListener constructor comment.
- */
- private ServerListener() {
- super();
- }
-
- /**
- * Get the static instance.
- *
- * @return org.eclipse.wst.server.core.internal.plugin.ServerListener
- */
- public static ServerListener getInstance() {
- if (listener == null)
- listener = new ServerListener();
- return listener;
- }
-
- /**
- * Called when the server configuration's sync state changes.
- *
- * @param server org.eclipse.wst.server.model.IServer
- */
- public void configurationSyncStateChange(IServer server) {
- // do nothing
- }
-
- /**
- * Notification when the server state has changed.
- *
- * @param server org.eclipse.wst.server.model.IServer
- */
- public void serverStateChange(IServer server) {
- // do nothing
- }
-
- /**
- * Notification when the server state has changed.
- *
- * @param server org.eclipse.wst.server.model.IServer
- */
- public void modulesChanged(IServer server) {
- // do nothing
- }
-
- /**
- * Notification when the state of a module has changed.
- *
- * @param server org.eclipse.wst.server.model.IServer
- */
- public void moduleStateChange(IServer server, IModule module) {
- // do nothing
- }
-
- /**
- * Called when the server isRestartNeeded() property changes.
- *
- * @param instance org.eclipse.wst.server.core.model.IServer
- */
- public void restartStateChange(IServer server) {
- /*if (server.isRestartNeeded() == false)
- return;
-
- byte state = server.getServerState();
- if (state != IServer2.STATE_STARTED && state != IServer2.STATE_STARTED_DEBUG && state != IServer.STATE_STARTED_PROFILE)
- return;
-
- if (ServerCore.getServerPreferences().isAutoRestarting()) {
- try {
- server.restart();
- } catch (CoreException e) {
- Trace.trace(Trace.SEVERE, "Error restarting server", e);
- }
- }*/
- }
-
- /**
- * A new resource has been added.
- *
- * @param event org.eclipse.wst.server.core.model.IServerResource
- */
- public void serverAdded(IServer server) {
- server.addServerListener(this);
- }
-
- /**
- * A existing resource has been removed.
- *
- * @param event org.eclipse.wst.server.core.model.IServerResource
- */
- public void serverRemoved(IServer server) {
- server.removeServerListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.IPublishListener#moduleStateChange(org.eclipse.wst.server.core.IServer2, java.util.List, org.eclipse.wst.server.core.model.IModule)
- */
- public void moduleStateChange(IServer server, IModule[] parents, IModule module) {
- // do nothing
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerMonitor.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerMonitor.java
deleted file mode 100644
index e9c289e..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerMonitor.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.IServerPort;
-import org.eclipse.wst.server.core.model.ServerMonitorDelegate;
-/**
- *
- */
-public class ServerMonitor implements IServerMonitor {
- private IConfigurationElement element;
- private ServerMonitorDelegate delegate;
-
- /**
- * Monitor constructor comment.
- */
- public ServerMonitor(IConfigurationElement element) {
- super();
- this.element = element;
- }
-
- /**
- * Returns the id of this default server.
- *
- * @return java.lang.String
- */
- public String getId() {
- return element.getAttribute("id");
- }
-
- /*
- * @see IMonitor#getDescription()
- */
- public String getDescription() {
- return element.getAttribute("description");
- }
-
- /*
- * @see IMonitor#getLabel()
- */
- public String getName() {
- String label = element.getAttribute("name");
- if (label == null)
- return "n/a";
- return label;
- }
-
- /*
- * @see IMonitor#getDelegate()
- */
- public ServerMonitorDelegate getDelegate() {
- if (delegate == null) {
- try {
- delegate = (ServerMonitorDelegate) element.createExecutableExtension("class");
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Could not create delegate" + toString() + ": " + e.getMessage());
- }
- }
- return delegate;
- }
-
- /**
- * Start monitoring the given port, and return the port number to
- * tunnel requests through.
- * @param port
- * @return
- */
- public int startMonitoring(IServer server, IServerPort port, int monitorPort) throws CoreException {
- try {
- return getDelegate().startMonitoring(server, port, monitorPort);
- } catch (CoreException ce) {
- throw ce;
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error calling delegate " + toString() + ": " + e.getMessage());
- return -1;
- }
- }
-
- /**
- * Stop monitoring the given port.
- * @param port
- */
- public void stopMonitoring(IServer server, IServerPort port) {
- try {
- getDelegate().stopMonitoring(server, port);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error calling delegate " + toString() + ": " + e.getMessage());
- }
- }
-
- /**
- * Return a string representation of this object.
- *
- * @return java.lang.String
- */
- public String toString() {
- return "Monitor[" + getId() + "]";
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerMonitorManager.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerMonitorManager.java
deleted file mode 100644
index 3b98c91..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerMonitorManager.java
+++ /dev/null
@@ -1,365 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal;
-
-import java.util.*;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.wst.server.core.*;
-/**
- *
- */
-public class ServerMonitorManager implements IServerMonitorManager {
- private static final String MONITOR_DATA_FILE = "monitors.xml";
-
- protected static ServerMonitorManager instance;
-
- protected List ports = new ArrayList();
- protected ServerMonitor monitor;
-
- class MonitoredPort implements IMonitoredServerPort {
- protected IServer server;
- protected IServerPort port;
- protected int newPort = -1;
- protected String[] content;
- public boolean started;
-
- public MonitoredPort(IServer server, IServerPort port, int newPort, String[] content) {
- this.server = server;
- this.port = port;
- this.newPort = newPort;
- this.content = content;
- }
-
- public MonitoredPort(IMemento memento, IProgressMonitor monitor) {
- load(memento, monitor);
- }
-
- public IServer getServer() {
- return server;
- }
-
- public IServerPort getServerPort() {
- return port;
- }
-
- public int getMonitorPort() {
- return newPort;
- }
-
- public void setMonitorPort(int p) {
- newPort = p;
- }
-
- public String[] getContentTypes() {
- return content;
- }
-
- public boolean isStarted() {
- return started;
- }
-
- protected void setStarted(boolean s) {
- started = s;
- }
-
- public boolean equals(Object obj) {
- if (!(obj instanceof MonitoredPort))
- return false;
- MonitoredPort mp = (MonitoredPort) obj;
- if (!mp.server.equals(server))
- return false;
- if (!mp.port.equals(port))
- return false;
- if (newPort != mp.newPort)
- return false;
- if (content == null && mp.content != null)
- return false;
- if (content != null && mp.content == null)
- return false;
- if (content != null) {
- int size = content.length;
- if (size != mp.content.length)
- return false;
- for (int i = 0; i < size; i++)
- if (!content[i].equals(mp.content[i]))
- return false;
- }
- return true;
- }
-
- protected boolean canSave() {
- return (port.getId() != null);
- }
-
- protected void save(IMemento memento) {
- memento.putString("serverId", server.getId());
- if (newPort != -1)
- memento.putString("port", newPort + "");
- memento.putString("portId", port.getId());
- memento.putBoolean("started", started);
-
- if (content != null) {
- StringBuffer sb = new StringBuffer();
- int size = content.length;
- for (int i = 0; i < size; i++) {
- if (i > 0)
- sb.append(",");
- sb.append(content[i]);
- }
- memento.putString("contentTypes", sb.toString());
- }
- }
-
- protected void load(IMemento memento, IProgressMonitor monitor2) {
- String serverId = memento.getString("serverId");
- server = null;
- if (serverId != null)
- server = ServerCore.findServer(serverId);
- if (server == null)
- throw new RuntimeException("Server could not be found: " + serverId + " " + server);
- String newPortStr = memento.getString("port");
- if (newPortStr != null && newPortStr.length() > 0)
- newPort = Integer.parseInt(newPortStr);
- String portId = memento.getString("portId");
-
- IServerPort[] ports2 = server.getServerPorts();
- if (ports2 != null) {
- int size = ports2.length;
- for (int i = 0; port == null && i < size; i++) {
- IServerPort sp = ports2[i];
- if (sp.getId() != null && sp.getId().equals(portId))
- port = sp;
- }
- }
- if (port == null)
- throw new RuntimeException("Could not relocate port: " + serverId + " " + server + " " + portId);
-
- String s = memento.getString("contentTypes");
- if (s != null)
- content = ServerPlugin.tokenize(s, ",");
-
- Boolean b = memento.getBoolean("started");
- if (b != null && b.booleanValue()) {
- try {
- newPort = monitor.startMonitoring(server, port, newPort);
- started = true;
- } catch (CoreException e) {
- Trace.trace(Trace.WARNING, "Could not restart server monitor", e);
- }
- }
- }
- }
-
- public ServerMonitorManager() {
- IServerMonitor[] monitors = ServerCore.getServerMonitors();
- if (monitors != null && monitors.length > 0)
- monitor = (ServerMonitor) monitors[0];
-
- instance = this;
- loadMonitors();
- }
-
- public static ServerMonitorManager getInstance() {
- if (instance == null)
- new ServerMonitorManager();
- return instance;
- }
-
- public static void shutdown() {
- if (instance == null)
- return;
- instance.saveMonitors();
- }
-
- /**
- * Returns the monitor that is currently being used.
- *
- * @return
- */
- public IServerMonitor getCurrentServerMonitor() {
- return monitor;
- }
-
- /**
- * Switch to use a different server monitor. All existing monitors will be
- * removed from the current monitor and added to the new monitor.
- *
- * @param newMonitor
- * @throws org.eclipse.core.runtime.CoreException
- */
- public void setServerMonitor(IServerMonitor newMonitor) throws CoreException {
- throw new CoreException(new Status(IStatus.ERROR, ServerPlugin.PLUGIN_ID, 0, "Not implemented yet", null));
- }
-
- /**
- * Returns the list of ports that are currently being monitored.
- *
- * @return
- */
- public IMonitoredServerPort[] getMonitoredPorts(IServer server) {
- List list = new ArrayList();
- Iterator iterator = ports.iterator();
- while (iterator.hasNext()) {
- MonitoredPort mp = (MonitoredPort) iterator.next();
- if (mp.server.equals(server))
- list.add(mp);
- }
-
- IMonitoredServerPort[] msp = new IMonitoredServerPort[list.size()];
- list.toArray(msp);
- return msp;
- }
-
- /**
- * Starts monitoring the given port, and returns the new port # to use that will
- * route to the monitored port.
- *
- * @param port
- * @return
- * @throws org.eclipse.core.runtime.CoreException
- */
- public IMonitoredServerPort createMonitor(IServer server, IServerPort port, int monitorPort, String[] content) {
- if (port == null || monitor == null)
- return null;
-
- MonitoredPort mp = new MonitoredPort(server, port, monitorPort, content);
- ports.add(mp);
- return mp;
- }
-
- /**
- * Stop monitoring the given port. Throws a CoreException if there was a problem
- * stopping the monitoring
- *
- * @param port
- * @throws org.eclipse.core.runtime.CoreException
- */
- public void removeMonitor(IMonitoredServerPort port) {
- if (port == null)
- return;
-
- try {
- ports.remove(port);
- if (port.isStarted())
- monitor.stopMonitoring(port.getServer(), port.getServerPort());
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Could not remove monitor", e);
- }
- }
-
- /**
- * Start the monitor. If the msp port is -1, it will be updated to the port that is actually in use.
- *
- * @param port
- * @throws CoreException
- */
- public void startMonitor(IMonitoredServerPort msp) throws CoreException {
- if (msp == null || msp.isStarted())
- return;
-
- MonitoredPort port = (MonitoredPort) msp;
- port.setMonitorPort(monitor.startMonitoring(msp.getServer(), msp.getServerPort(), msp.getMonitorPort()));
- port.setStarted(true);
- }
-
- /**
- * Stop monitoring.
- *
- * @param port
- */
- public void stopMonitor(IMonitoredServerPort msp) {
- if (msp == null || !msp.isStarted())
- return;
- MonitoredPort port = (MonitoredPort) msp;
- monitor.stopMonitoring(msp.getServer(), msp.getServerPort());
- port.setStarted(false);
- }
-
- /**
- * Returns the mapped port to use when making requests to the given server
- * and port number. Returns the existing port number if the port is not being
- * monitored.
- *
- * @param port
- * @return
- */
- public int getMonitoredPort(IServer server, int port, String content) {
- try {
- Iterator iterator = ports.iterator();
- while (iterator.hasNext()) {
- MonitoredPort mp = (MonitoredPort) iterator.next();
- if (mp.isStarted() && mp.server.equals(server) && mp.port.getPort() == port) {
- String[] contentTypes = mp.getContentTypes();
- boolean found = false;
- if (content == null || contentTypes != null) {
- int size = contentTypes.length;
- for (int i = 0; i < size; i++)
- if (content.equals(contentTypes[i]))
- found = true;
- } else
- found = true;
- if (found && mp.newPort != -1)
- return mp.newPort;
- }
- }
- } catch (Exception e) {
- // ignore
- }
- return port;
- }
-
- protected void saveMonitors() {
- String filename = ServerPlugin.getInstance().getStateLocation().append(MONITOR_DATA_FILE).toOSString();
- try {
- XMLMemento memento = XMLMemento.createWriteRoot("monitors");
-
- Iterator iterator = ports.iterator();
- while (iterator.hasNext()) {
- MonitoredPort mp = (MonitoredPort) iterator.next();
- if (mp.canSave()) {
- IMemento child = memento.createChild("monitor");
- mp.save(child);
- }
- }
-
- memento.saveToFile(filename);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error saving monitor info", e);
- }
- }
-
- protected void loadMonitors() {
- Trace.trace(Trace.FINEST, "Loading monitor info");
- String filename = ServerPlugin.getInstance().getStateLocation().append(MONITOR_DATA_FILE).toOSString();
-
- try {
- IMemento memento = XMLMemento.loadMemento(filename);
-
- IMemento[] children = memento.getChildren("monitor");
- int size = children.length;
-
- for (int i = 0; i < size; i++) {
- try {
- MonitoredPort mp = new MonitoredPort(children[i], null);
- ports.add(mp);
- } catch (Exception e) {
- Trace.trace(Trace.WARNING, "Could not load monitor: " + e);
- }
- }
- } catch (Exception e) {
- Trace.trace(Trace.WARNING, "Could not load monitor info: " + e.getMessage());
- }
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerPlugin.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerPlugin.java
deleted file mode 100644
index 39acea5..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerPlugin.java
+++ /dev/null
@@ -1,415 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal;
-
-import java.io.*;
-import java.util.*;
-import java.text.Collator;
-import java.text.DateFormat;
-import java.text.MessageFormat;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.util.*;
-import org.osgi.framework.BundleContext;
-/**
- * The main server plugin class.
- */
-public class ServerPlugin extends Plugin {
- public static final String PROJECT_PREF_FILE = ".serverPreference";
-
- protected static final DateFormat df = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
- protected static int num = 0;
-
- // singleton instance of this class
- private static ServerPlugin singleton;
-
- private static final String TEMP_DATA_FILE = "tmp-data.xml";
-
- class TempDir {
- String path;
- int age;
- }
-
- // temp directories - String key to TempDir
- protected Map tempDirHash;
-
- /**
- * server core plugin id
- */
- public static final String PLUGIN_ID = "org.eclipse.wst.server.core";
-
- /**
- * Create the ServerPlugin.
- */
- public ServerPlugin() {
- super();
- singleton = this;
- }
-
- /**
- * Returns the singleton instance of this plugin.
- *
- * @return org.eclipse.wst.server.core.internal.plugin.ServerPlugin
- */
- public static ServerPlugin getInstance() {
- return singleton;
- }
-
- /**
- * Returns the translated String found with the given key.
- *
- * @param key java.lang.String
- * @return java.lang.String
- */
- public static String getResource(String key) {
- try {
- return Platform.getResourceString(getInstance().getBundle(), key);
- } catch (Exception e) {
- return key;
- }
- }
-
- /**
- * Returns the translated String found with the given key,
- * and formatted with the given arguments using java.text.MessageFormat.
- *
- * @param key java.lang.String
- * @param arguments java.lang.Object[]
- * @return java.lang.String
- */
- public static String getResource(String key, Object[] arguments) {
- try {
- String text = getResource(key);
- return MessageFormat.format(text, arguments);
- } catch (Exception e) {
- return key;
- }
- }
-
- /**
- * Returns the translated String found with the given key,
- * and formatted with the given arguments using java.text.MessageFormat.
- *
- * @param key java.lang.String
- * @param arguments java.lang.Object[]
- * @return java.lang.String
- */
- public static String getResource(String key, String arg) {
- return getResource(key, new String[] { arg });
- }
-
- /**
- * Returns a temporary directory that the requestor can use
- * throughout it's lifecycle. This is primary to be used by
- * server instances for working directories, instance specific
- * files, etc.
- *
- * <p>As long as the same key is used to call this method on
- * each use of the workbench, this method directory will return
- * the same directory. If the directory is not requested over a
- * period of time, the directory may be deleted and a new one
- * will be assigned on the next request. For this reason, a
- * server instance should request the temp directory on startup
- * if it wants to store files there. In all cases, the instance
- * should have a backup plan anyway, as this directory may be
- * deleted accidentally.</p>
- *
- * @param key
- * @return java.io.File
- */
- public IPath getTempDirectory(String key) {
- if (key == null)
- return null;
-
- // first, look through hash of current directories
- IPath statePath = ServerPlugin.getInstance().getStateLocation();
- try {
- TempDir dir = (TempDir) tempDirHash.get(key);
- if (dir != null) {
- dir.age = 0;
- return statePath.append(dir.path);
- }
- } catch (Exception e) {
- // ignore
- }
-
- // otherwise, create a new directory
-
- // find first free directory
- String path = null;
- File dir = null;
- int count = 0;
- while (dir == null || dir.exists()) {
- path = "tmp" + count;
- dir = statePath.append(path).toFile();
- count ++;
- }
-
- dir.mkdirs();
-
- TempDir d = new TempDir();
- d.path = path;
- tempDirHash.put(key, d);
- saveTempDirInfo();
- return statePath.append(path);
- }
-
- /**
- * Remove a temp directory.
- * @param key
- */
- public void removeTempDirectory(String key, IProgressMonitor monitor) {
- if (key == null)
- return;
-
- IPath statePath = ServerPlugin.getInstance().getStateLocation();
- try {
- TempDir dir = (TempDir) tempDirHash.get(key);
- if (dir != null) {
- tempDirHash.remove(key);
- saveTempDirInfo();
- FileUtil.deleteDirectory(statePath.append(dir.path).toFile(), monitor);
- }
- } catch (Exception e) {
- Trace.trace(Trace.WARNING, "Could not remove temp directory", e);
- }
- }
-
- /**
- * Load the temporary directory information.
- */
- private void loadTempDirInfo() {
- Trace.trace(Trace.FINEST, "Loading temporary directory information");
- IPath statePath = ServerPlugin.getInstance().getStateLocation();
- String filename = statePath.append(TEMP_DATA_FILE).toOSString();
-
- tempDirHash = new HashMap();
- try {
- IMemento memento = XMLMemento.loadMemento(filename);
-
- IMemento[] children = memento.getChildren("temp-directory");
- int size = children.length;
- for (int i = 0; i < size; i++) {
- String key = children[i].getString("key");
-
- TempDir d = new TempDir();
- d.path = children[i].getString("path");
- d.age = children[i].getInteger("age").intValue();
- d.age++;
-
- tempDirHash.put(key, d);
- }
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Could not load temporary directory information: " + e.getMessage());
- }
- }
-
- /**
- * Convenience method for logging.
- *
- * @param status org.eclipse.core.runtime.IStatus
- */
- public static void log(IStatus status) {
- getInstance().getLog().log(status);
- }
-
- /**
- * Save the temporary directory information.
- */
- private void saveTempDirInfo() {
- // save remaining directories
- IPath statePath = ServerPlugin.getInstance().getStateLocation();
- String filename = statePath.append(TEMP_DATA_FILE).toOSString();
-
- try {
- XMLMemento memento = XMLMemento.createWriteRoot("temp-directories");
-
- Iterator iterator = tempDirHash.keySet().iterator();
- while (iterator.hasNext()) {
- String key = (String) iterator.next();
- TempDir d = (TempDir) tempDirHash.get(key);
-
- if (d.age < 5) {
- IMemento child = memento.createChild("temp-directory");
- child.putString("key", key);
- child.putString("path", d.path);
- child.putInteger("age", d.age);
- } else {
- FileUtil.deleteDirectory(statePath.append(d.path).toFile(), new NullProgressMonitor());
- }
- }
-
- memento.saveToFile(filename);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Could not save temporary directory information", e);
- }
- }
-
- protected void initializeDefaultPluginPreferences() {
- ServerPreferences.getServerPreferences().setDefaults();
- }
-
- /**
- * Start up this plug-in.
- */
- public void start(BundleContext context) throws Exception {
- Trace.trace(Trace.CONFIG, "----->----- Server Core plugin startup ----->-----");
- super.start(context);
-
- initializeDefaultPluginPreferences();
-
- // load temp directory information
- loadTempDirInfo();
- }
-
- /**
- * Shuts down this plug-in and saves all plug-in state.
- */
- public void stop(BundleContext context) throws Exception {
- Trace.trace(Trace.CONFIG, "-----<----- Server Core plugin shutdown -----<-----");
- super.stop(context);
-
- ResourceManager.shutdown();
- ServerMonitorManager.shutdown();
- }
-
- /**
- * Sort the given runtimes into alphabetical order. This
- * method modifies the original list, but returns the value
- * for convenience.
- *
- * @param list java.util.List
- * @return java.util.List
- */
- public static List sortRuntimeList(List list) {
- if (list == null)
- return null;
-
- Collator collator = Collator.getInstance();
-
- int size = list.size();
- for (int i = 0; i < size - 1; i++) {
- for (int j = i + 1; j < size; j++) {
- IRuntime a = (IRuntime) list.get(i);
- IRuntime b = (IRuntime) list.get(j);
- if (collator.compare(a.getName(), b.getName()) > 0) {
- Object temp = a;
- list.set(i, b);
- list.set(j, temp);
- }
- }
- }
- return list;
- }
-
- /**
- * Sort the given servers into alphabetical order. This
- * method modifies the original list, but returns the value
- * for convenience.
- *
- * @param list java.util.List
- * @return java.util.List
- */
- public static List sortServerList(List list) {
- if (list == null)
- return null;
-
- Collator collator = Collator.getInstance();
-
- int size = list.size();
- for (int i = 0; i < size - 1; i++) {
- for (int j = i + 1; j < size; j++) {
- IServer a = (IServer) list.get(i);
- IServer b = (IServer) list.get(j);
- if (collator.compare(a.getName(), b.getName()) > 0) {
- Object temp = a;
- list.set(i, b);
- list.set(j, temp);
- }
- }
- }
- return list;
- }
-
- public static String[] tokenize(String param, String delim) {
- if (param == null)
- return new String[0];
-
- List list = new ArrayList();
-
- StringTokenizer st = new StringTokenizer(param, delim);
- while (st.hasMoreTokens()) {
- String str = st.nextToken();
- if (str != null && str.length() > 0)
- list.add(str.trim());
- }
-
- String[] s = new String[list.size()];
- list.toArray(s);
- return s;
- }
-
- protected static List getModuleTypes(IConfigurationElement[] elements) {
- List list = new ArrayList();
- if (elements == null)
- return list;
-
- int size = elements.length;
- for (int i = 0; i < size; i++) {
- String[] types = tokenize(elements[i].getAttribute("types"), ",");
- String[] versions = tokenize(elements[i].getAttribute("versions"), ",");
- int sizeT = types.length;
- int sizeV = versions.length;
- for (int j = 0; j < sizeT; j++) {
- for (int k = 0; k < sizeV; k++) {
- ModuleType module = new ModuleType(types[j], versions[k]);
- list.add(module);
- }
- }
- }
- return list;
- }
-
- public static String generateId() {
- String s = df.format(new Date()).toString() + num++;
- s = s.replace(' ', '_');
- s = s.replace(':', '_');
- s = s.replace('/', '_');
- s = s.replace('\\', '_');
- return s;
- }
-
- /**
- * Returns true if ids contains id.
- * @param ids
- * @param id
- * @return
- */
- public static boolean supportsType(String[] ids, String id) {
- if (id == null || id.length() == 0)
- return false;
-
- if (ids == null)
- return true;
-
- int size = ids.length;
- for (int i = 0; i < size; i++) {
- if (ids[i].endsWith("*")) {
- if (id.length() >= ids[i].length() && id.startsWith(ids[i].substring(0, ids[i].length() - 1)))
- return true;
- } else if (id.equals(ids[i]))
- return true;
- }
- return false;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerPreferences.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerPreferences.java
deleted file mode 100644
index 37876cf..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerPreferences.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal;
-
-import org.eclipse.core.runtime.*;
-
-import org.eclipse.wst.server.core.*;
-/**
- * Helper class that stores preference information for server tools.
- */
-public class ServerPreferences implements IServerPreferences {
- private static final String PREF_AUTO_RESTART = "auto-restart";
- private static final String PREF_AUTO_PUBLISH = "auto-publish";
- //private static final String PREF_AUTO_REPAIR_MODULES = "auto-repair-modules";
- private static final String PREF_CREATE_IN_WORKSPACE = "create-workspace";
- private static final String PREF_STARTUP_TIMEOUT = "start-timeout";
- private static final String PREF_RESTART_MODULE_TIMEOUT = "restart-module-timeout";
- private static final String PREF_MODULE_START_TIMEOUT = "module-start-timeout";
-
- public static final String DEFAULT_PUBLISH_MANAGER = "org.eclipse.wst.server.core.publish.smart";
-
- private Preferences preferences;
-
- protected static ServerPreferences instance;
-
- /**
- * ServerPreference constructor comment.
- */
- private ServerPreferences() {
- super();
- preferences = ServerPlugin.getInstance().getPluginPreferences();
- }
-
- public static ServerPreferences getServerPreferences() {
- if (instance == null)
- instance = new ServerPreferences();
- return instance;
- }
-
- /**
- * Returns whether servers will be automatically restarted when
- * required.
- *
- * @return boolean
- */
- public boolean isAutoRestarting() {
- return preferences.getBoolean(PREF_AUTO_RESTART);
- }
-
- /**
- * Returns whether servers will be automatically restarted when
- * required.
- *
- * @return boolean
- */
- public boolean isDefaultAutoRestarting() {
- return false;
- }
-
- /**
- * Returns whether publishing should occur before starting the
- * server.
- *
- * @return boolean
- */
- public boolean isAutoPublishing() {
- return preferences.getBoolean(PREF_AUTO_PUBLISH);
- }
-
- /**
- * Returns whether publishing should occur before starting the
- * server.
- *
- * @return boolean
- */
- public boolean isDefaultAutoPublishing() {
- return true;
- }
-
- /**
- * Returns whether servers and configurations should be created in the
- * workspace (as opposed to in metadata).
- *
- * @return boolean
- */
- public boolean isCreateResourcesInWorkspace() {
- return preferences.getBoolean(PREF_CREATE_IN_WORKSPACE);
- }
-
- /**
- * Returns whether servers and configurations should be created in the
- * workspace (as opposed to in metadata) by default.
- *
- * @return boolean
- */
- public boolean isDefaultCreateResourcesInWorkspace() {
- return false;
- }
-
- /**
- * Set whether servers and configurations should be created in the
- * workspace (as opposed to in metadata).
- *
- * @param boolean
- */
- public void setCreateResourcesInWorkspace(boolean b) {
- preferences.setValue(PREF_CREATE_IN_WORKSPACE, b);
- ServerPlugin.getInstance().savePluginPreferences();
- }
-
- /**
- * Set whether servers will be automatically restarted when
- * they need a restart.
- *
- * @param boolean
- */
- public void setAutoRestarting(boolean value) {
- preferences.setValue(PREF_AUTO_RESTART, value);
- ServerPlugin.getInstance().savePluginPreferences();
- }
-
- /**
- * Set whether publishing should happen before the server starts.
- *
- * @param boolean
- */
- public void setAutoPublishing(boolean value) {
- preferences.setValue(PREF_AUTO_PUBLISH, value);
- ServerPlugin.getInstance().savePluginPreferences();
- }
-
- public int getStartupTimeout() {
- return preferences.getInt(PREF_STARTUP_TIMEOUT);
- }
-
- public int getRestartModuleTimeout() {
- return preferences.getInt(PREF_RESTART_MODULE_TIMEOUT);
- }
-
- public int getModuleStartTimeout() {
- return preferences.getInt(PREF_MODULE_START_TIMEOUT);
- }
-
- public void setDefaults() {
- preferences.setDefault(PREF_AUTO_PUBLISH, isDefaultAutoPublishing());
- preferences.setDefault(PREF_AUTO_RESTART, isDefaultAutoRestarting());
- //preferences.setDefault(PREF_AUTO_REPAIR_MODULES, getDefaultModuleRepairStatus());
- preferences.setDefault(PREF_STARTUP_TIMEOUT, 210001);
- preferences.setDefault(PREF_RESTART_MODULE_TIMEOUT, 120001);
- preferences.setDefault(PREF_MODULE_START_TIMEOUT, 300001);
- boolean save = false;
- if (preferences.isDefault(PREF_STARTUP_TIMEOUT)) {
- preferences.setValue(PREF_STARTUP_TIMEOUT, 210000);
- save = true;
- }
- if (preferences.isDefault(PREF_RESTART_MODULE_TIMEOUT)) {
- preferences.setValue(PREF_RESTART_MODULE_TIMEOUT, 120000);
- save = true;
- } if (preferences.isDefault(PREF_MODULE_START_TIMEOUT)) {
- preferences.setValue(PREF_MODULE_START_TIMEOUT, 300000);
- save = true;
- }
- if (save)
- ServerPlugin.getInstance().savePluginPreferences();
- }
-}
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerTask.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerTask.java
deleted file mode 100644
index 10fd1a2..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerTask.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal;
-
-import java.util.List;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-
-import org.eclipse.wst.server.core.*;
-import org.eclipse.wst.server.core.model.*;
-/**
- *
- */
-public class ServerTask implements IServerTask {
- private IConfigurationElement element;
- private ServerTaskDelegate delegate;
-
- /**
- * ServerTask constructor comment.
- */
- public ServerTask(IConfigurationElement element) {
- super();
- this.element = element;
- }
-
- /*
- * @see
- */
- public String getId() {
- return element.getAttribute("id");
- }
-
- /*
- * @see
- */
- protected String[] getTypeIds() {
- try {
- return ServerPlugin.tokenize(element.getAttribute("typeIds"), ",");
- } catch (Exception e) {
- return null;
- }
- }
-
- /*
- * @see
- */
- public boolean supportsType(String id) {
- return ServerPlugin.supportsType(getTypeIds(), id);
- }
-
- /*
- * @see IServerTask#getDelegate()
- */
- public ServerTaskDelegate getDelegate() {
- if (delegate == null) {
- try {
- delegate = (ServerTaskDelegate) element.createExecutableExtension("class");
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Could not create delegate" + toString() + ": " + e.getMessage());
- }
- }
- return delegate;
- }
-
- /*
- * @see
- */
- public IOptionalTask[] getTasks(IServer server, List[] parents, IModule[] modules) {
- try {
- Trace.trace(Trace.FINEST, "Task.init " + this);
- return getDelegate().getTasks(server, parents, modules);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error calling delegate " + toString() + ": " + e.getMessage());
- }
- return new IOptionalTask[0];
- }
-
- /**
- * Return a string representation of this object.
- *
- * @return java.lang.String
- */
- public String toString() {
- return "ServerTask[" + getId() + "]";
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerType.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerType.java
deleted file mode 100644
index 1a4e288..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerType.java
+++ /dev/null
@@ -1,276 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchManager;
-
-import org.eclipse.wst.server.core.*;
-/**
- *
- */
-public class ServerType implements IServerType, IOrdered {
- protected IConfigurationElement element;
-
- /**
- * ServerType constructor comment.
- */
- public ServerType(IConfigurationElement element) {
- super();
- this.element = element;
- }
-
- protected IConfigurationElement getElement() {
- return element;
- }
-
- /**
- * Returns the id of this factory.
- *
- * @return java.lang.String
- */
- public String getId() {
- return element.getAttribute("id");
- }
-
- public String getName() {
- return element.getAttribute("name");
- }
-
- public String getDescription() {
- return element.getAttribute("description");
- }
-
- public IRuntimeType getRuntimeType() {
- String typeId = element.getAttribute("runtimeTypeId");
- if (typeId == null)
- return null;
- return ServerCore.findRuntimeType(typeId);
- }
-
- public boolean hasRuntime() {
- String s = element.getAttribute("runtime");
- return "true".equals(s);
- }
-
- /**
- * Returns the order.
- *
- * @return int
- */
- public int getOrder() {
- try {
- String o = element.getAttribute("order");
- return Integer.parseInt(o);
- } catch (NumberFormatException e) {
- return -1;
- }
- }
-
- protected ILaunchConfigurationType getLaunchConfigurationType() {
- String launchConfigId = element.getAttribute("launchConfigId");
- if (launchConfigId == null)
- return null;
- ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
- return launchManager.getLaunchConfigurationType(launchConfigId);
- }
-
- /**
- * Returns true if this server can start or may already be started
- * in the given mode, and false if not. Uses the launchMode attribute,
- * which may contain the strings "run", "debug", and/or "profile".
- *
- * @param launchMode String
- * @return boolean
- */
- public boolean supportsLaunchMode(String launchMode) {
- ILaunchConfigurationType configType = getLaunchConfigurationType();
- if (configType == null) {
- String mode = element.getAttribute("launchModes");
- if (mode == null)
- return false;
- return mode.indexOf(launchMode) >= 0;
- }
- return configType.supportsMode(launchMode);
- }
-
- /*public IServerConfigurationType getServerConfigurationType() {
- String configurationTypeId = element.getAttribute("configurationTypeId");
- return ServerCore.findServerConfigurationType(configurationTypeId);
- }*/
-
- public boolean supportsRemoteHosts() {
- String hosts = element.getAttribute("supportsRemoteHosts");
- return (hosts != null && hosts.toLowerCase().equals("true"));
- }
-
- public byte getInitialState() {
- String stateString = element.getAttribute("initialState");
- if (stateString != null)
- stateString = stateString.toLowerCase();
- if ("stopped".equals(stateString))
- return IServer.STATE_STOPPED;
- else if ("started".equals(stateString))
- return IServer.STATE_STARTED;
- return IServer.STATE_UNKNOWN;
- }
-
- public int getServerStateSet() {
- String stateSet = element.getAttribute("stateSet");
- if (stateSet == null)
- return SERVER_STATE_SET_MANAGED;
- else if (stateSet.toLowerCase().indexOf("attach") >= 0)
- return SERVER_STATE_SET_ATTACHED;
- else if (stateSet.toLowerCase().indexOf("publish") >= 0)
- return SERVER_STATE_SET_PUBLISHED;
- else
- return SERVER_STATE_SET_MANAGED;
- }
-
- public boolean hasServerConfiguration() {
- return ("true".equalsIgnoreCase(element.getAttribute("hasConfiguration")));
- }
-
- public IServerWorkingCopy createServer(String id, IFile file, IRuntime runtime, IProgressMonitor monitor) {
- if (id == null || id.length() == 0)
- id = ServerPlugin.generateId();
- ServerWorkingCopy swc = new ServerWorkingCopy(id, file, runtime, this);
- swc.setDefaults(monitor);
- return swc;
- }
-
- public IServerWorkingCopy createServer(String id, IFile file, IProgressMonitor monitor) throws CoreException {
- if (id == null || id.length() == 0)
- id = ServerPlugin.generateId();
-
- IRuntime runtime = null;
- if (hasRuntime()) {
- // look for existing runtime
- IRuntimeType runtimeType = getRuntimeType();
- IRuntime[] runtimes = ServerUtil.getRuntimes(runtimeType);
- if (runtimes != null && runtimes.length > 0)
- runtime = runtimes[0];
- else {
- // create runtime
- try {
- IRuntimeWorkingCopy runtimeWC = runtimeType.createRuntime(id + "-runtime", monitor);
- ServerUtil.setRuntimeDefaultName(runtimeWC);
- runtime = runtimeWC;
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Couldn't create runtime", e);
- }
- }
- }
-
- ServerWorkingCopy swc = new ServerWorkingCopy(id, file, runtime, this);
- ServerUtil.setServerDefaultName(swc);
- if (runtime != null)
- swc.setRuntime(runtime);
-
- if (swc.getServerType().hasServerConfiguration()) {
- // TODO: config
- ((Server)swc).importConfiguration(runtime, null);
- IFolder folder = getServerProject().getFolder(swc.getName() + "-config");
- swc.setServerConfiguration(folder);
- }
-
- //TODO: import server config
- /* IServerConfigurationWorkingCopy config = null;
- if (hasServerConfiguration()) {
- if (runtime != null)
- config = getServerConfigurationType().importFromRuntime(id + "-config", file, runtime, monitor);
- if (config == null)
- config = getServerConfigurationType().createServerConfiguration(id + "-config", file, monitor);
- ServerUtil.setServerConfigurationDefaultName(config);
- if (config != null)
- swc.setServerConfiguration(config);
- }*/
-
- swc.setDefaults(monitor);
-
- return swc;
- }
-
- public static IProject getServerProject() {
- IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- if (projects != null) {
- int size = projects.length;
- for (int i = 0; i < size; i++) {
- if (ServerCore.getProjectProperties(projects[i]).isServerProject())
- return projects[i];
- }
- }
-
- String s = findUnusedServerProjectName();
- return ResourcesPlugin.getWorkspace().getRoot().getProject(s);
- }
-
- /**
- * Finds an unused project name to use as a server project.
- *
- * @return java.lang.String
- */
- protected static String findUnusedServerProjectName() {
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- String name = ServerPlugin.getResource("%defaultServerProjectName", "");
- int count = 1;
- while (root.getProject(name).exists()) {
- name = ServerPlugin.getResource("%defaultServerProjectName", ++count + "");
- }
- return name;
- }
-
- /**
- * Return the timeout (in ms) that should be used to wait for the server to start.
- * Returns -1 if there is no timeout.
- *
- * @return
- */
- public int getStartTimeout() {
- try {
- return Integer.parseInt(element.getAttribute("startTimeout"));
- } catch (NumberFormatException e) {
- return -1;
- }
- }
-
- /**
- * Return the timeout (in ms) to wait before assuming that the server
- * has failed to stop. Returns -1 if there is no timeout.
- *
- * @return
- */
- public int getStopTimeout() {
- try {
- return Integer.parseInt(element.getAttribute("stopTimeout"));
- } catch (NumberFormatException e) {
- return -1;
- }
- }
-
- /**
- * Return a string representation of this object.
- *
- * @return java.lang.String
- */
- public String toString() {
- return "ServerType[" + getId() + "]";
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerWorkingCopy.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerWorkingCopy.java
deleted file mode 100644
index da4ac8f..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ServerWorkingCopy.java
+++ /dev/null
@@ -1,316 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal;
-
-import java.beans.PropertyChangeListener;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.wst.server.core.*;
-import org.eclipse.wst.server.core.model.ServerDelegate;
-/**
- *
- */
-public class ServerWorkingCopy extends Server implements IServerWorkingCopy {
- protected Server server;
- protected WorkingCopyHelper wch;
-
- protected ServerDelegate workingCopyDelegate;
-
- // working copy
- public ServerWorkingCopy(Server server) {
- super(server.getFile());
- this.server = server;
-
- map = new HashMap(server.map);
- wch = new WorkingCopyHelper(this);
- resolve();
- }
-
- // creation
- public ServerWorkingCopy(String id, IFile file, IRuntime runtime, IServerType serverType) {
- super(id, file, runtime, serverType);
- //server = this;
- wch = new WorkingCopyHelper(this);
- wch.setDirty(true);
- serverState = ((ServerType)serverType).getInitialState();
- }
-
- public boolean isWorkingCopy() {
- return true;
- }
-
- public IServer getOriginal() {
- return server;
- }
-
- public IServerWorkingCopy createWorkingCopy() {
- return this;
- }
-
- public int getServerState() {
- if (server != null)
- return server.getServerState();
- return serverState;
- }
-
- public void setServerState(byte state) {
- if (server != null)
- server.setServerState(state);
- else
- super.setServerState(state);
- }
-
- public void setAttribute(String attributeName, int value) {
- wch.setAttribute(attributeName, value);
- }
-
- public void setAttribute(String attributeName, boolean value) {
- wch.setAttribute(attributeName, value);
- }
-
- public void setAttribute(String attributeName, String value) {
- wch.setAttribute(attributeName, value);
- }
-
- public void setAttribute(String attributeName, List value) {
- wch.setAttribute(attributeName, value);
- }
-
- public void setAttribute(String attributeName, Map value) {
- wch.setAttribute(attributeName, value);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.IServerWorkingCopy#setName(java.lang.String)
- */
- public void setName(String name) {
- setAttribute(PROP_NAME, name);
- }
-
- public void setLocked(boolean b) {
- setAttribute(PROP_LOCKED, b);
- }
-
- public void setPrivate(boolean b) {
- setAttribute(PROP_PRIVATE, b);
- }
-
- public void setHost(String host) {
- setAttribute(PROP_HOSTNAME, host);
- }
-
- public void setServerConfiguration(IFolder config) {
- this.configuration = config;
- if (configuration == null)
- setAttribute(CONFIGURATION_ID, (String)null);
- else
- setAttribute(CONFIGURATION_ID, configuration.getFullPath().toString());
- }
-
- public void setFile(IFile file) {
- this.file = file;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.IServerWorkingCopy#isDirty()
- */
- public boolean isDirty() {
- return wch.isDirty();
- }
-
- public ServerDelegate getWorkingCopyDelegate(IProgressMonitor monitor) {
- // make sure that the regular delegate is loaded
- //getDelegate();
-
- if (workingCopyDelegate != null)
- return workingCopyDelegate;
-
- if (serverType != null) {
- synchronized (this) {
- if (workingCopyDelegate == null) {
- try {
- long time = System.currentTimeMillis();
- IConfigurationElement element = ((ServerType) serverType).getElement();
- workingCopyDelegate = (ServerDelegate) element.createExecutableExtension("class");
- workingCopyDelegate.initialize(this);
- Trace.trace(Trace.PERFORMANCE, "ServerWorkingCopy.getWorkingCopyDelegate(): <" + (System.currentTimeMillis() - time) + "> " + getServerType().getId());
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Could not create delegate " + toString(), e);
- }
- }
- }
- }
- return workingCopyDelegate;
- }
-
- public void dispose() {
- super.dispose();
- if (workingCopyDelegate != null)
- workingCopyDelegate.dispose();
- }
-
- public IServer save(boolean force, IProgressMonitor monitor) throws CoreException {
- monitor = ProgressUtil.getMonitorFor(monitor);
- monitor.subTask(ServerPlugin.getResource("%savingTask", getName()));
-
- if (!force)
- wch.validateTimestamp(getOriginal());
-
- if (server == null) {
- server = new Server(file);
- server.setServerState(serverState);
- server.publishListeners = publishListeners;
- server.serverListeners = serverListeners;
- }
-
- server.setInternal(this);
- server.doSave(monitor);
- if (getServerType().hasServerConfiguration()) {
- IFolder folder = getServerConfiguration();
- if (folder != null) {
- IProject project = folder.getProject();
- if (project != null && !project.exists()) {
- project.create(null);
- project.open(null);
- ServerCore.getProjectProperties(project).setServerProject(true, monitor);
- }
- if (!folder.exists())
- folder.create(IResource.FORCE, true, null);
- }
- }
- //ResourcesPlugin.getWorkspace().getRoot().g
- getDelegate().saveConfiguration(monitor);
- wch.setDirty(false);
-
- return server;
- }
-
- public IServer saveAll(boolean force, IProgressMonitor monitor) throws CoreException {
- if (runtime != null && runtime.isWorkingCopy()) {
- IRuntimeWorkingCopy wc = (IRuntimeWorkingCopy) runtime;
- wc.save(force, monitor);
- }
-
- return save(force, monitor);
- }
-
- /**
- * Add a property change listener to this server.
- *
- * @param listener java.beans.PropertyChangeListener
- */
- public void addPropertyChangeListener(PropertyChangeListener listener) {
- wch.addPropertyChangeListener(listener);
- }
-
- /**
- * Remove a property change listener from this server.
- *
- * @param listener java.beans.PropertyChangeListener
- */
- public void removePropertyChangeListener(PropertyChangeListener listener) {
- wch.removePropertyChangeListener(listener);
- }
-
- /**
- * Fire a property change event.
- */
- public void firePropertyChangeEvent(String propertyName, Object oldValue, Object newValue) {
- wch.firePropertyChangeEvent(propertyName, oldValue, newValue);
- }
-
- public void addServerListener(IServerListener listener) {
- if (server != null)
- server.addServerListener(listener);
- else
- super.addServerListener(listener);
- }
-
- public void removeServerListener(IServerListener listener) {
- if (server != null)
- server.removeServerListener(listener);
- else
- super.removeServerListener(listener);
- }
-
- public void addPublishListener(IPublishListener listener) {
- if (server != null)
- server.addPublishListener(listener);
- else
- super.addPublishListener(listener);
- }
-
- public void removePublishListener(IPublishListener listener) {
- if (server != null)
- server.removePublishListener(listener);
- else
- super.removePublishListener(listener);
- }
-
- public void setRuntime(IRuntime runtime) {
- this.runtime = runtime;
- if (runtime != null)
- setAttribute(RUNTIME_ID, runtime.getId());
- else
- setAttribute(RUNTIME_ID, (String)null);
- }
-
- public void setRuntimeId(String runtimeId) {
- setAttribute(RUNTIME_ID, runtimeId);
- resolve();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.IServer#modifyModule(org.eclipse.wst.server.core.model.IModule)
- */
- public void modifyModules(IModule[] add, IModule[] remove, IProgressMonitor monitor) throws CoreException {
- int i = 0;
- while (getServerState() == IServer.STATE_UNKNOWN && i < 10) {
- try {
- Thread.sleep(1000);
- } catch (Exception e) {
- // ignore
- }
- i++;
- }
-
- try {
- monitor = ProgressUtil.getMonitorFor(monitor);
- monitor.subTask(ServerPlugin.getResource("%taskModifyModules"));
- getWorkingCopyDelegate(monitor).modifyModules(add, remove, monitor);
- wch.setDirty(true);
- } catch (CoreException ce) {
- throw ce;
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error calling delegate modifyModule() " + toString(), e);
- throw new CoreException(new Status(IStatus.ERROR, ServerPlugin.PLUGIN_ID, 0, e.getLocalizedMessage(), e));
- }
- }
-
- public void setDefaults(IProgressMonitor monitor) {
- try {
- getWorkingCopyDelegate(monitor).setDefaults();
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Error calling delegate setDefaults() " + toString(), e);
- }
- }
-
- public String toString() {
- return "ServerWorkingCopy " + getId();
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/Trace.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/Trace.java
deleted file mode 100644
index fe42a19..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/Trace.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal;
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-/**
- * Helper class to route trace output.
- */
-public class Trace {
- public static int CONFIG = 0;
- public static int INFO = 1;
- public static int WARNING = 2;
- public static int SEVERE = 3;
- public static int FINER = 4;
- public static int FINEST = 5;
-
- public static int RESOURCES = 6;
- public static int EXTENSION_POINT = 7;
- public static int LISTENERS = 8;
- public static int RUNTIME_TARGET = 9;
- public static int PERFORMANCE = 10;
-
- private static final String[] levelNames = new String[] {
- "CONFIG ", "INFO ", "WARNING ", "SEVERE ", "FINER ", "FINEST ",
- "RESOURCES", "EXTENSION", "LISTENERS", "TARGET ", "PERF "};
- private static final String spacer = " ";
-
- private static final SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yy HH:mm.ss.SSS");
-
- protected static int pluginLength = -1;
-
- /**
- * Trace constructor comment.
- */
- private Trace() {
- super();
- }
-
- /**
- * Trace the given text.
- *
- * @param s java.lang.String
- */
- public static void trace(int level, String s) {
- trace(level, s, null);
- }
-
- /**
- * Trace the given message and exception.
- *
- * @param s java.lang.String
- * @param t java.lang.Throwable
- */
- public static void trace(int level, String s, Throwable t) {
- trace(ServerPlugin.PLUGIN_ID, level, s, t);
- }
-
- /**
- * Trace the given message and exception.
- *
- * @param s java.lang.String
- * @param t java.lang.Throwable
- */
- public static void trace(String pluginId, int level, String s, Throwable t) {
- if (pluginId == null || s == null)
- return;
-
- if (!ServerPlugin.getInstance().isDebugging())
- return;
-
- StringBuffer sb = new StringBuffer(pluginId);
- if (pluginId.length() > pluginLength)
- pluginLength = pluginId.length();
- else if (pluginId.length() < pluginLength)
- sb.append(spacer.substring(0, pluginLength - pluginId.length()));
- sb.append(" ");
- sb.append(levelNames[level]);
- sb.append(" ");
- sb.append(sdf.format(new Date()));
- sb.append(" ");
- sb.append(s);
- //Platform.getDebugOption(ServerCore.PLUGIN_ID + "/" + "resources");
-
- System.out.println(sb.toString());
- if (t != null)
- t.printStackTrace();
- }
-
- /**
- * Trace the given text.
- *
- * @param s java.lang.String
- */
- public static void trace(String s) {
- trace(s, null);
- }
-
- /**
- * Trace the given message and exception.
- *
- * @param s java.lang.String
- * @param t java.lang.Throwable
- */
- public static void trace(String s, Throwable t) {
- trace(FINER, s, t);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/WorkingCopyHelper.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/WorkingCopyHelper.java
deleted file mode 100644
index 111c150..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/WorkingCopyHelper.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal;
-
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.wst.server.core.IElement;
-import org.eclipse.wst.server.core.IElementWorkingCopy;
-/**
- *
- */
-public class WorkingCopyHelper {
- protected Base base;
- protected boolean isDirty;
-
- // property change listeners
- private transient List propertyListeners;
-
- public WorkingCopyHelper(Base base) {
- this.base = base;
- }
-
- public void setAttribute(String attributeName, int value) {
- int current = base.getAttribute(attributeName, 0);
- if (current != 0 && current == value)
- return;
-
- isDirty = true;
- base.map.put(attributeName, Integer.toString(value));
- firePropertyChangeEvent(attributeName, new Integer(current), new Integer(value));
- }
-
- public void setAttribute(String attributeName, boolean value) {
- boolean current = base.getAttribute(attributeName, false);
-
- isDirty = true;
- base.map.put(attributeName, Boolean.toString(value));
- firePropertyChangeEvent(attributeName, new Boolean(current), new Boolean(value));
- }
-
- public void setAttribute(String attributeName, String value) {
- String current = base.getAttribute(attributeName, (String)null);
- if (current != null && current.equals(value))
- return;
-
- isDirty = true;
- if (value == null)
- base.map.remove(attributeName);
- else
- base.map.put(attributeName, value);
- firePropertyChangeEvent(attributeName, current, value);
- }
-
- public void setAttribute(String attributeName, List value) {
- List current = base.getAttribute(attributeName, (List)null);
- if (current != null && current.equals(value))
- return;
-
- isDirty = true;
- if (value == null)
- base.map.remove(attributeName);
- else
- base.map.put(attributeName, value);
- firePropertyChangeEvent(attributeName, current, value);
- }
-
- public void setAttribute(String attributeName, Map value) {
- Map current = base.getAttribute(attributeName, (Map)null);
- if (current != null && current.equals(value))
- return;
-
- isDirty = true;
- if (value == null)
- base.map.remove(attributeName);
- else
- base.map.put(attributeName, value);
- firePropertyChangeEvent(attributeName, current, value);
- }
-
- public void setName(String name) {
- setAttribute(Base.PROP_NAME, name);
- }
-
- public void setLocked(boolean b) {
- setAttribute(Base.PROP_LOCKED, b);
- }
-
- public void setPrivate(boolean b) {
- setAttribute(Base.PROP_PRIVATE, b);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.IServerWorkingCopy#isDirty()
- */
- public boolean isDirty() {
- return isDirty;
- }
-
- protected void validateTimestamp(IElement element) throws CoreException {
- if (element == null) // newly created
- return;
-
- if (base.getTimestamp() != element.getTimestamp())
- throw new CoreException(new Status(IStatus.ERROR, ServerPlugin.PLUGIN_ID, IElementWorkingCopy.TIMESTAMP_ERROR, ServerPlugin.getResource("%errorWorkingCopyTimestamp"), null));
- }
-
- /**
- * Add a property change listener to this server.
- *
- * @param listener java.beans.PropertyChangeListener
- */
- public void addPropertyChangeListener(PropertyChangeListener listener) {
- if (propertyListeners == null)
- propertyListeners = new ArrayList(2);
- propertyListeners.add(listener);
- }
-
- /**
- * Remove a property change listener from this server.
- *
- * @param listener java.beans.PropertyChangeListener
- */
- public void removePropertyChangeListener(PropertyChangeListener listener) {
- if (propertyListeners != null)
- propertyListeners.remove(listener);
- }
-
- /**
- * Fire a property change event.
- */
- public void firePropertyChangeEvent(String propertyName, Object oldValue, Object newValue) {
- if (propertyListeners == null)
- return;
-
- PropertyChangeEvent event = new PropertyChangeEvent(this, propertyName, oldValue, newValue);
- try {
- Iterator iterator = propertyListeners.iterator();
- while (iterator.hasNext()) {
- try {
- PropertyChangeListener listener = (PropertyChangeListener) iterator.next();
- listener.propertyChange(event);
- } catch (Exception e) {
- Trace.trace("Error firing property change event", e);
- }
- }
- } catch (Exception e) {
- Trace.trace("Error in property event", e);
- }
- }
-
- protected void setDirty(boolean dirty) {
- isDirty = dirty;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/XMLMemento.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/XMLMemento.java
deleted file mode 100644
index 547291c..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/XMLMemento.java
+++ /dev/null
@@ -1,453 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal;
-
-import java.io.*;
-import java.util.*;
-import java.net.URL;
-import org.w3c.dom.*;
-import org.xml.sax.*;
-
-import javax.xml.parsers.*;
-import javax.xml.transform.*;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-/**
- * A Memento is a class independent container for persistence
- * info. It is a reflection of 3 storage requirements.
- *
- * 1) We need the ability to persist an object and restore it.
- * 2) The class for an object may be absent. If so we would
- * like to skip the object and keep reading.
- * 3) The class for an object may change. If so the new class
- * should be able to read the old persistence info.
- *
- * We could ask the objects to serialize themselves into an
- * ObjectOutputStream, DataOutputStream, or Hashtable. However
- * all of these approaches fail to meet the second requirement.
- *
- * Memento supports binary persistance with a version ID.
- */
-public final class XMLMemento implements IMemento {
- private Document factory;
- private Element element;
-
- /**
- * Answer a memento for the document and element. For simplicity
- * you should use createReadRoot and createWriteRoot to create the initial
- * mementos on a document.
- */
- public XMLMemento(Document doc, Element el) {
- factory = doc;
- element = el;
- }
-
- /**
- * @see IMemento.
- */
- public IMemento createChild(String type) {
- Element child = factory.createElement(type);
- element.appendChild(child);
- return new XMLMemento(factory, child);
- }
-
- /**
- * @see IMemento.
- */
- public IMemento createChild(String type, String id) {
- Element child = factory.createElement(type);
- child.setAttribute(TAG_ID, id);
- element.appendChild(child);
- return new XMLMemento(factory, child);
- }
-
- /**
- * Create a Document from a Reader and answer a root memento for reading
- * a document.
- */
- protected static XMLMemento createReadRoot(Reader reader) {
- Document document = null;
- try {
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- DocumentBuilder parser = factory.newDocumentBuilder();
- document = parser.parse(new InputSource(reader));
- Node node = document.getFirstChild();
- if (node instanceof Element)
- return new XMLMemento(document, (Element) node);
- } catch (Exception e) {
- // ignore
- } finally {
- try {
- reader.close();
- } catch (Exception e) {
- // ignore
- }
- }
- return null;
- }
-
- /**
- * Answer a root memento for writing a document.
- */
- public static XMLMemento createWriteRoot(String type) {
- Document document;
- try {
- document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
- Element element = document.createElement(type);
- document.appendChild(element);
- return new XMLMemento(document, element);
- } catch (ParserConfigurationException e) {
- throw new Error(e);
- }
- }
-
- /**
- * @see IMemento.
- */
- public IMemento getChild(String type) {
- // Get the nodes.
- NodeList nodes = element.getChildNodes();
- int size = nodes.getLength();
- if (size == 0)
- return null;
-
- // Find the first node which is a child of this node.
- for (int nX = 0; nX < size; nX ++) {
- Node node = nodes.item(nX);
- if (node instanceof Element) {
- Element element2 = (Element)node;
- if (element2.getNodeName().equals(type))
- return new XMLMemento(factory, element2);
- }
- }
-
- // A child was not found.
- return null;
- }
-
- /**
- * @see IMemento.
- */
- public IMemento [] getChildren(String type) {
- // Get the nodes.
- NodeList nodes = element.getChildNodes();
- int size = nodes.getLength();
- if (size == 0)
- return new IMemento[0];
-
- // Extract each node with given type.
- ArrayList list = new ArrayList(size);
- for (int nX = 0; nX < size; nX ++) {
- Node node = nodes.item(nX);
- if (node instanceof Element) {
- Element element2 = (Element)node;
- if (element2.getNodeName().equals(type))
- list.add(element2);
- }
- }
-
- // Create a memento for each node.
- size = list.size();
- IMemento [] results = new IMemento[size];
- for (int x = 0; x < size; x ++) {
- results[x] = new XMLMemento(factory, (Element)list.get(x));
- }
- return results;
- }
-
- /**
- * Return the contents of this memento as a byte array.
- *
- * @return byte[]
- */
- public byte[] getContents() throws IOException {
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- save(out);
- return out.toByteArray();
- }
-
- /**
- * Returns an input stream for writing to the disk with a local locale.
- *
- * @return java.io.InputStream
- */
- public InputStream getInputStream() throws IOException {
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- save(out);
- return new ByteArrayInputStream(out.toByteArray());
- }
-
- /**
- * @see IMemento.
- */
- public Float getFloat(String key) {
- Attr attr = element.getAttributeNode(key);
- if (attr == null)
- return null;
- String strValue = attr.getValue();
- try {
- return new Float(strValue);
- } catch (NumberFormatException e) {
- return null;
- }
- }
-
- /**
- * @see IMemento.
- */
- public String getId() {
- return element.getAttribute(TAG_ID);
- }
-
- /**
- * @see IMemento.
- */
- public String getName() {
- return element.getNodeName();
- }
-
- /**
- * @see IMemento.
- */
- public Integer getInteger(String key) {
- Attr attr = element.getAttributeNode(key);
- if (attr == null)
- return null;
- String strValue = attr.getValue();
- try {
- return new Integer(strValue);
- } catch (NumberFormatException e) {
- return null;
- }
- }
-
- /**
- * @see IMemento.
- */
- public String getString(String key) {
- Attr attr = element.getAttributeNode(key);
- if (attr == null)
- return null;
- return attr.getValue();
- }
-
- public List getNames() {
- NamedNodeMap map = element.getAttributes();
- int size = map.getLength();
- List list = new ArrayList();
- for (int i = 0; i < size; i++) {
- Node node = map.item(i);
- String name = node.getNodeName();
- list.add(name);
- }
- return list;
- }
-
- /**
- * Loads a memento from the given filename.
- *
- * @param in java.io.InputStream
- * @return org.eclipse.ui.IMemento
- * @exception java.io.IOException
- */
- public static IMemento loadMemento(InputStream in) {
- return createReadRoot(new InputStreamReader(in));
- }
-
- /**
- * Loads a memento from the given filename.
- *
- * @param in java.io.InputStream
- * @return org.eclipse.ui.IMemento
- * @exception java.io.IOException
- */
- public static IMemento loadCorruptMemento(InputStream in) {
- Document document = null;
- try {
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- DocumentBuilder parser = factory.newDocumentBuilder();
- document = parser.parse(in);
- Node node = document.getFirstChild();
- if (node instanceof Element)
- return new XMLMemento(document, (Element) node);
- } catch (Exception e) {
- // ignore
- } finally {
- try {
- in.close();
- } catch (Exception e) {
- // ignore
- }
- }
- return null;
- }
-
- /**
- * Loads a memento from the given filename.
- *
- * @param filename java.lang.String
- * @return org.eclipse.ui.IMemento
- * @exception java.io.IOException
- */
- public static IMemento loadMemento(String filename) throws IOException {
- return XMLMemento.createReadRoot(new FileReader(filename));
- }
-
- /**
- * Loads a memento from the given filename.
- *
- * @param url java.net.URL
- * @return org.eclipse.ui.IMemento
- * @exception java.io.IOException
- */
- public static IMemento loadMemento(URL url) throws IOException {
- return XMLMemento.createReadRoot(new InputStreamReader(url.openStream()));
- }
-
- /**
- * @see IMemento.
- */
- private void putElement(Element element2) {
- NamedNodeMap nodeMap = element2.getAttributes();
- int size = nodeMap.getLength();
- for (int i = 0; i < size; i++){
- Attr attr = (Attr)nodeMap.item(i);
- putString(attr.getName(),attr.getValue());
- }
-
- NodeList nodes = element2.getChildNodes();
- size = nodes.getLength();
- for (int i = 0; i < size; i ++) {
- Node node = nodes.item(i);
- if (node instanceof Element) {
- XMLMemento child = (XMLMemento)createChild(node.getNodeName());
- child.putElement((Element)node);
- }
- }
- }
-
- /**
- * @see IMemento.
- */
- public void putFloat(String key, float f) {
- element.setAttribute(key, String.valueOf(f));
- }
-
- /**
- * @see IMemento.
- */
- public void putInteger(String key, int n) {
- element.setAttribute(key, String.valueOf(n));
- }
-
- /**
- * @see IMemento.
- */
- public void putMemento(IMemento memento) {
- XMLMemento xmlMemento = (XMLMemento) memento;
- putElement(xmlMemento.element);
- }
-
- /**
- * @see IMemento.
- */
- public void putString(String key, String value) {
- if (value == null)
- return;
- element.setAttribute(key, value);
- }
-
- /**
- * Save this Memento to a Writer.
- */
- public void save(Writer writer) throws IOException {
- Result result = new StreamResult(writer);
- Source source = new DOMSource(factory);
- try {
- Transformer transformer = TransformerFactory.newInstance().newTransformer();
- transformer.setOutputProperty(OutputKeys.INDENT, "yes");
- transformer.setOutputProperty(OutputKeys.METHOD, "xml");
- transformer.setOutputProperty("{http://xml.apache.org/xalan}indent-amount", "2");
- transformer.transform(source, result);
- } catch (Exception e) {
- throw (IOException) (new IOException().initCause(e));
- }
- }
-
- /**
- * Save this Memento to a Writer.
- */
- public void save(OutputStream os) throws IOException {
- Result result = new StreamResult(os);
- Source source = new DOMSource(factory);
- try {
- Transformer transformer = TransformerFactory.newInstance().newTransformer();
- transformer.setOutputProperty(OutputKeys.INDENT, "yes");
- transformer.setOutputProperty(OutputKeys.METHOD, "xml");
- transformer.setOutputProperty("{http://xml.apache.org/xalan}indent-amount", "2");
- transformer.transform(source, result);
- } catch (Exception e) {
- throw (IOException) (new IOException().initCause(e));
- }
- }
-
- /**
- * Saves the memento to the given file.
- *
- * @param filename java.lang.String
- * @exception java.io.IOException
- */
- public void saveToFile(String filename) throws IOException {
- Writer w = null;
- try {
- w = new FileWriter(filename);
- save(w);
- } catch (IOException e) {
- throw e;
- } catch (Exception e) {
- throw new IOException(e.getLocalizedMessage());
- } finally {
- if (w != null) {
- try {
- w.close();
- } catch (Exception e) {
- // ignore
- }
- }
- }
- }
-
- public String saveToString() throws IOException {
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- save(out);
- return out.toString("UTF-8");
- }
-
- /*
- * @see IMemento#getBoolean(String)
- */
- public Boolean getBoolean(String key) {
- Attr attr = element.getAttributeNode(key);
- if (attr == null)
- return null;
- String strValue = attr.getValue();
- if ("true".equalsIgnoreCase(strValue))
- return new Boolean(true);
- return new Boolean(false);
- }
-
- /*
- * @see IMemento#putBoolean(String, boolean)
- */
- public void putBoolean(String key, boolean value) {
- element.setAttribute(key, value ? "true" : "false");
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/operations/AddModuleOperation.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/operations/AddModuleOperation.java
deleted file mode 100644
index f7aacf5..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/operations/AddModuleOperation.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal.operations;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.wst.server.core.IModule;
-/**
- * Add module operation.
- */
-public class AddModuleOperation implements IServerOperation {
- private IModule module;
-
- public AddModuleOperation(IModule module) {
- this.module = module;
- }
-
- public IModule getModule() {
- return module;
- }
-
- public IStatus execute(IProgressMonitor monitor) throws CoreException {
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/operations/IServer.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/operations/IServer.java
deleted file mode 100644
index d79a11e..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/operations/IServer.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal.operations;
-
-import org.eclipse.core.runtime.IStatus;
-/**
- * A server.
- */
-public interface IServer {
- /**
- *
- */
- public boolean canOperate(IServerOperation[] operations);
-
- /**
- *
- * @param operation
- * @param state
- * @param synchronous
- * @return
- */
- public IStatus operate(IServerOperation[] operations, ServerState state, boolean synchronous);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/operations/IServerOperation.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/operations/IServerOperation.java
deleted file mode 100644
index 0b3f258..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/operations/IServerOperation.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal.operations;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-/**
- * A server operation.
- */
-public interface IServerOperation {
- /**
- *
- */
- public IStatus execute(IProgressMonitor monitor) throws CoreException;
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/operations/ModuleState.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/operations/ModuleState.java
deleted file mode 100644
index d870a50..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/operations/ModuleState.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal.operations;
-
-import org.eclipse.wst.server.core.IModule;
-/**
- * A module state.
- */
-public class ModuleState {
- private IModule module;
- private boolean publish;
- private int state;
-
- public ModuleState(IModule module, int state, boolean publish) {
- this.module = module;
- this.state = state;
- this.publish = publish;
- }
-
- public IModule getModule() {
- return module;
- }
-
- public int getState() {
- return state;
- }
-
- public boolean getPublish() {
- return publish;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/operations/NullOperation.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/operations/NullOperation.java
deleted file mode 100644
index 1fe6c59..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/operations/NullOperation.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal.operations;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-/**
- * Null operation.
- */
-public class NullOperation implements IServerOperation {
- public IStatus execute(IProgressMonitor monitor) throws CoreException {
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/operations/RemoveModuleOperation.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/operations/RemoveModuleOperation.java
deleted file mode 100644
index aa6a82a..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/operations/RemoveModuleOperation.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal.operations;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.wst.server.core.IModule;
-/**
- * Remove module operation.
- */
-public class RemoveModuleOperation implements IServerOperation {
- private IModule module;
-
- public RemoveModuleOperation(IModule module) {
- this.module = module;
- }
-
- public IModule getModule() {
- return module;
- }
-
- public IStatus execute(IProgressMonitor monitor) throws CoreException {
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/operations/ServerState.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/operations/ServerState.java
deleted file mode 100644
index 3de9c9b..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/operations/ServerState.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal.operations;
-
-import java.util.ArrayList;
-import java.util.List;
-/**
- * A server state.
- */
-public class ServerState {
- private int state;
- private boolean publish;
- private List moduleStates = new ArrayList(2);
-
- public ServerState(int state, boolean publish) {
- this.state = state;
- this.publish = publish;
- }
-
- public void addModuleState(ModuleState moduleState) {
- if (moduleStates.contains(moduleState))
- return;
- moduleStates.add(moduleState);
- }
-
- public int getState() {
- return state;
- }
-
- public boolean getPublish() {
- return publish;
- }
-
- public ModuleState[] getModuleStates() {
- ModuleState[] ms = new ModuleState[moduleStates.size()];
- moduleStates.toArray(ms);
- return ms;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/operations/StartServerOperation.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/operations/StartServerOperation.java
deleted file mode 100644
index f5f06dc..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/operations/StartServerOperation.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal.operations;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-/**
- * Start server operation.
- */
-public class StartServerOperation implements IServerOperation {
- public IStatus execute(IProgressMonitor monitor) throws CoreException {
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/operations/StopServerOperation.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/operations/StopServerOperation.java
deleted file mode 100644
index 762dc88..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/operations/StopServerOperation.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.internal.operations;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-/**
- * Start server operation.
- */
-public class StopServerOperation implements IServerOperation {
- public IStatus execute(IProgressMonitor monitor) throws CoreException {
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ClientDelegate.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ClientDelegate.java
deleted file mode 100644
index e31fc33..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ClientDelegate.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.model;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.wst.server.core.ILaunchable;
-import org.eclipse.wst.server.core.IServer;
-/**
- * A launchable client is a client side application or test harness that can
- * be launched (run) against a resource running on a server.
- * <p>
- * This abstract class is intended to be extended only by clients
- * to extend the <code>clients</code> extension point.
- * </p>
- */
-public abstract class ClientDelegate {
- /**
- * Returns true if this launchable can be run by this client.
- *
- * @param server
- * @param launchable
- * @param launchMode
- * @return
- */
- public abstract boolean supports(IServer server, ILaunchable launchable, String launchMode);
-
- /**
- * Opens or executes on the launchable.
- *
- * @param server
- * @param launchable
- * @param launchMode
- * @param launch
- * @return
- */
- public abstract IStatus launch(IServer server, ILaunchable launchable, String launchMode, ILaunch launch);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/IModuleEvent.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/IModuleEvent.java
deleted file mode 100644
index 06b5a84..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/IModuleEvent.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.model;
-
-import org.eclipse.wst.server.core.IModule;
-
-/**
- * An event fired when a module changes.
- */
-public interface IModuleEvent {
- /**
- * Returns the module that has been changed.
- *
- * @return org.eclipse.wst.server.core.model.IModule
- */
- public IModule getModule();
-
- /**
- * Returns true if this module's settings have changed.
- *
- * @return boolean
- */
- public boolean isChanged();
-
- /**
- * Returns any child modules that have been added.
- *
- * @return org.eclipse.wst.server.core.model.IModule[]
- */
- public IModule[] getAddedChildModules();
-
- /**
- * Returns any child modules that have been changed.
- *
- * @return org.eclipse.wst.server.core.model.IModule[]
- */
- public IModule[] getChangedChildModules();
-
- /**
- * Returns any child modules that have been removed.
- *
- * @return org.eclipse.wst.server.core.model.IModule[]
- */
- public IModule[] getRemovedChildModules();
-}
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/IModuleEventsListener.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/IModuleEventsListener.java
deleted file mode 100644
index af499d6..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/IModuleEventsListener.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.model;
-/**
- *
- */
-public interface IModuleEventsListener {
- /**
- * A module or factory has been changed as specified in the event.
- *
- * @param factoryEvent org.eclipse.wst.server.core.model.IModuleFactoryEvent[]
- * @param event org.eclipse.wst.server.core.model.IModuleEvent[]
- */
- public void moduleEvents(IModuleFactoryEvent[] factoryEvent, IModuleEvent[] event);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/IModuleFactoryEvent.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/IModuleFactoryEvent.java
deleted file mode 100644
index 141c4c1..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/IModuleFactoryEvent.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.model;
-
-import org.eclipse.wst.server.core.IModule;
-
-/**
- * An event fired when a module factory changes.
- */
-public interface IModuleFactoryEvent {
- /**
- * Returns the id of this factory.
- *
- * @return java.lang.String
- */
- public String getFactoryId();
-
- /**
- * Returns any modules that have been added.
- *
- * @return org.eclipse.wst.server.core.model.IModule[]
- */
- public IModule[] getAddedModules();
-
- /**
- * Returns any modules that have been removed.
- *
- * @return org.eclipse.wst.server.core.model.IModule[]
- */
- public IModule[] getRemovedModules();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/IModuleFactoryListener.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/IModuleFactoryListener.java
deleted file mode 100644
index 04e66b2..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/IModuleFactoryListener.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.model;
-/**
- *
- */
-public interface IModuleFactoryListener {
- /**
- * Fired when modules have been added or removed from this factory.
- *
- * @param event org.eclipse.wst.server.core.model.IModuleFactoryEvent
- */
- public void moduleFactoryChanged(IModuleFactoryEvent event);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/IModuleListener.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/IModuleListener.java
deleted file mode 100644
index d78090e..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/IModuleListener.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.model;
-/**
- *
- */
-public interface IModuleListener {
- /**
- * A module has been changed as specified in the event.
- *
- * @param event org.eclipse.wst.server.core.model.IModuleEvent
- */
- public void moduleChanged(IModuleEvent event);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/IRunningActionServer.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/IRunningActionServer.java
deleted file mode 100644
index 7364ec6..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/IRunningActionServer.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.model;
-/**
- * This interface is a tag for a server that should be running before calling
- * modifyModules(). It will be implemented by delegate classes of servers that
- * should be started before calling API.
- */
-public interface IRunningActionServer {
- // marker interface
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/IURLProvider.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/IURLProvider.java
deleted file mode 100644
index a920456..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/IURLProvider.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.model;
-
-import java.net.URL;
-
-import org.eclipse.wst.server.core.IModule;
-/**
- *
- */
-public interface IURLProvider {
- /**
- * Return the base URL of this module on the server. This method may return
- * null if this server does not have a valid configuration or does not contain
- * this module. Otherwise, it should return the base URL (e.g.
- * "http://localhost:8080/myProject") regardless of whether the server is
- * running or not. The returned URL should not end in a trailing slash.
- *
- * <p>If the module is null, the returned URL will just be to the root of
- * the server (e.g. "http://localhost:8080")</p>
- *
- * <p>If the module is not already added to the server, the method will return
- * as close an approximation as possible. (for instance, for a web project it
- * may use the project's context root, which may not be the same when deployed
- * to a server)</p>
- *
- * @param module com.ibm.etools.server.core.model.IModule
- * @return java.net.URL
- */
- public URL getModuleRootURL(IModule module);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/LaunchableAdapterDelegate.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/LaunchableAdapterDelegate.java
deleted file mode 100644
index de5b724..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/LaunchableAdapterDelegate.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.model;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.wst.server.core.ILaunchable;
-import org.eclipse.wst.server.core.IModuleArtifact;
-import org.eclipse.wst.server.core.IServer;
-/**
- * This interface, typically implemented by the server code, converts from
- * an IModuleArtifact to an ILaunchable.
- *
- * <p>This is the implementation of a launchableAdapter extension point.</p>
- */
-public abstract class LaunchableAdapterDelegate {
- /**
- * Returns a launchable object from this module object.
- *
- * @param server
- * @param moduleObject
- * @return
- * @exception
- */
- public abstract ILaunchable getLaunchable(IServer server, IModuleArtifact moduleObject) throws CoreException;
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ModuleArtifactAdapterDelegate.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ModuleArtifactAdapterDelegate.java
deleted file mode 100644
index e2129fc..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ModuleArtifactAdapterDelegate.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.model;
-
-import org.eclipse.wst.server.core.IModuleArtifact;
-/**
- * A module object adapter converts from some view's model
- * object into a module object that is recognized by the
- * server.
- *
- * <p>This is the implementation of a moduleObjectAdapter extension point.</p>
- */
-public abstract class ModuleArtifactAdapterDelegate {
- /**
- * Converts from a model object to an IModuleArtifact.
- *
- * @param obj
- * @return
- */
- public abstract IModuleArtifact getModuleObject(Object obj);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ModuleDelegate.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ModuleDelegate.java
deleted file mode 100644
index 746a11a..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ModuleDelegate.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.model;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.wst.server.core.IModule;
-/**
- * A module delegate provides a mechanism for discovering information
- * about individual modules. Modules are returned from module factory
- * delegates; their delegates are created when
- * ModuleFactoryDelegate.createModule() is called.
- * <p>
- * When the module needs to be given a delegate, the delegate class
- * specified for the module is instantiated with a 0-argument
- * constructor.
- * </p>
- * <p>
- * Module delegates may keep state in instance fields, but that state is
- * transient and will not be persisted across workbench sessions.
- * </p>
- * <p>
- * This interface is intended to be implemented by clients.
- * </p>
- * <p>
- * <it>Caveat: The server core API is still in an early form, and is
- * likely to change significantly before the initial release.</it>
- * </p>
- *
- * @see org.eclipse.wst.server.core.IModule
- * @see ModuleFactoryDelegate
- * @since 1.0
- */
-public abstract class ModuleDelegate {
- private IModule module;
-
- /**
- * Delegates must have a public 0-arg constructor.
- */
- public ModuleDelegate() {
- // do nothing
- }
-
- /**
- * Initializes this module delegate with its life-long module instance.
- * <p>
- * This method is called by the server core framework.
- * Clients should never call this method.
- * </p>
- *
- * @param newModule the module instance
- */
- public final void initialize(IModule newModule) {
- this.module = newModule;
- initialize();
- }
-
- /**
- * Initializes this module delegate. This method gives delegates a chance
- * to do their own initialization.
- * <p>
- * This method is called by the server core framework.
- * Clients should never call this method.
- * </p>
- */
- public void initialize() {
- // do nothing
- }
-
- /**
- * Returns the module that this module delegate corresponds to.
- *
- * @return the module
- */
- public IModule getModule() {
- return module;
- }
-
- /**
- * Validates this module instance. See the specification of
- * {@link IModule#validate()} for further details. Subclasses should
- * override and call super.validate() for basic validation.
- * <p>
- * This method is called by the web server core framework,
- * in response to a call to <code>IModule.validate()</code>.
- * Clients should never call this method.
- * </p>
- *
- * @return a status object with code <code>IStatus.OK</code> if this
- * runtime is valid, otherwise a status object indicating what is
- * wrong with it
- */
- public abstract IStatus validate();
-
- /**
- * Returns the child modules of this module.
- *
- * @return org.eclipse.wst.server.core.IModule[]
- */
- public abstract IModule[] getChildModules();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ModuleFactoryDelegate.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ModuleFactoryDelegate.java
deleted file mode 100644
index c6ae4e9..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ModuleFactoryDelegate.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.internal.Module;
-import org.eclipse.wst.server.core.internal.ModuleFactory;
-import org.eclipse.wst.server.core.internal.Trace;
-import org.eclipse.wst.server.core.util.ModuleFactoryEvent;
-/**
- * A module factory delegate provides a mechanism for discovering
- * modules. A module factory delegate is specified by the
- * <code>class</code> attribute of a <code>moduleFactories</code> extension.
- * <p>
- * When the module factory needs to be given a delegate, the delegate class
- * specified for the module factory is instantiated with a 0-argument
- * constructor.
- * </p>
- * <p>
- * Module factory delegates may keep state in instance fields, but that state is
- * transient and will not be persisted across workbench sessions.
- * </p>
- * <p>
- * This interface is intended to be implemented by clients.
- * </p>
- * <p>
- * <it>Caveat: The server core API is still in an early form, and is
- * likely to change significantly before the initial release.</it>
- * </p>
- *
- * @see org.eclipse.wst.server.core.IModule
- * @see ModuleDelegate
- * @since 1.0
- */
-public abstract class ModuleFactoryDelegate {
- // module factory listeners
- private transient List listeners;
-
- private ModuleFactory factory;
-
- /**
- * Delegates must have a public 0-arg constructor.
- */
- public ModuleFactoryDelegate() {
- // do nothing
- }
-
- /**
- * Initializes this module factory delegate with its life-long module
- * factory instance.
- * <p>
- * This method is called by the server core framework.
- * Clients should never call this method.
- * </p>
- *
- * @param newFactory the module factory instance
- */
- public final void initialize(ModuleFactory newFactory) {
- factory = newFactory;
- }
-
- /**
- * Returns the id of this factory.
- * Each factory has a distinct id, fixed for its lifetime. Ids are intended to
- * be used internally as keys; they are not intended to be shown to end users.
- *
- * @return the factory id
- */
- protected String getId() {
- return factory.getId();
- }
-
- /**
- * Creates a module instance with the given static information. This method is used
- * by module factory delegates to create module instances.
- *
- * @param id the module id
- * @param name the module name
- * @param type the module type id
- * @param version the module version id
- * @param project the project that the module is contained in
- * @return a module instance
- */
- public IModule createModule(String id, String name, String type, String version, IProject project) {
- return new Module(factory, id, name, type, version, project);
- }
-
- /**
- * Finds a module create by this factory with the given id.
- * See the specification of
- * {@link org.eclipse.wst.server.core.IModuleFactory#getModule(String)}
- * for further details.
- * <p>
- * This method is normally called by the web server core framework,
- * in response to a call to {@link IModuleFactory#getModule(String)}.
- * Clients (other than the delegate) should never call this method.
- * </p>
- *
- * @param id the module id
- * @return the module with the given id, or <code>null</code>
- * if none
- */
- //public abstract IModule getModule(String memento);
-
- /**
- * Creates the module delegate for a module with the given information.
- * This method is called when a client needs to access the module delegate
- * associated with the given module.
- *
- * @param module a module
- * @return
- */
- public abstract ModuleDelegate getModuleDelegate(IModule module);
-
- /**
- * Return all modules created by this factory.
- * See the specification of
- * {@link org.eclipse.wst.server.core.IModuleFactory#getModules()}
- * for further details.
- * <p>
- * This method is normally called by the web server core framework,
- * in response to a call to {@link IModuleFactory#getModules()}.
- * Clients (other than the delegate) should never call this method.
- * </p>
- * <p>
- * A new array is returned on each call, so clients may store or modify the result.
- * </p>
- *
- * @return a possibly-empty array of modules {@link IModule}
- */
- public abstract IModule[] getModules();
-
- /**
- * Adds the given listener to this module factory.
- * Once registered, a listener starts receiving notification of
- * modules are added/removed. The listener continues to receive
- * notifications until it is removed.
- * Has no effect if an identical listener is already registered.
- * <p>
- * This method is normally called by the web server core framework,
- * in response to a call to
- * {@link IModuleFactory#addModuleFactoryListener(IModuleFactoryListener)}.
- * Clients (other than the delegate) should never call this method.
- * </p>
- *
- * @param listener the module factory listener to add
- * @see #removeModuleFactoryListener(IModuleFactoryListener)
- */
- public void addModuleFactoryListener(IModuleFactoryListener listener) {
- Trace.trace(Trace.FINEST, "Adding module factory listener " + listener + " to " + this);
-
- if (listeners == null)
- listeners = new ArrayList();
- else if (listeners.contains(listener))
- return;
- listeners.add(listener);
- }
-
- /**
- * Removes the given listener from this module factory.
- * Has no effect if the listener is not registered.
- * <p>
- * This method is normally called by the web server core framework,
- * in response to a call to
- * {@link IModuleFactory#removeModuleFactoryListener(IModuleFactoryListener)}.
- * Clients (other than the delegate) should never call this method.
- * </p>
- *
- * @param listener the module factory listener to remove
- * @see #addModuleFactoryListener(IModuleFactoryListener)
- */
- public void removeModuleFactoryListener(IModuleFactoryListener listener) {
- Trace.trace(Trace.FINEST, "Removing module factory listener " + listener + " from " + this);
-
- if (listeners != null)
- listeners.remove(listener);
- }
-
- /**
- * Fire a module factory event. This method is used by the factory delegate to
- * fire events about module changes.
- *
- * @param added a non-null array of modules that have been added
- * @param removed a non-null array of modules that have been removed
- */
- protected void fireModuleFactoryEvent(IModule[] added, IModule[] removed) {
- Trace.trace(Trace.FINEST, "->- Firing module factory event: " + toString() + " ->-");
-
- if (listeners == null || listeners.isEmpty())
- return;
-
- int size = listeners.size();
- IModuleFactoryListener[] dfl = new IModuleFactoryListener[size];
- listeners.toArray(dfl);
-
- IModuleFactoryEvent event = new ModuleFactoryEvent(factory.getId(), added, removed);
-
- for (int i = 0; i < size; i++) {
- try {
- Trace.trace(Trace.FINEST, " Firing module factory event to: " + dfl[i]);
- dfl[i].moduleFactoryChanged(event);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, " Error firing module factory event", e);
- }
- }
- Trace.trace(Trace.FINEST, "-<- Done firing module factory event -<-");
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/RuntimeDelegate.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/RuntimeDelegate.java
deleted file mode 100644
index be91c36..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/RuntimeDelegate.java
+++ /dev/null
@@ -1,253 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.model;
-
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.IRuntimeWorkingCopy;
-import org.eclipse.wst.server.core.ServerCore;
-import org.eclipse.wst.server.core.internal.Runtime;
-import org.eclipse.wst.server.core.internal.RuntimeWorkingCopy;
-import org.eclipse.wst.server.core.internal.ServerPlugin;
-/**
- * A runtime delegate provides the implementation for various
- * generic and server-type-specific operations for a specific type of runtime.
- * A runtime delegate is specified by the
- * <code>class</code> attribute of a <code>runtimeTypes</code> extension.
- * <p>
- * When the runtime instance needs to be given a delegate, the delegate class
- * specified for the runtime type is instantiated with a 0-argument constructor
- * and primed with <code>delegate.initialize(runtime)</code>,
- * which it is expected to hang on to. Later, when
- * <code>delegate.dispose()</code> is called as the runtime instance is
- * being discarded, the delegate is expected to let go of the runtime instance.
- * </p>
- * <p>
- * Runtime delegates may keep state in instance fields, but that state is
- * transient and will not be persisted across workbench sessions. To save state
- * across workbench sessions, it must be persisted using the attributes.
- * </p>
- * <p>
- * This abstract class is intended to be extended only by clients
- * to extend the <code>runtimeTypes</code> extension point.
- * </p>
- * <p>
- * <it>Caveat: The server core API is still in an early form, and is
- * likely to change significantly before the initial release.</it>
- * </p>
- *
- * @see IRuntime
- * @see IRuntimeWorkingCopy
- * @since 1.0
- */
-public abstract class RuntimeDelegate {
- private Runtime runtime;
- private RuntimeWorkingCopy runtimeWC;
-
- /**
- * Delegates must have a public 0-arg constructor.
- */
- public RuntimeDelegate() {
- // do nothing
- }
-
- /**
- * Initializes this runtime delegate with its life-long runtime instance.
- * <p>
- * This method is called by the server core framework.
- * Clients should never call this method.
- * </p>
- *
- * @param newRuntime the runtime instance
- */
- public final void initialize(Runtime newRuntime) {
- runtime = newRuntime;
- if (runtime instanceof RuntimeWorkingCopy)
- runtimeWC = (RuntimeWorkingCopy) runtime;
- initialize();
- }
-
- /**
- * Initializes this runtime delegate. This method gives delegates a chance
- * to do their own initialization.
- * <p>
- * This method is called by the server core framework.
- * Clients should never call this method.
- * </p>
- */
- public void initialize() {
- // do nothing
- }
-
- /**
- * Returns the runtime that this runtime delegate corresponds to.
- *
- * @return the runtime
- */
- public IRuntime getRuntime() {
- return runtime;
- }
-
- /**
- * Returns the runtime working copy that this runtime delegate corresponds to.
- *
- * @return the runtime
- */
- public final IRuntimeWorkingCopy getRuntimeWorkingCopy() {
- return runtimeWC;
- }
-
- /**
- * Validates this runtime instance. See the specification of
- * {@link IRuntime#validate()} for further details. Subclasses should
- * override and call super.validate() for basic validation.
- * <p>
- * This method is called by the web server core framework,
- * in response to a call to <code>IRuntime.validate()</code>.
- * Clients should never call this method.
- * </p>
- *
- * @return a status object with code <code>IStatus.OK</code> if this
- * runtime is valid, otherwise a status object indicating what is
- * wrong with it
- */
- public IStatus validate() {
- if (runtime.getName() == null || runtime.getName().length() == 0)
- return new Status(IStatus.ERROR, ServerPlugin.PLUGIN_ID, 0, ServerPlugin.getResource("%errorRuntimeName"), null);
-
- if (runtime.isWorkingCopy() && isNameInUse(runtime))
- return new Status(IStatus.ERROR, ServerPlugin.PLUGIN_ID, 0, ServerPlugin.getResource("%errorDuplicateRuntimeName"), null);
-
- IPath path = runtime.getLocation();
- if (path == null || path.isEmpty())
- return new Status(IStatus.ERROR, ServerPlugin.PLUGIN_ID, 0, "", null);
-
- return new Status(IStatus.OK, ServerPlugin.PLUGIN_ID, 0, "", null);
- }
-
- protected static boolean isNameInUse(IRuntime runtime) {
- IRuntime[] runtimes = ServerCore.getRuntimes();
- if (runtimes != null) {
- int size = runtimes.length;
- for (int i = 0; i < size; i++) {
- if (!runtime.equals(runtimes[i]) && runtime.getName().equals(runtimes[i].getName())) {
- if (!runtime.isWorkingCopy() || !runtimes[i].equals(((IRuntimeWorkingCopy)runtime).getOriginal()))
- return true;
- }
- }
- }
- return false;
- }
-
- public final int getAttribute(String attributeName, int defaultValue) {
- return runtime.getAttribute(attributeName, defaultValue);
- }
-
- public final boolean getAttribute(String attributeName, boolean defaultValue) {
- return runtime.getAttribute(attributeName, defaultValue);
- }
-
- public final String getAttribute(String attributeName, String defaultValue) {
- return runtime.getAttribute(attributeName, defaultValue);
- }
-
- public final List getAttribute(String attributeName, List defaultValue) {
- return runtime.getAttribute(attributeName, defaultValue);
- }
-
- public final Map getAttribute(String attributeName, Map defaultValue) {
- return runtime.getAttribute(attributeName, defaultValue);
- }
-
- /**
- * Disposes of this runtime delegate.
- * <p>
- * This method is called by the web server core framework.
- * Clients should never call this method.
- * </p>
- * <p>
- * Implementations are expected to let go of the delegate's reference
- * to the runtime, deregister listeners, etc.
- * </p>
- */
- public void dispose() {
- // do nothing
- }
-
- /**
- * Initializes this runtime with default values. This method is called when
- * a new runtime is created so that the runtime can be initialized with
- * meaningful values.
- */
- public void setDefaults() {
- // do nothing
- }
-
- /**
- * Sets the value of the specified integer-valued attribute of this
- * element.
- *
- * @param id the attribute id
- * @param value the value of the specified attribute
- */
- public final void setAttribute(String id, int value) {
- runtimeWC.setAttribute(id, value);
- }
-
- /**
- * Sets the value of the specified boolean-valued attribute of this
- * element.
- *
- * @param id the attribute id
- * @param value the value of the specified attribute
- */
- public final void setAttribute(String id, boolean value) {
- runtimeWC.setAttribute(id, value);
- }
-
- /**
- * Sets the value of the specified string-valued attribute of this
- * element.
- *
- * @param id the attribute id
- * @param value the value of the specified attribute
- */
- public final void setAttribute(String id, String value) {
- runtimeWC.setAttribute(id, value);
- }
-
- /**
- * Sets the value of the specified list-valued attribute of this
- * element. The list may only contain String values.
- *
- * @param id the attribute id
- * @param value the value of the specified attribute
- */
- public final void setAttribute(String id, List value) {
- runtimeWC.setAttribute(id, value);
- }
-
- /**
- * Sets the value of the specified map-valued attribute of this
- * element. The map may only contain String values.
- *
- * @param id the attribute id
- * @param value the value of the specified attribute
- */
- public final void setAttribute(String id, Map value) {
- runtimeWC.setAttribute(id, value);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/RuntimeLocatorDelegate.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/RuntimeLocatorDelegate.java
deleted file mode 100644
index 25fe3e9..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/RuntimeLocatorDelegate.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.model;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.wst.server.core.IRuntimeLocator;
-/**
- * A runtime locator provides the ability to locate or search for additional
- * runtimes of a particular type.
- * <p>
- * This abstract class is intended to be extended only by clients
- * to extend the <code>runtimeLocators</code> extension point.
- * </p>
- *
- * @see IRuntimeLocator
- * @since 1.0
- */
-public abstract class RuntimeLocatorDelegate {
- /**
- * Searches for local runtimes.
- * It uses the callback listener to report runtimes that are found.
- * The path contains the absolute path of the folder to search in,
- * or <code>null</code> to search the entire machine.
- *
- * @param path the path to search for runtimes in
- * @param listener a listener to report status to
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting and cancellation are not desired
- * @see IRuntimeLocator.searchForRuntimes(IPath, IRuntimeLocator.RuntimeSearchListener, IProgressMonitor)
- */
- public abstract void searchForRuntimes(IPath path, IRuntimeLocator.RuntimeSearchListener listener, IProgressMonitor monitor);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/RuntimeTargetHandlerDelegate.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/RuntimeTargetHandlerDelegate.java
deleted file mode 100644
index d285b23..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/RuntimeTargetHandlerDelegate.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.model;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.IRuntimeTargetHandler;
-/**
- *
- */
-public abstract class RuntimeTargetHandlerDelegate {
- private IRuntimeTargetHandler handler;
-
- /**
- * Initializes the runtime target handler.
- *
- * @param handler2
- */
- public final void initialize(IRuntimeTargetHandler handler2) {
- handler = handler2;
- }
-
- /**
- * Returns the runtime target handler that this delegate is associated with.
- *
- * @return
- */
- public IRuntimeTargetHandler getRuntimeTargetHandler() {
- return handler;
- }
-
- /**
- * Set the runtime target on the given project.
- *
- * @param project
- * @param runtime
- * @param monitor
- * @throws CoreException
- */
- public abstract void setRuntimeTarget(IProject project, IRuntime runtime, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Remove the runtime target from the given project.
- *
- * @param project
- * @param runtime
- * @param monitor
- * @throws CoreException
- */
- public abstract void removeRuntimeTarget(IProject project, IRuntime runtime, IProgressMonitor monitor) throws CoreException;
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ServerBehaviourDelegate.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ServerBehaviourDelegate.java
deleted file mode 100644
index 1cba49c..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ServerBehaviourDelegate.java
+++ /dev/null
@@ -1,361 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.model;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.internal.Server;
-import org.eclipse.wst.server.core.internal.ServerPlugin;
-/**
- * A server delegate provides the implementation for various
- * generic and server-type-specific operations for a specific type of server.
- * A server delegate is specified by the
- * <code>class</code> attribute of a <code>serverTypes</code> extension.
- * <p>
- * When the server instance needs to be given a delegate, the delegate class
- * specified for the server type is instantiated with a 0-argument constructor
- * and primed with <code>delegate.initialize(((IServerState)server)</code>,
- * which it is expected to hang on to. Later, when
- * <code>delegate.dispose()</code> is called as the server instance is
- * being discarded, the delegate is expected to let go of the server instance.
- * </p>
- * <p>
- * Server delegates may keep state in instance fields, but that state is
- * transient and will not be persisted across workbench sessions.
- * </p>
- * <p>
- * This abstract class is intended to be extended only by clients
- * to extend the <code>serverTypes</code> extension point.
- * </p>
- * <p>
- * <it>Caveat: The server core API is still in an early form, and is
- * likely to change significantly before the initial release.</it>
- * </p>
- *
- * @see IServer
- * @see IServerWorkingCopy
- * @since 1.0
- */
-public abstract class ServerBehaviourDelegate {
- private Server server;
-
- /**
- * Delegates must have a public 0-arg constructor.
- */
- public ServerBehaviourDelegate() {
- // do nothing
- }
-
- /**
- * Initializes this server delegate with its life-long server instance.
- * <p>
- * This method is called by the server core framework.
- * Clients should never call this method.
- * </p>
- *
- * @param server the server instance
- */
- public final void initialize(Server newServer) {
- server = newServer;
- initialize();
- }
-
- /**
- * Initializes this server delegate. This method gives delegates a chance
- * to do their own initialization.
- * <p>
- * This method is called by the server core framework.
- * Clients should never call this method.
- * </p>
- */
- public void initialize() {
- // do nothing
- }
-
- /**
- * Returns the server that this server delegate corresponds to.
- *
- * @return the server
- */
- public final IServer getServer() {
- return server;
- }
-
- /**
- * Sets the current state of this server.
- *
- * @param state one of the server state (<code>STATE_XXX</code>)
- * constants declared on {@link IServer}
- * @see IServer#getServerState()
- */
- public final void setServerState(int state) {
- server.setServerState(state);
- }
-
- public final void setMode(String mode) {
- server.setMode(mode);
- }
-
- /**
- * Sets the server restart state.
- *
- * @param state boolean
- */
- public final void setServerRestartState(boolean state) {
- server.setServerRestartState(state);
- }
-
- /**
- * Sets the server publish state.
- *
- * @param state int
- */
- public final void setServerPublishState(int state) {
- server.setServerPublishState(state);
- }
-
- /**
- * Hook to fire an event when a module state changes.
- *
- * @param module
- * @param state
- */
- public final void setModuleState(IModule module, int state) {
- server.setModuleState(module, state);
- }
-
- /**
- * Sets the module publish state.
- *
- * @param state int
- */
- public final void setModulePublishState(IModule module, int state) {
- server.setModulePublishState(module, state);
- }
-
- /**
- * Sets the module restart state.
- *
- * @param state int
- */
- public final void setModuleRestartState(IModule module, boolean state) {
- server.setModuleRestartState(module, state);
- }
-
- /**
- * Disposes of this server delegate.
- * <p>
- * This method is called by the web server core framework.
- * Clients should never call this method.
- * </p>
- * <p>
- * Implementations are expected to let go of the delegate's reference
- * to the server, deregister listeners, etc.
- * </p>
- */
- public void dispose() {
- // do nothing
- }
-
- /**
- * The server configuration has changed. This method should return
- * quickly. If any republishing must occur, the relevant in-sync
- * methods should return a new value. If the server must be restarted,
- * the isRestartNeeded() method should return true.
- *
- * @see IServer#updateConfiguration()
- */
- //public abstract void updateConfiguration();
-
- /**
- * A module resource has changed. This method should return
- * quickly. If the server must be restarted to handle the
- * change of this file, the isRestartNeeded() method should
- * return true and the event should be fired.
- *
- * @param module org.eclipse.wst.server.core.IModule
- * @param delta org.eclipse.wst.server.core.IModuleResourceDelta
- */
- //public abstract void updateModule(IModule module, IModuleResourceDelta delta);
-
- /**
- * Methods called to notify that publishing is about to begin.
- * This allows the server to open a connection to the server
- * or get any global information ready.
- * <p>
- * This method is called by the server core framework,
- * in response to a call to <code>IServer.publish()</code>.
- * Clients should never call this method.
- * </p>
- *
- * @param monitor org.eclipse.core.runtime.IProgressMonitor
- * @throws CoreException
- */
- public void publishStart(IProgressMonitor monitor) throws CoreException {
- // do nothing
- }
-
- /**
- * Publish the server.
- * <p>
- * This method is called by the server core framework,
- * in response to a call to <code>IServer.publish()</code>.
- * Clients should never call this method.
- * </p>
- *
- * @param monitor
- * @throws CoreException
- */
- public abstract void publishServer(IProgressMonitor monitor) throws CoreException;
-
- /**
- * Publish an individual module to the server.
- * <p>
- * This method is called by the server core framework,
- * in response to a call to <code>IServer.publish()</code>.
- * Clients should never call this method.
- * </p>
- *
- * @param parents
- * @param module
- * @param monitor
- * @throws CoreException
- */
- public abstract void publishModule(IModule[] parents, IModule module, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Methods called to notify that publishing has finished.
- * The server can close any open connections to the server
- * and do any cleanup operations.
- * <p>
- * This method is called by the server core framework,
- * in response to a call to <code>IServer.publish()</code>.
- * Clients should never call this method.
- * </p>
- *
- * @param monitor org.eclipse.core.runtime.IProgressMonitor
- * @throws CoreException
- */
- public void publishFinish(IProgressMonitor monitor) throws CoreException {
- // do nothing
- }
-
- /**
- *
- * @see IServer#setLaunchDefaults(ILaunchConfigurationWorkingCopy)
- */
- public abstract void setLaunchDefaults(ILaunchConfigurationWorkingCopy workingCopy);
-
- /**
- * Restart this server. The server should use the server
- * listener to notify progress. It must use the same debug
- * flags as was originally passed into the start() method.
- *
- * This method is used if there is a quick/better way to restart
- * the server. If it throws a CoreException, the normal stop/start
- * actions will be used.
- */
- public void restart(String launchMode) throws CoreException {
- throw new CoreException(new Status(IStatus.ERROR, ServerPlugin.PLUGIN_ID, 0, "Could not restart", null));
- }
-
- /**
- * Returns whether the given module can be restarted.
- * <p>
- * [issue: It's unclear whether this operations is guaranteed to be fast
- * or whether it could involve communication with any actual
- * server. If it is not fast, the method should take a progress
- * monitor.]
- * </p>
- *
- * @param module the module
- * @return <code>true</code> if the given module can be
- * restarted, and <code>false</code> otherwise
- */
- public boolean canRestartModule(IModule module) {
- return false;
- }
-
- /**
- * Check if the given module is in sync on the server. It should
- * return true if the module should be restarted (is out of
- * sync) or false if the module does not need to be restarted.
- *
- * @param module org.eclipse.wst.server.core.model.IModule
- * @return boolean
- */
- /*public boolean isModuleRestartNeeded(IModule module) {
- return false;
- }*/
-
- /**
- * Asynchronously restarts the given module on the server.
- * See the specification of
- * {@link IServer#synchronousRestartModule(IModule, IProgressMonitor)}
- * for further details.
- * <p>
- * The implementation should update the module sync state and fire
- * an event for the module.
- * </p>
- * <p>
- * [issue: It should probably be spec'd to throw an exception error if the
- * given module is not associated with the server.]
- * </p>
- * <p>
- * [issue: Since this method is ascynchronous, is there
- * any need for the progress monitor?]
- * </p>
- * <p>
- * [issue: Since this method is ascynchronous, how can
- * it return a meaningful IStatus?
- * And IServer.synchronousModuleRestart throws CoreException
- * if anything goes wrong.]
- * </p>
- * <p>
- * [issue: If the module was just published to the server
- * and had never been started, would is be ok to "start"
- * the module using this method?]
- * </p>
- *
- * @param module the module to be started
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting and cancellation are not desired
- * @return status object
- * @exception CoreException if an error occurs while trying to restart the module
- */
- public void restartModule(IModule module, IProgressMonitor monitor) throws CoreException {
- // do nothing
- }
-
- /**
- * Shuts down and stops this server. The server should return from this method
- * quickly and use the server listener to notify shutdown progress.
- * <p>
- * If force is <code>false</code>, it will attempt to stop the server
- * normally/gracefully. If force is <code>true</code>, then the server
- * process will be terminated any way that it can.
- * </p>
- * <p>
- * [issue: There is no way to communicate failure to the
- * client. Given that this operation can go awry, there probably
- * should be a mechanism that allows failing asynch operations
- * to be diagnosed.]
- * </p>
- * @param force <code>true</code> to kill the server, or <code>false</code>
- * to stop normally
- */
- public abstract void stop(boolean force);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ServerDelegate.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ServerDelegate.java
deleted file mode 100644
index 2010b38..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ServerDelegate.java
+++ /dev/null
@@ -1,345 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.model;
-
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.IServerPort;
-import org.eclipse.wst.server.core.IServerWorkingCopy;
-import org.eclipse.wst.server.core.internal.Server;
-import org.eclipse.wst.server.core.internal.ServerWorkingCopy;
-/**
- * A server delegate provides the implementation for various
- * generic and server-type-specific operations for a specific type of server.
- * A server delegate is specified by the
- * <code>class</code> attribute of a <code>serverTypes</code> extension.
- * <p>
- * When the server instance needs to be given a delegate, the delegate class
- * specified for the server type is instantiated with a 0-argument constructor
- * and primed with <code>delegate.initialize(((IServerState)server)</code>,
- * which it is expected to hang on to. Later, when
- * <code>delegate.dispose()</code> is called as the server instance is
- * being discarded, the delegate is expected to let go of the server instance.
- * </p>
- * <p>
- * Server delegates may keep state in instance fields, but that state is
- * transient and will not be persisted across workbench sessions. To save
- * state across workbench sessions, it must be persisted using the
- * attributes.
- * </p>
- * <p>
- * This abstract class is intended to be extended only by clients
- * to extend the <code>serverTypes</code> extension point.
- * </p>
- * <p>
- * <it>Caveat: The server core API is still in an early form, and is
- * likely to change significantly before the initial release.</it>
- * </p>
- *
- * @see IServer
- * @see IServerWorkingCopy
- * @since 1.0
- */
-public abstract class ServerDelegate {
- private Server server;
- private ServerWorkingCopy serverWC;
-
- /**
- * Delegates must have a public 0-arg constructor.
- */
- public ServerDelegate() {
- // do nothing
- }
-
- /**
- * Initializes this server delegate with its life-long server instance.
- * <p>
- * This method is called by the server core framework.
- * Clients should never call this method.
- * </p>
- *
- * @param server the server instance
- */
- public final void initialize(Server newServer) {
- server = newServer;
- if (newServer instanceof ServerWorkingCopy)
- serverWC = (ServerWorkingCopy) newServer;
- initialize();
- }
-
- /**
- * Initializes this server delegate. This method gives delegates a chance
- * to do their own initialization.
- * <p>
- * This method is called by the server core framework.
- * Clients should never call this method.
- * </p>
- */
- public void initialize() {
- // do nothing
- }
-
- /**
- * Returns the server that this server delegate corresponds to.
- *
- * @return the server
- */
- public final IServer getServer() {
- return server;
- }
-
- /**
- * Returns the server working copy that this server delegate corresponds to.
- *
- * @return the server
- */
- public final IServerWorkingCopy getServerWorkingCopy() {
- return serverWC;
- }
-
- public final int getAttribute(String attributeName, int defaultValue) {
- return server.getAttribute(attributeName, defaultValue);
- }
-
- public final boolean getAttribute(String attributeName, boolean defaultValue) {
- return server.getAttribute(attributeName, defaultValue);
- }
-
- public final String getAttribute(String attributeName, String defaultValue) {
- return server.getAttribute(attributeName, defaultValue);
- }
-
- public final List getAttribute(String attributeName, List defaultValue) {
- return server.getAttribute(attributeName, defaultValue);
- }
-
- public final Map getAttribute(String attributeName, Map defaultValue) {
- return server.getAttribute(attributeName, defaultValue);
- }
-
- /**
- * Disposes of this server delegate.
- * <p>
- * This method is called by the web server core framework.
- * Clients should never call this method.
- * </p>
- * <p>
- * Implementations are expected to let go of the delegate's reference
- * to the server, deregister listeners, etc.
- * </p>
- */
- public void dispose() {
- // do nothing
- }
-
- /**
- * Returns whether the specified module modifications could be made to this
- * server at this time. See the specification of
- * {@link IServer#canModifyModules(IModule[], IModule[])}
- * for further details.
- * <p>
- * This method is called by the web server core framework,
- * in response to a call to <code>IServer.canModifyModules</code>.
- * Clients should never call this method.
- * </p>
- * <p>
- * [issue: See IServer.canModifyModules(IModule[], IModule[]).]
- * </p>
- *
- * @param add a possibly-empty list of modules to add
- * @param remove a possibly-empty list of modules to remove
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting and cancellation are not desired
- * @return <code>true</code> if the proposed modifications
- * look feasible, and <code>false</code> otherwise
- * Returns true if this module can be added to this
- * configuration at the current time, and false otherwise.
- */
- public abstract IStatus canModifyModules(IModule[] add, IModule[] remove);
-
- /**
- * Returns the list of modules that are associated with
- * this server. See the specification of
- * {@link IServer#getModules()} for further details.
- * <p>
- * This method is called by the web server core framework,
- * in response to a call to <code>IServer.getModules</code>.
- * Clients should never call this method.
- * </p>
- * <p>
- * [issue: Where does the delegate get these objects from,
- * especially at the start of a follow-on session?]
- * </p>
- *
- * @return a possibly-empty list of modules
- */
- public abstract IModule[] getModules();
-
- /**
- * Returns the child module(s) of this module. If this
- * module contains other modules, it should list those
- * modules. If not, it should return an empty list.
- *
- * <p>This method should only return the direct children.
- * To obtain the full module tree, this method may be
- * recursively called on the children.</p>
- *
- * @see IServer#getChildModules(IModule)
- */
- public abstract IModule[] getChildModules(IModule module);
-
- /**
- * Returns the parent module(s) of this module. When
- * determining if a given project can run on a server
- * configuration, this method will be used to find the
- * actual module(s) that may be run on the server. For
- * instance, a Web module may return a list of Ear
- * modules that it is contained in if the server only
- * supports configuring Ear modules.
- *
- * <p>If the module type is not supported, this method
- * may return null. If the type is normally supported but there
- * is a configuration problem or missing parent, etc., this
- * method may fire a CoreException that may then be presented
- * to the user.</p>
- *
- * <p>If it does return valid parent(s), this method should
- * always return the topmost parent module(s), even if
- * there are a few levels (a heirarchy) of modules.</p>
- *
- * @see IServer#getParentModules(IModule)
- */
- public abstract IModule[] getParentModules(IModule module) throws CoreException;
-
- /**
- * Returns an array of IServerPorts that this server has.
- *
- * @return the server's ports
- */
- public IServerPort[] getServerPorts() {
- return null;
- }
-
- /**
- * Initializes this server with default values. This method is called when
- * a new server is created so that the server can be initialized with
- * meaningful values.
- */
- public void setDefaults() {
- // do nothing
- }
-
- /**
- * Sets the value of the specified integer-valued attribute of this
- * element.
- *
- * @param id the attribute id
- * @param value the value of the specified attribute
- * @see getAttribute(String, int)
- */
- public final void setAttribute(String id, int value) {
- serverWC.setAttribute(id, value);
- }
-
- /**
- * Sets the value of the specified boolean-valued attribute of this
- * element.
- *
- * @param id the attribute id
- * @param value the value of the specified attribute
- * @see getAttribute(String, boolean)
- */
- public final void setAttribute(String id, boolean value) {
- serverWC.setAttribute(id, value);
- }
-
- /**
- * Sets the value of the specified string-valued attribute of this
- * element.
- *
- * @param id the attribute id
- * @param value the value of the specified attribute
- * @see getAttribute(String, String)
- */
- public final void setAttribute(String id, String value) {
- serverWC.setAttribute(id, value);
- }
-
- /**
- * Sets the value of the specified list-valued attribute of this
- * element. The list may only contain String values.
- *
- * @param id the attribute id
- * @param value the value of the specified attribute
- * @see getAttribute(String, List)
- */
- public final void setAttribute(String id, List value) {
- serverWC.setAttribute(id, value);
- }
-
- /**
- * Sets the value of the specified map-valued attribute of this
- * element. The map may only contain String values.
- *
- * @param id the attribute id
- * @param value the value of the specified attribute
- * @see getAttribute(String, Map)
- */
- public final void setAttribute(String id, Map value) {
- serverWC.setAttribute(id, value);
- }
-
- /**
- * Modifies the list of modules associated with the server.
- * See the specification of
- * {@link IServerWorkingCopy#modifyModules(IModule[], IModule[], IProgressMonitor)}
- * for further details.
- * <p>
- * This method is called by the web server core framework,
- * in response to a call to <code>IServerWorkingCopy.modifyModules</code>.
- * Clients should never call this method.
- * </p>
- *
- * @param add a possibly-empty list of modules to add
- * @param remove a possibly-empty list of modules to remove
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting and cancellation are not desired
- * @throws CoreException [missing]
- */
- public abstract void modifyModules(IModule[] add, IModule[] remove, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Returns true if this is a configuration that is
- * applicable to (can be used with) this server.
- *
- * @param configuration
- * @return boolean
- */
- public boolean isSupportedConfiguration(IPath configuration2) {
- return true;
- }
-
- public void importConfiguration(IRuntime runtime, IProgressMonitor monitor) {
- // do nothing
- }
-
- public void saveConfiguration(IProgressMonitor monitor) throws CoreException {
- // do nothing
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ServerLocatorDelegate.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ServerLocatorDelegate.java
deleted file mode 100644
index e2a09f6..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ServerLocatorDelegate.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.model;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.wst.server.core.IServerLocator;
-/**
- * A server locator provides the ability to locate or search for additional
- * server of a particular type, on a particular host.
- * <p>
- * This abstract class is intended to be extended only by clients
- * to extend the <code>serverLocators</code> extension point.
- * </p>
- *
- * @see IServerLocator
- * @since 1.0
- */
-public abstract class ServerLocatorDelegate {
- /**
- * Searches for servers.
- * It uses the callback listener to report servers that are found.
- *
- * @param host a host string conforming to RFC 2732
- * @param listener a listener to report status to
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting and cancellation are not desired
- * @see IServerLocator.searchForServers(IServerLocator.Listener, IProgressMonitor)
- */
- public abstract void searchForServers(String host, IServerLocator.Listener listener, IProgressMonitor monitor);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ServerMonitorDelegate.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ServerMonitorDelegate.java
deleted file mode 100644
index c88f23c..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ServerMonitorDelegate.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.model;
-
-import org.eclipse.core.runtime.CoreException;
-
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.IServerPort;
-/**
- * An interface to a TCP/IP monitor.
- */
-public abstract class ServerMonitorDelegate {
- /**
- * Start monitoring the given port, and return the port number to
- * tunnel requests through. The monitorPort is the new port to use, or
- * -1 to pick a random port.
- *
- * @param port
- * @return
- */
- public abstract int startMonitoring(IServer server, IServerPort port, int monitorPort) throws CoreException;
-
- /**
- * Stop monitoring the given port.
- * @param port
- */
- public abstract void stopMonitoring(IServer server, IServerPort port);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ServerTaskDelegate.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ServerTaskDelegate.java
deleted file mode 100644
index 8c64203..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ServerTaskDelegate.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.model;
-
-import java.util.List;
-
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IOptionalTask;
-import org.eclipse.wst.server.core.IServer;
-/**
- * A server task delegate.
- *
- * <p>This is the implementation of a serverTask extension point.</p>
- */
-public abstract class ServerTaskDelegate {
- /**
- * Returns the tasks that should be performed on the server.
- *
- * @return the tasks that should be performed on the server.
- */
- public abstract IOptionalTask[] getTasks(IServer server, List[] parents, IModule[] modules);
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/StartupDelegate.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/StartupDelegate.java
deleted file mode 100644
index 8268800..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/StartupDelegate.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.model;
-/**
- * An interface for the startup extension point.
- */
-public abstract class StartupDelegate {
- /**
- * Called on server core startup.
- */
- public abstract void startup();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/FileUtil.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/FileUtil.java
deleted file mode 100644
index 16d2c08..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/FileUtil.java
+++ /dev/null
@@ -1,346 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.util;
-
-import java.io.*;
-import java.util.zip.*;
-import java.net.URL;
-import org.eclipse.core.runtime.*;
-import org.eclipse.wst.server.core.internal.ProgressUtil;
-import org.eclipse.wst.server.core.internal.ServerPlugin;
-import org.eclipse.wst.server.core.internal.Trace;
-/**
- * Utility class with an assortment of useful file methods.
- */
-public class FileUtil {
- // size of the buffer
- private static final int BUFFER = 10240;
-
- // the buffer
- private static byte[] buf = new byte[BUFFER];
-
- /**
- * FileUtil cannot be created. Use static methods.
- */
- private FileUtil() {
- super();
- }
-
- /**
- * Copys a directory from a to b.
- *
- * @param from java.lang.String
- * @param to java.lang.String
- */
- public static void copyDirectory(String from, String to, IProgressMonitor monitor) {
- try {
- File fromDir = new File(from);
- File toDir = new File(to);
-
- File[] files = fromDir.listFiles();
-
- toDir.mkdir();
-
- // cycle through files
- int size = files.length;
- monitor = ProgressUtil.getMonitorFor(monitor);
- monitor.beginTask(ServerPlugin.getResource("%copyingTask", new String[] {from, to}), size * 50);
-
- for (int i = 0; i < size; i++) {
- File current = files[i];
- String fromFile = current.getAbsolutePath();
- String toFile = to;
- if (!toFile.endsWith(File.separator))
- toFile += File.separator;
- toFile += current.getName();
- if (current.isFile()) {
- copyFile(fromFile, toFile);
- monitor.worked(50);
- } else if (current.isDirectory()) {
- monitor.subTask(ServerPlugin.getResource("%copyingTask", new String[] {fromFile, toFile}));
- copyDirectory(fromFile, toFile, ProgressUtil.getSubMonitorFor(monitor, 50));
- }
- if (monitor.isCanceled())
- return;
- }
- monitor.done();
- } catch (Exception e) {
- Trace.trace("Error copying directory", e);
- }
- }
-
- /**
- * Copy a file from a to b. Closes the input stream after use.
- *
- * @param in java.io.InputStream
- * @param to java.lang.String
- */
- public static IStatus copyFile(InputStream in, String to) {
- OutputStream out = null;
-
- try {
- out = new FileOutputStream(to);
-
- int avail = in.read(buf);
- while (avail > 0) {
- out.write(buf, 0, avail);
- avail = in.read(buf);
- }
- return new Status(IStatus.OK, ServerPlugin.PLUGIN_ID, 0, ServerPlugin.getResource("%copyingTask", new String[] {to}), null);
- } catch (Exception e) {
- Trace.trace("Error copying file", e);
- return new Status(IStatus.ERROR, ServerPlugin.PLUGIN_ID, 0, ServerPlugin.getResource("%errorCopyingFile", new String[] {to, e.getLocalizedMessage()}), e);
- } finally {
- try {
- if (in != null)
- in.close();
- } catch (Exception ex) {
- // ignore
- }
- try {
- if (out != null)
- out.close();
- } catch (Exception ex) {
- // ignore
- }
- }
- }
-
- /**
- * Copy a file from a to b.
- *
- * @param from java.lang.String
- * @param to java.lang.String
- */
- public static IStatus copyFile(String from, String to) {
- try {
- return copyFile(new FileInputStream(from), to);
- } catch (Exception e) {
- Trace.trace("Error copying file", e);
- return new Status(IStatus.ERROR, ServerPlugin.PLUGIN_ID, 0, ServerPlugin.getResource("%errorCopyingFile", new String[] {to, e.getLocalizedMessage()}), e);
- }
- }
-
- /**
- * Copy a file from a to b.
- *
- * @param from java.net.URL
- * @param to java.lang.String
- */
- public static IStatus copyFile(URL from, String to) {
- try {
- return copyFile(from.openStream(), to);
- } catch (Exception e) {
- Trace.trace("Error copying file", e);
- return new Status(IStatus.ERROR, ServerPlugin.PLUGIN_ID, 0, ServerPlugin.getResource("%errorCopyingFile", new String[] {to, e.getLocalizedMessage()}), e);
- }
- }
- /**
- * Recursively deletes a directory.
- *
- * @param dir java.io.File
- */
- public static void deleteDirectory(File dir, IProgressMonitor monitor) {
- try {
- if (!dir.exists() || !dir.isDirectory())
- return;
-
- File[] files = dir.listFiles();
- int size = files.length;
- monitor = ProgressUtil.getMonitorFor(monitor);
- monitor.beginTask(ServerPlugin.getResource("%deletingTask", new String[] {dir.getAbsolutePath()}), size * 10);
-
- // cycle through files
- for (int i = 0; i < size; i++) {
- File current = files[i];
- if (current.isFile()) {
- current.delete();
- monitor.worked(10);
- } else if (current.isDirectory()) {
- monitor.subTask(ServerPlugin.getResource("%deletingTask", new String[] {current.getAbsolutePath()}));
- deleteDirectory(current, ProgressUtil.getSubMonitorFor(monitor, 10));
- }
- }
- dir.delete();
- monitor.done();
- } catch (Exception e) {
- Trace.trace("Error deleting directory " + dir.getAbsolutePath(), e);
- }
- }
-
- /**
- * Expand a zip file to a given directory.
- *
- * @param zipFile java.io.File
- * @param dir java.io.File
- */
- public static void expandZip(File zipFile, File dir, IProgressMonitor monitor) {
- ZipInputStream zis = null;
-
- try {
- // first, count number of items in zip file
- zis = new ZipInputStream(new FileInputStream(zipFile));
- int count = 0;
- while (zis.getNextEntry() != null)
- count++;
-
- monitor = ProgressUtil.getMonitorFor(monitor);
- monitor.beginTask(ServerPlugin.getResource("%unZippingTask", new String[] {zipFile.getName()}), count);
-
- zis = new ZipInputStream(new FileInputStream(zipFile));
- ZipEntry ze = zis.getNextEntry();
-
- FileOutputStream out = null;
-
- while (ze != null) {
- try {
- monitor.subTask(ServerPlugin.getResource("%expandingTask", new String[] {ze.getName()}));
- File f = new File(dir, ze.getName());
-
- if (ze.isDirectory()) {
- out = null;
- f.mkdirs();
- } else {
- out = new FileOutputStream(f);
-
- int avail = zis.read(buf);
- while (avail > 0) {
- out.write(buf, 0, avail);
- avail = zis.read(buf);
- }
- }
- } catch (FileNotFoundException ex) {
- Trace.trace("Error extracting " + ze.getName() + " from zip " + zipFile.getAbsolutePath(), ex);
- } finally {
- try {
- if (out != null)
- out.close();
- } catch (Exception e) {
- // ignore
- }
- }
- ze = zis.getNextEntry();
- monitor.worked(1);
- if (monitor.isCanceled())
- return;
- }
- monitor.done();
- } catch (Exception e) {
- Trace.trace("Error expanding zip file " + zipFile.getAbsolutePath(), e);
- } finally {
- try {
- if (zis != null)
- zis.close();
- } catch (Exception ex) {
- // ignore
- }
- }
- }
-
- /**
- * Copys a directory from a to b, only modifying as needed
- * and deleting old files and directories.
- *
- * @param from java.lang.String
- * @param to java.lang.String
- * @param IProgressMonitor
- */
- public static void smartCopyDirectory(String from, String to, IProgressMonitor monitor) {
- try {
- File fromDir = new File(from);
- File toDir = new File(to);
-
- File[] fromFiles = fromDir.listFiles();
- int fromSize = fromFiles.length;
-
- monitor = ProgressUtil.getMonitorFor(monitor);
- monitor.beginTask(ServerPlugin.getResource("%copyingTask", new String[] {from, to}), 550);
-
- File[] toFiles = null;
-
- // delete old files and directories from this directory
- if (toDir.exists() && toDir.isDirectory()) {
- toFiles = toDir.listFiles();
- int toSize = toFiles.length;
-
- // check if this exact file exists in the new directory
- for (int i = 0; i < toSize; i++) {
- String name = toFiles[i].getName();
- boolean isDir = toFiles[i].isDirectory();
- boolean found = false;
- for (int j = 0; j < fromSize; j++) {
- if (name.equals(fromFiles[j].getName()) && isDir == fromFiles[j].isDirectory())
- found = true;
- }
-
- // delete file if it can't be found or isn't the correct type
- if (!found) {
- if (isDir)
- deleteDirectory(toFiles[i], new NullProgressMonitor());
- else
- toFiles[i].delete();
- }
- if (monitor.isCanceled())
- return;
- }
- } else {
- if (toDir.isFile())
- toDir.delete();
- toDir.mkdir();
- }
- monitor.worked(50);
-
- // cycle through files and only copy when it doesn't exist
- // or is newer
- toFiles = toDir.listFiles();
- int toSize = toFiles.length;
- int dw = 0;
- if (toSize > 0)
- dw = 500 / toSize;
-
- for (int i = 0; i < fromSize; i++) {
- File current = fromFiles[i];
-
- // check if this is a new or newer file
- boolean copy = true;
- if (!current.isDirectory()) {
- String name = current.getName();
- long mod = current.lastModified();
- for (int j = 0; j < toSize; j++) {
- if (name.equals(toFiles[j].getName()) && mod <= toFiles[j].lastModified())
- copy = false;
- }
- }
-
- if (copy) {
- String fromFile = current.getAbsolutePath();
- String toFile = to;
- if (!toFile.endsWith(File.separator))
- toFile += File.separator;
- toFile += current.getName();
- if (current.isFile()) {
- copyFile(fromFile, toFile);
- monitor.worked(dw);
- } else if (current.isDirectory()) {
- monitor.subTask(ServerPlugin.getResource("%copyingTask", new String[] {fromFile, toFile}));
- smartCopyDirectory(fromFile, toFile, ProgressUtil.getSubMonitorFor(monitor, dw));
- }
- }
- if (monitor.isCanceled())
- return;
- }
- monitor.worked(500 - dw * toSize);
- monitor.done();
- } catch (Exception e) {
- Trace.trace("Error smart copying directory " + from + " - " + to, e);
- }
- }
-}
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/HttpLaunchable.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/HttpLaunchable.java
deleted file mode 100644
index e8c984b..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/HttpLaunchable.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.util;
-
-import java.net.URL;
-
-import org.eclipse.wst.server.core.ILaunchable;
-/**
- *
- */
-public class HttpLaunchable implements ILaunchable {
- public static final String ID = "http.launchable";
-
- private URL url;
-
- public HttpLaunchable(URL url) {
- this.url = url;
- }
-
- public String getId() {
- return ID;
- }
-
- public URL getURL() {
- return url;
- }
-
- public String toString() {
- return "HttpLaunchable[id=" + getId() + ", url=" + url.toString() + "]";
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/IStaticWeb.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/IStaticWeb.java
deleted file mode 100644
index 75bb985..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/IStaticWeb.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.util;
-/**
- * A static Web module that could be deployed to Apache or another
- * HTTP server.
- */
-public interface IStaticWeb {
- /**
- * Returns the context root of the Web.
- *
- * @return java.lang.String
- */
- public String getContextRoot();
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/ModuleEvent.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/ModuleEvent.java
deleted file mode 100644
index 63fc05f..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/ModuleEvent.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.util;
-
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.model.IModuleEvent;
-/**
- *
- */
-public class ModuleEvent implements IModuleEvent {
- protected IModule module;
- protected boolean isChanged;
- protected IModule[] added;
- protected IModule[] changed;
- protected IModule[] removed;
-
- public ModuleEvent(IModule module, boolean isChanged, IModule[] added, IModule[] changed, IModule[] removed) {
- this.module = module;
- this.isChanged = isChanged;
- this.added = added;
- this.changed = changed;
- this.removed = removed;
- }
-
- /**
- * @see org.eclipse.wst.server.core.model.IModuleEvent#getModule()
- */
- public IModule getModule() {
- return module;
- }
-
- /**
- * @see org.eclipse.wst.server.core.model.IModuleEvent#isChanged()
- */
- public boolean isChanged() {
- return isChanged;
- }
-
- /**
- * @see org.eclipse.wst.server.core.model.IModuleEvent#getAddedChildModules()
- */
- public IModule[] getAddedChildModules() {
- return added;
- }
-
- /**
- * @see org.eclipse.wst.server.core.model.IModuleEvent#getModifiedChildModules()
- */
- public IModule[] getChangedChildModules() {
- return changed;
- }
-
- /**
- * @see org.eclipse.wst.server.core.model.IModuleEvent#getRemovedChildModules()
- */
- public IModule[] getRemovedChildModules() {
- return removed;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/ModuleFactoryEvent.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/ModuleFactoryEvent.java
deleted file mode 100644
index 45a4830..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/ModuleFactoryEvent.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.util;
-
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.model.IModuleFactoryEvent;
-/**
- *
- */
-public class ModuleFactoryEvent implements IModuleFactoryEvent {
- protected String factoryId;
- protected IModule[] added;
- protected IModule[] removed;
-
- public ModuleFactoryEvent(String factoryId, IModule[] added, IModule[] removed) {
- this.factoryId = factoryId;
- this.added = added;
- this.removed = removed;
- }
-
- /**
- * Returns the id of this factory.
- *
- * @return java.lang.String
- */
- public String getFactoryId() {
- return factoryId;
- }
-
- /**
- * Returns any modules that have been added.
- *
- * @return org.eclipse.wst.server.core.model.IModule[]
- */
- public IModule[] getAddedModules() {
- return added;
- }
-
- /**
- * Returns any modules that have been removed.
- *
- * @return org.eclipse.wst.server.core.model.IModule[]
- */
- public IModule[] getRemovedModules() {
- return removed;
- }
-}
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/NullModuleArtifact.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/NullModuleArtifact.java
deleted file mode 100644
index d4553db..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/NullModuleArtifact.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.util;
-
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IModuleArtifact;
-/**
- *
- */
-public class NullModuleArtifact implements IModuleArtifact {
- public static final String ID = "org.eclipse.wst.server.core.null";
-
- private IModule module;
-
- public NullModuleArtifact(IModule module) {
- this.module = module;
- }
-
- public String getId() {
- return ID;
- }
-
- public IModule getModule() {
- return module;
- }
-
- public String toString() {
- return "NullModuleArtifact [module=" + module + "]";
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/PingThread.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/PingThread.java
deleted file mode 100644
index 8e101ed..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/PingThread.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.util;
-
-import java.io.FileNotFoundException;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.net.URLConnection;
-
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.internal.Trace;
-import org.eclipse.wst.server.core.model.ServerBehaviourDelegate;
-/**
- * Thread used to ping server to test when it is started.
- */
-public class PingThread {
- // delay before pinging starts
- private static final int PING_DELAY = 2000;
-
- // delay between pings
- private static final int PING_INTERVAL = 250;
-
- // maximum number of pings before giving up
- private int maxPings = 56; // total: 16 seconds + connection time
-
- private boolean stop = false;
- private String url;
- private ServerBehaviourDelegate server;
- private IServer server2;
-
- /**
- * Create a new PingThread.
- *
- * @param server2
- * @param server
- * @param url
- * @param mode
- */
- public PingThread(IServer server2, ServerBehaviourDelegate server, String url, int maxPings) {
- super();
- this.server = server;
- this.server2 = server2;
- this.url = url;
- this.maxPings = maxPings;
- Thread t = new Thread() {
- public void run() {
- ping();
- }
- };
- t.setDaemon(true);
- t.start();
- }
-
- /**
- * Ping the server until it is started. Then set the server
- * state to STATE_STARTED.
- */
- protected void ping() {
- int count = 0;
- try {
- Thread.sleep(PING_DELAY);
- } catch (Exception e) {
- // ignore
- }
- while (!stop) {
- try {
- if (count == maxPings) {
- server2.stop(false);
- stop = true;
- break;
- }
- count++;
-
- Trace.trace(Trace.FINEST, "Ping: pinging");
- URL pingUrl = new URL(url);
- URLConnection conn = pingUrl.openConnection();
- ((HttpURLConnection)conn).getResponseCode();
-
- // ping worked - server is up
- if (!stop) {
- Trace.trace(Trace.FINEST, "Ping: success");
- Thread.sleep(200);
- server.setServerState(IServer.STATE_STARTED);
- }
- stop = true;
- } catch (FileNotFoundException fe) {
- try {
- Thread.sleep(200);
- } catch (Exception e) {
- // ignore
- }
- server.setServerState(IServer.STATE_STARTED);
- stop = true;
- } catch (Exception e) {
- Trace.trace(Trace.FINEST, "Ping: failed");
- // pinging failed
- if (!stop) {
- try {
- Thread.sleep(PING_INTERVAL);
- } catch (InterruptedException e2) {
- // ignore
- }
- }
- }
- }
- }
-
- /**
- * Tell the pinging to stop.
- */
- public void stopPinging() {
- Trace.trace("Ping: stopping");
- stop = true;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/ProjectModule.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/ProjectModule.java
deleted file mode 100644
index 344dda0..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/ProjectModule.java
+++ /dev/null
@@ -1,323 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.util;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.internal.Trace;
-import org.eclipse.wst.server.core.model.IModuleListener;
-import org.eclipse.wst.server.core.model.ModuleDelegate;
-/**
- * A simple IModuleProject that maps a folder within a project
- * (or the root of the project itself) to the module.
- */
-public abstract class ProjectModule extends ModuleDelegate {
- protected IProject project;
- protected IPath root;
-
- // change listeners
- private transient List listeners;
-
- public ProjectModule() {
- // do nothing
- }
-
- public ProjectModule(IProject project) {
- this.project = project;
- }
-
- /*
- * @see IModuleProject#getProject()
- */
- public IProject getProject() {
- return project;
- }
-
- /**
- * Returns the root folder.
- */
- public IPath getRootFolder() {
- return root;
- }
-
- /*
- * @see IModuleProject#getModuleResourceDelta(IResourceDelta)
- */
- /*public IModuleResourceDelta getModuleResourceDelta(IResourceDelta delta) {
- Trace.trace(Trace.FINEST, "> getModuleResourceDelta");
- IPath root2 = null;
- try {
- root2 = getRootFolder();
- } catch (Exception e) {
- Trace.trace(Trace.FINEST, "Error getting root2");
- }
- if (root2 == null) {
- return convertChildren(delta, null);
- }
- class Helper {
- boolean found = false;
- IModuleResourceDelta delta2;
- }
- final Helper helper = new Helper();
- final IPath root3 = root2;
- try {
- delta.accept(new IResourceDeltaVisitor() {
- public boolean visit(IResourceDelta visitDelta) {
- if (!helper.found && root3.equals(visitDelta.getProjectRelativePath())) {
- helper.delta2 = convertChildren(visitDelta, null);
- helper.found = true;
- return false;
- }
- return true;
- }
- });
- Trace.trace(Trace.FINEST, "< getModuleResourceDelta");
- return helper.delta2;
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Could not get module resource delta");
- }
- Trace.trace(Trace.FINEST, "< getModuleResourceDelta null");
- return null;
- }*/
-
- /**
- *
- */
- /*protected IModuleResourceDelta convertChildren(IResourceDelta delta, IModuleFolder parent) {
- int flags = delta.getKind();
- int kind = IModuleResourceDelta.NO_CHANGE;
- if (flags == IResourceDelta.ADDED)
- kind = IModuleResourceDelta.ADDED;
- else if (flags == IResourceDelta.REMOVED)
- kind = IModuleResourceDelta.REMOVED;
- else if (flags == IResourceDelta.CHANGED)
- kind = IModuleResourceDelta.CHANGED;
-
- IResource resource = delta.getResource();
-
- IModuleResource pubResource = null;
- if (resource instanceof IContainer)
- pubResource = new ProjectModuleFolder(this, parent, (IContainer) resource);
- else if (resource instanceof IFile) {
- if (delta.getFlags() == IResourceDelta.MARKERS)
- return null;
- pubResource = new ProjectModuleFile(this, parent, (IFile) resource);
- }
-
- ModuleResourceDelta deployDelta = new ModuleResourceDelta(pubResource, kind);
-
- IResourceDelta[] children = delta.getAffectedChildren();
- if (children != null && pubResource instanceof IModuleFolder) {
- int size = children.length;
- for (int i = 0; i < size; i++) {
- IModuleResourceDelta childDelta = convertChildren(children[i], (IModuleFolder) pubResource);
- if (childDelta != null)
- deployDelta.addChild(childDelta);
- }
- }
- return deployDelta;
- }*/
-
- /*
- * @see IModule#getMemento()
- */
- public String getId() {
- return getProject().getName();
- }
-
- /*
- * @see IModule#getPublishStatus()
- */
- public IStatus validate() {
- return null;
- }
-
- /*
- * @see IModule#getPublishStatus()
- */
- public IStatus canPublish() {
- return null;
- }
-
- /*
- * @see IModule#members()
- */
- /*public IModuleResource[] members() throws CoreException {
- IPath root2 = null;
- try {
- root2 = getRootFolder();
- } catch (Exception e) { }
- try {
- if (root2 == null || root2.isRoot() || root2.equals(new Path("")) || root2.equals(new Path("/")))
- return getModuleResources(getProject(), null);
-
- IFolder folder = project.getFolder(root2);
- return getModuleResources(folder, null);
- } catch (CoreException e) {
- throw e;
- }
- }*/
-
- /*protected IModuleResource getModuleResources(IFile file) {
- return new ProjectModuleFile(this, null, file);
- }
-
- protected IModuleResource[] getModuleResources(IContainer container, IModuleFolder parent) throws CoreException {
- List list = new ArrayList();
-
- IResource[] resources = container.members();
- if (resources != null) {
- int size = resources.length;
- for (int i = 0; i < size; i++) {
- IResource resource = resources[i];
- if (resource instanceof IContainer) {
- ProjectModuleFolder pdf = new ProjectModuleFolder(this, parent, (IContainer) resource);
- list.add(pdf);
- } else if (resource instanceof IFile) {
- ProjectModuleFile pdf = new ProjectModuleFile(this, parent, (IFile) resource);
- list.add(pdf);
- }
- }
- }
-
- IModuleResource[] moduleResources = new IModuleResource[list.size()];
- list.toArray(moduleResources);
- return moduleResources;
- }*/
-
- /*
- * @see IModule#getName()
- */
- public String getName() {
- return getProject().getName();
- }
-
- /**
- * Returns true if this module currently exists, and false if it has
- * been deleted or moved and is no longer represented by this module.
- *
- * @return boolean
- */
- public boolean exists() {
- return (getProject() != null && getProject().exists());
- }
-
- /**
- *
- */
- public boolean equals(Object obj) {
- if (obj == null || !(obj instanceof ProjectModule))
- return false;
-
- ProjectModule dp = (ProjectModule) obj;
- //if (getFactoryId() != null && !getFactoryId().equals(dp.getFactoryId()))
- // return false;
-
- IPath root2 = null;
- try {
- root2 = getRootFolder();
- } catch (Exception e) {
- // ignore
- }
-
- IPath root3 = null;
- try {
- root3 = dp.getRootFolder();
- } catch (Exception e) {
- // ignore
- }
-
- if (project != null && project.exists() && !project.equals(dp.getProject()))
- return false;
-
- if (root2 == null && root3 != null)
- return false;
- if (root2 != null && !root2.equals(root3))
- return false;
-
- return true;
- }
-
- /**
- * Add a listener for the module.
- *
- * @param listener org.eclipse.wst.server.core.model.IModuleListener
- */
- public void addModuleListener(IModuleListener listener) {
- Trace.trace(Trace.FINEST, "Adding module listener " + listener + " to " + this);
-
- if (listeners == null)
- listeners = new ArrayList();
- else if (listeners.contains(listener))
- return;
- listeners.add(listener);
- }
-
- /**
- * Add a listener for the module.
- *
- * @param listener org.eclipse.wst.server.core.model.IModuleListener
- */
- public void removeModuleListener(IModuleListener listener) {
- Trace.trace(Trace.FINEST, "Removing module listener " + listener + " from " + this);
-
- if (listeners != null)
- listeners.remove(listener);
- }
-
- /**
- * Fire a module change event.
- */
- protected void fireModuleChangeEvent(boolean isChange, IModule[] added, IModule[] changed, IModule[] removed) {
- Trace.trace(Trace.FINEST, "->- Firing module change event: " + getName() + " (" + isChange + ") ->-");
-
- if (listeners == null || listeners.isEmpty())
- return;
-
- int size = listeners.size();
- IModuleListener[] dcl = new IModuleListener[size];
- listeners.toArray(dcl);
-
- ModuleEvent event = new ModuleEvent(getModule(), isChange, added, changed, removed);
-
- for (int i = 0; i < size; i++) {
- try {
- Trace.trace(Trace.FINEST, " Firing module change event to: " + dcl[i]);
- dcl[i].moduleChanged(event);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, " Error firing module change event", e);
- }
- }
- Trace.trace(Trace.FINEST, "-<- Done firing module change event -<-");
- }
-
- /**
- * Called when the listener paths from the module factory change.
- * Use this method to recache information about the module.
- */
- protected void update() {
- // do nothing
- }
-
- /**
- * Returns the child modules of this module.
- *
- * @return org.eclipse.wst.server.core.model.IModule[]
- */
- public IModule[] getChildModules() {
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/ProjectModuleFactoryDelegate.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/ProjectModuleFactoryDelegate.java
deleted file mode 100644
index 4345de8..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/ProjectModuleFactoryDelegate.java
+++ /dev/null
@@ -1,343 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.util;
-
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.IPath;
-
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.internal.ResourceManager;
-import org.eclipse.wst.server.core.internal.Trace;
-import org.eclipse.wst.server.core.model.ModuleFactoryDelegate;
-/**
- *
- */
-public abstract class ProjectModuleFactoryDelegate extends ModuleFactoryDelegate {
- protected static IResourceChangeListener listener;
-
- protected static List factories = new ArrayList();
-
- protected List added;
- protected List removed;
-
- // map from IProject to IModuleProject
- protected Map projects;
-
- /**
- * Construct a new ProjectModuleFactoryDelegate.
- */
- public ProjectModuleFactoryDelegate() {
- super();
-
- factories.add(this);
-
- addListener();
- }
-
- /**
- * Cache any preexisting module.
- */
- protected void cacheModules() {
- projects = new HashMap();
- try {
- IProject[] projects2 = getWorkspaceRoot().getProjects();
- int size = projects2.length;
- for (int i = 0; i < size; i++) {
- //Trace.trace("caching: " + this + " " + projects[i] + " " + isValidModule(projects[i]));
- if (isValidModule(projects2[i])) {
- addModuleProject(projects2[i]);
- }
- }
- } catch (Exception e) {
- Trace.trace("Error caching modules", e);
- }
- fireEvents();
- }
-
- /**
- * Return the workspace root.
- *
- * @return org.eclipse.core.resources.IWorkspaceRoot
- */
- protected static IWorkspaceRoot getWorkspaceRoot() {
- return ResourcesPlugin.getWorkspace().getRoot();
- }
-
- /**
- * Returns the module project for the given project, or null
- * if this factory does not have a module for the given project.
- *
- * @param project org.eclipse.core.resources.IProject
- * @return org.eclipse.wst.server.core.model.IModuleProject
- */
- public IModule getModuleProject(IProject project) {
- try {
- return (IModule) projects.get(project);
- } catch (Exception e) {
- // ignore
- }
- return null;
- }
-
- /**
- * Add a resource listener to the workspace.
- */
- protected static void addListener() {
- if (listener != null)
- return;
-
- listener = new IResourceChangeListener() {
- public void resourceChanged(IResourceChangeEvent event) {
- Trace.trace(Trace.FINEST, "->- ProjectModuleFactoryDelegate listener responding to resource change: " + event.getType() + " ->-");
- try {
- IResourceDelta delta = event.getDelta();
-
- //if (delta.getFlags() == IResourceDelta.MARKERS || delta.getFlags() == IResourceDelta.NO_CHANGE)
- // return;
-
- delta.accept(new IResourceDeltaVisitor() {
- public boolean visit(IResourceDelta visitorDelta) {
- IResource resource = visitorDelta.getResource();
- //Trace.trace(Trace.FINEST, "resource: " + resource);
-
- // only respond changes within projects
- if (resource != null && resource instanceof IProject) {
- IProject project = (IProject) resource;
- handleGlobalProjectChange(project, visitorDelta);
- return true;
- } else if (resource != null && resource.getProject() != null) {
- return false;
- } else
- return true;
- }
- });
- } catch (Exception e) {
- //Trace.trace(Trace.SEVERE, "Error responding to resource change", e);
- }
- fireGlobalEvents();
- Trace.trace(Trace.FINEST, "-<- Done ProjectModuleFactoryDelegate responding to resource change -<-");
- }
- };
-
- ResourcesPlugin.getWorkspace().addResourceChangeListener(listener, IResourceChangeEvent.POST_CHANGE);
- }
-
- /**
- * Handle changes to a project.
- *
- * @param project org.eclipse.core.resources.IProject
- * @param delta org.eclipse.core.resources.IResourceDelta
- */
- protected static void handleGlobalProjectChange(final IProject project, IResourceDelta delta) {
- // handle project level changes
- Iterator iterator = factories.iterator();
- while (iterator.hasNext()) {
- ProjectModuleFactoryDelegate factory = (ProjectModuleFactoryDelegate) iterator.next();
- //Trace.trace("Firing to: " + factory);
- factory.handleProjectChange(project, delta);
- }
-
- // handle internal updates
- iterator = factories.iterator();
- while (iterator.hasNext()) {
- ProjectModuleFactoryDelegate factory = (ProjectModuleFactoryDelegate) iterator.next();
- //Trace.trace("Firing to: " + factory);
- factory.handleProjectInternalChange(project, delta);
- }
- }
-
- /**
- * Fire the accumulated module factory events.
- */
- protected static void fireGlobalEvents() {
- Trace.trace(Trace.FINEST, "Firing global module event");
- Iterator iterator = factories.iterator();
- while (iterator.hasNext()) {
- ProjectModuleFactoryDelegate factory = (ProjectModuleFactoryDelegate) iterator.next();
- factory.updateProjects();
- }
-
- iterator = factories.iterator();
- while (iterator.hasNext()) {
- ProjectModuleFactoryDelegate factory = (ProjectModuleFactoryDelegate) iterator.next();
- factory.fireEvents();
- }
-
- ResourceManager.getInstance().syncModuleEvents();
- }
-
- /**
- * Temporary to make sure that all project modules are updated.
- */
- private void updateProjects() {
- IModule[] modules2 = getModules();
- if (modules2 != null) {
- int size = modules2.length;
- for (int i = 0; i < size; i++) {
- if (modules2[i] instanceof ProjectModule)
- ((ProjectModule) modules2[i]).update();
- }
- }
- }
-
- /**
- * Handle changes to a project.
- *
- * @param project org.eclipse.core.resources.IProject
- * @param delta org.eclipse.core.resources.IResourceDelta
- */
- protected void handleProjectChange(final IProject project, IResourceDelta delta) {
- if (projects.containsKey(project)) {
- // already a module
- if (((delta.getKind() & IResourceDelta.REMOVED) != 0) || !isValidModule(project)) {
- removeModuleProject(project);
- }
- } else {
- // not a module
- if (isValidModule(project)) {
- addModuleProject(project);
- }
- }
- }
-
- /**
- * Handle changes to a project.
- *
- * @param project org.eclipse.core.resources.IProject
- * @param delta org.eclipse.core.resources.IResourceDelta
- */
- protected void handleProjectInternalChange(final IProject project, IResourceDelta delta) {
- final IPath[] paths = getListenerPaths();
- if (paths != null) {
- final IModule module = getModuleProject(project);
- if (module != null && module instanceof ProjectModule) {
- final int size = paths.length;
- class Temp {
- boolean found = false;
- }
- final Temp temp = new Temp();
- try {
- delta.accept(new IResourceDeltaVisitor() {
- public boolean visit(IResourceDelta visitorDelta) {
- if (temp.found)
- return false;
- IPath path = visitorDelta.getProjectRelativePath();
-
- boolean prefix = false;
- for (int i = 0; i < size && !temp.found; i++) {
- if (paths[i].equals(path))
- temp.found = true;
- else if (path.isPrefixOf(paths[i]))
- prefix = true;
- }
- if (temp.found) {
- ((ProjectModule) module).update();
- return false;
- } else if (prefix)
- return true;
- else
- return false;
- }
- });
- } catch (Exception e) {
- Trace.trace("Error searching for listening paths", e);
- }
- }
- }
- }
-
- /**
- * Add a module for the given project.
- *
- * @param project org.eclipse.core.resources.IProject
- */
- protected void addModuleProject(IProject project) {
- IModule module = createModule(project);
- if (module == null)
- return;
- projects.put(project, module);
- //modules.put(module.getId(), module);
- if (added == null)
- added = new ArrayList(2);
- added.add(module);
- }
-
- /**
- * Remove the module that represents the given project.
- *
- * @param project org.eclipse.core.resources.IProject
- */
- protected void removeModuleProject(IProject project) {
- try {
- IModule module = (IModule) projects.get(project);
- projects.remove(project);
- //modules.remove(module.getId());
- if (removed == null)
- removed = new ArrayList(2);
- removed.add(module);
- } catch (Exception e) {
- Trace.trace("Error removing module project", e);
- }
- }
-
- /**
- * Fire the accumulated module factory events.
- */
- protected void fireEvents() {
- if ((added == null || added.isEmpty()) && (removed == null || removed.isEmpty()))
- return;
-
- IModule[] add = null;
- if (added != null) {
- add = new IModule[added.size()];
- added.toArray(add);
- }
- IModule[] remove = null;
- if (removed != null) {
- remove = new IModule[removed.size()];
- removed.toArray(remove);
- }
-
- fireModuleFactoryEvent(add, remove);
- added = new ArrayList(2);
- removed = new ArrayList(2);
- }
-
- /**
- * Returns true if the project represents a module project
- * of this type.
- *
- * @param project org.eclipse.core.resources.IProject
- * @return boolean
- */
- protected abstract boolean isValidModule(IProject project);
-
- /**
- * Creates the module project for the given project.
- *
- * @param project org.eclipse.core.resources.IProject
- * @return org.eclipse.wst.server.core.model.IModuleProject
- */
- protected abstract IModule createModule(IProject project);
-
- /**
- * Returns the list of resources that the module should listen to
- * for state changes. The paths should be project relative paths.
- * Subclasses can override this method to provide the paths.
- *
- * @return org.eclipse.core.runtime.IPath[]
- */
- protected IPath[] getListenerPaths() {
- return null;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/PublishAdapter.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/PublishAdapter.java
deleted file mode 100644
index be81c2d..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/PublishAdapter.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.util;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IPublishListener;
-import org.eclipse.wst.server.core.IServer;
-/**
- *
- */
-public class PublishAdapter implements IPublishListener {
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.IPublishListener#publishStarted(org.eclipse.wst.server.core.IServer2)
- */
- public void publishStarted(IServer server) {
- // do nothing
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.IPublishListener#moduleStarting(org.eclipse.wst.server.core.IServer2, java.util.List, org.eclipse.wst.server.core.model.IModule)
- */
- public void publishModuleStarted(IServer server, IModule[] parents, IModule module) {
- // do nothing
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.IPublishListener#moduleFinished(org.eclipse.wst.server.core.IServer2, java.util.List, org.eclipse.wst.server.core.model.IModule, org.eclipse.wst.server.core.IPublishStatus)
- */
- public void publishModuleFinished(IServer server, IModule[] parents, IModule module, IStatus status) {
- // do nothing
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.IPublishListener#publishFinished(org.eclipse.wst.server.core.IServer, org.eclipse.wst.server.core.IPublishStatus)
- */
- public void publishFinished(IServer server, IStatus status) {
- // do nothing
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/RuntimeLifecycleAdapter.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/RuntimeLifecycleAdapter.java
deleted file mode 100644
index 359458f..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/RuntimeLifecycleAdapter.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.util;
-
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.IRuntimeLifecycleListener;
-/**
- *
- */
-public class RuntimeLifecycleAdapter implements IRuntimeLifecycleListener {
- public void runtimeAdded(IRuntime runtime) {
- // do nothing
- }
-
- public void runtimeChanged(IRuntime runtime) {
- // do nothing
- }
-
- public void runtimeRemoved(IRuntime runtime) {
- // do nothing
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/ServerAdapter.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/ServerAdapter.java
deleted file mode 100644
index 600d2b0..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/ServerAdapter.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.util;
-
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.IServerListener;
-/**
- * Helper class which implements all of the IServerListener
- * interface with empty methods.
- */
-public class ServerAdapter implements IServerListener {
- /**
- * ServerAdapter constructor comment.
- */
- public ServerAdapter() {
- super();
- }
-
- /**
- * Called when the server configuration's sync state changes.
- *
- * @param server org.eclipse.wst.server.model.IServer
- */
- public void configurationSyncStateChange(IServer server) {
- // do nothing
- }
-
- /**
- * Called when the server isRestartNeeded() property changes.
- *
- * @param server org.eclipse.wst.server.model.IServer
- */
- public void restartStateChange(IServer server) {
- // do nothing
- }
-
- /**
- * Notification when the server state has changed.
- *
- * @param server org.eclipse.wst.server.model.IServer
- */
- public void serverStateChange(IServer server) {
- // do nothing
- }
-
- /**
- * Notification when the state of a module has changed.
- *
- * @param server org.eclipse.wst.server.model.IServer
- */
- public void moduleStateChange(IServer server, IModule module) {
- // do nothing
- }
-
- public void modulesChanged(IServer server) {
- // do nothing
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.IPublishListener#moduleStateChange(org.eclipse.wst.server.core.IServer2, java.util.List, org.eclipse.wst.server.core.model.IModule)
- */
- public void moduleStateChange(IServer server, IModule[] parents, IModule module) {
- // do nothing
- }
-
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/ServerLifecycleAdapter.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/ServerLifecycleAdapter.java
deleted file mode 100644
index 35c5032..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/ServerLifecycleAdapter.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.util;
-
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.IServerLifecycleListener;
-/**
- *
- */
-public class ServerLifecycleAdapter implements IServerLifecycleListener {
- public void serverAdded(IServer server) {
- // do nothing
- }
-
- public void serverChanged(IServer server) {
- // do nothing
- }
-
- public void serverRemoved(IServer server) {
- // do nothing
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/ServerPort.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/ServerPort.java
deleted file mode 100644
index f85a715..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/ServerPort.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.util;
-
-import org.eclipse.wst.server.core.IServerPort;
-/**
- * A port on a server configuration.
- */
-public class ServerPort implements IServerPort {
- private String id;
- private String name;
- private int port;
- private String protocol;
- private String[] contentTypes;
- private boolean advanced;
-
- /**
- * ServerPort constructor comment.
- */
- public ServerPort(String id, String name, int port, String protocol) {
- this(id, name, port, protocol, null, true);
- }
-
- public ServerPort(String id, String name, int port, String protocol, boolean advanced) {
- this(id, name, port, protocol, null, advanced);
- }
-
- public ServerPort(String id, String name, int port, String protocol, String[] contentTypes, boolean advanced) {
- super();
- this.id = id;
- this.name = name;
- this.port = port;
- this.protocol = protocol;
- this.contentTypes = contentTypes;
- this.advanced = advanced;
- }
-
- /**
- * ServerPort constructor comment.
- */
- public ServerPort(String name, int port, String protocol) {
- this(null, name, port, protocol);
- }
-
- /**
- * Return an optional internal id used to identify this port.
- *
- * @return java.lang.String
- */
- public String getId() {
- return id;
- }
-
- /**
- * Return the name of the port.
- *
- * @return java.lang.String
- */
- public String getName() {
- return name;
- }
-
- /**
- * Return the actual port number.
- * @return int
- */
- public int getPort() {
- return port;
- }
-
- /**
- * Returns the protocol, e.g. HTTP of this port. Returns null
- * if the protocol is unknown.
- *
- * @return java.lang.String
- */
- public String getProtocol() {
- return protocol;
- }
-
- /**
- * Returns the content that this port would normally serve, or null
- * if the content is unknown.
- *
- * @return java.lang.String[]
- */
- public String[] getContentTypes() {
- return contentTypes;
- }
-
- /**
- * Returns true if this port is an "advanced" port and should not be shown
- * to novice users.
- *
- * @return boolean
- */
- public boolean isAdvanced() {
- return advanced;
- }
-
- public boolean equals(Object obj) {
- if (!(obj instanceof ServerPort))
- return false;
- ServerPort sp = (ServerPort) obj;
- return (sp.port == port);
- }
-
- public int hashCode() {
- return port;
- }
-
- public String toString() {
- return "ServerPort [" + getName() + ", " + getId() + ", " + getPort() + ", " + getProtocol() + "]";
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/SocketUtil.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/SocketUtil.java
deleted file mode 100644
index 9dd636d..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/SocketUtil.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.util;
-
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.ServerSocket;
-import java.net.SocketException;
-import java.util.Random;
-
-import org.eclipse.wst.server.core.internal.Trace;
-
-import sun.net.spi.nameservice.dns.DNSNameService;
-/**
- *
- */
-public class SocketUtil {
- private static final Random fgRandom = new Random(System.currentTimeMillis());
-
- /**
- * Finds an unused port between the given from and to values.
- *
- * @param host
- * @param searchFrom
- * @param searchTo
- * @return
- */
- public static int findUnusedPort(int searchFrom, int searchTo) {
- for (int i = 0; i < 10; i++) {
- int port = getRandomPort(searchFrom, searchTo);
- if (!isPortInUse(port))
- return port;
- }
- return -1;
- }
-
- private static int getRandomPort(int low, int high) {
- return (int)(fgRandom.nextFloat()*(high-low))+low;
- }
-
- /**
- * Returns true if this port is in use. Retries every 500ms for "count" tries.
- *
- * @return boolean
- * @param port int
- * @param count int
- */
- public static boolean isPortInUse(int port, int count) {
- boolean inUse = isPortInUse(port);
- while (inUse && count > 0) {
- try {
- Thread.sleep(500);
- } catch (Exception e) {
- // ignore
- }
- inUse = isPortInUse(port);
- count --;
- }
-
- return inUse;
- }
-
- /**
- * Returns true if this port is in use.
- *
- * @return boolean
- * @param port int
- */
- public static boolean isPortInUse(int port) {
- ServerSocket s = null;
- try {
- s = new ServerSocket(port);
- } catch (SocketException e) {
- return true;
- } catch (IOException e) {
- return true;
- } catch (Exception e) {
- return true;
- } finally {
- if (s != null) {
- try {
- s.close();
- } catch (Exception e) {
- // ignore
- }
- }
- }
-
- return false;
- }
-
- private static String dnsHostname;
-
- public static boolean isLocalhost(String host) {
- if (host == null)
- return false;
- try {
- if ("localhost".equals(host) || "127.0.0.1".equals(host))
- return true;
-
- InetAddress localHostaddr = InetAddress.getLocalHost();
- if (localHostaddr.getHostName().equals(host) || host.equals(localHostaddr.getCanonicalHostName()))
- return true;
-
- if (localHostaddr.getHostAddress().equals(host))
- return true;
-
- if (dnsHostname == null)
- try {
- DNSNameService dns = new DNSNameService();
- dnsHostname = dns.getHostByAddr(localHostaddr.getAddress());
- } catch (Throwable t) {
- dnsHostname = "*****************";
- }
-
- if (dnsHostname != null && dnsHostname.equals(host))
- return true;
- } catch (Exception e) {
- Trace.trace(Trace.WARNING, "Error checking for localhost", e);
- }
- return false;
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/Task.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/Task.java
deleted file mode 100644
index dd5f7fc..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/Task.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.util;
-
-import org.eclipse.wst.server.core.*;
-/**
- *
- */
-public abstract class Task implements ITask {
- protected ITaskModel model;
- protected String label;
- protected String description;
-
- public Task() {
- // do nothing
- }
-
- public Task(String label, String description) {
- this.label = label;
- this.description = description;
- }
-
- public String getName() {
- return label;
- }
-
- public String getDescription() {
- return description;
- }
-
- public ITaskModel getTaskModel() {
- return model;
- }
-
- public void setTaskModel(ITaskModel taskModel) {
- this.model = taskModel;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.ui.internal.task.ITask#canExecute()
- */
- public boolean canExecute() {
- return true;
- }
-
- public boolean canUndo() {
- return false;
- }
-
- public void undo() {
- // do nothing
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/TaskModel.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/TaskModel.java
deleted file mode 100644
index 8b30890..0000000
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/util/TaskModel.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.util;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.wst.server.core.*;
-/**
- *
- */
-public class TaskModel implements ITaskModel {
- protected Map map = new HashMap();
-
- public Object getObject(String id) {
- try {
- return map.get(id);
- } catch (Exception e) {
- return null;
- }
- }
-
- public void putObject(String id, Object obj) {
- map.put(id, obj);
- }
-}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/DeleteServerDialog.java b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/DeleteServerDialog.java
index 5fa7f0b..272d20c 100644
--- a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/DeleteServerDialog.java
+++ b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/DeleteServerDialog.java
@@ -10,7 +10,10 @@
**********************************************************************/
package org.eclipse.wst.server.ui.internal;
-import org.eclipse.core.resources.IFolder;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.dialogs.Dialog;
@@ -26,28 +29,31 @@
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.actions.WorkspaceModifyOperation;
-import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.IElement;
/**
* Dialog that prompts a user to delete server(s) and/or server configuration(s).
*/
public class DeleteServerDialog extends Dialog {
- protected IServer[] servers;
- protected IFolder[] configs;
+ protected List deleteList;
+ protected List configList;
protected Button check;
/**
* DeleteServerDialog constructor comment.
* @param parentShell org.eclipse.swt.widgets.Shell
+ * @
*/
- public DeleteServerDialog(Shell parentShell, IServer[] servers, IFolder[] configs) {
+ public DeleteServerDialog(Shell parentShell, List deleteList, List configList) {
super(parentShell);
- if (servers == null || configs == null)
- throw new IllegalArgumentException();
+ if (deleteList == null)
+ deleteList = new ArrayList(0);
+ if (configList == null)
+ configList = new ArrayList(0);
- this.servers = servers;
- this.configs = configs;
+ this.deleteList = deleteList;
+ this.configList = configList;
setBlockOnOpen(true);
}
@@ -77,19 +83,21 @@
//WorkbenchHelp.setHelp(composite, ContextIds.TERMINATE_SERVER_DIALOG);
Label label = new Label(composite, SWT.NONE);
- if (servers.length == 1) {
- label.setText(ServerUIPlugin.getResource("%deleteServerResourceDialogMessage", servers[0].getName()));
+ if (deleteList.size() == 1) {
+ IElement element = (IElement) deleteList.get(0);
+ label.setText(ServerUIPlugin.getResource("%deleteServerResourceDialogMessage", element.getName()));
} else
- label.setText(ServerUIPlugin.getResource("%deleteServerResourceDialogMessageMany", servers.length + ""));
+ label.setText(ServerUIPlugin.getResource("%deleteServerResourceDialogMessageMany", deleteList.size() + ""));
label.setLayoutData(new GridData());
- if (configs.length > 0) {
+ if (!configList.isEmpty()) {
check = new Button(composite, SWT.CHECK);
- if (configs.length == 1) {
- check.setText(ServerUIPlugin.getResource("%deleteServerResourceDialogLooseConfigurations", configs[0].getName()));
+ if (configList.size() == 1) {
+ IElement element = (IElement) configList.get(0);
+ check.setText(ServerUIPlugin.getResource("%deleteServerResourceDialogLooseConfigurations", element.getName()));
} else
- check.setText(ServerUIPlugin.getResource("%deleteServerResourceDialogLooseConfigurationsMany", configs.length + ""));
+ check.setText(ServerUIPlugin.getResource("%deleteServerResourceDialogLooseConfigurationsMany", configList.size() + ""));
check.setSelection(true);
check.setLayoutData(new GridData());
}
@@ -106,15 +114,17 @@
WorkspaceModifyOperation op = new WorkspaceModifyOperation() {
protected void execute(IProgressMonitor monitor) throws CoreException {
try {
- int size = servers.length;
- for (int i = 0; i < size; i++) {
- servers[0].delete();
+ Iterator iterator = deleteList.iterator();
+ while (iterator.hasNext()) {
+ IElement element = (IElement) iterator.next();
+ element.delete();
}
if (checked) {
- size = configs.length;
- for (int i = 0; i < size; i++) {
- configs[i].delete(true, true, monitor);
+ iterator = configList.iterator();
+ while (iterator.hasNext()) {
+ IElement element = (IElement) iterator.next();
+ element.delete();
}
}
} catch (Exception e) {
diff --git a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/ProjectPropertyPage.java b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/ProjectPropertyPage.java
index c606de9..8cba50d 100644
--- a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/ProjectPropertyPage.java
+++ b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/ProjectPropertyPage.java
@@ -70,14 +70,12 @@
Label label = new Label(composite, SWT.WRAP);
label.setText(ServerUIPlugin.getResource("%prefProjectDescription"));
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
+ GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
data.horizontalSpan = 3;
data.widthHint = 200;
label.setLayoutData(data);
- IModule[] modules = ServerUtil.getModules(project);
- if (modules != null && modules.length > 0)
- module = modules[0];
+ module = ServerUtil.getModules(project)[0];
if (module == null) {
label = new Label(composite, SWT.NONE);
diff --git a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/SWTUtil.java b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/SWTUtil.java
index 48e7031..f011360 100644
--- a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/SWTUtil.java
+++ b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/SWTUtil.java
@@ -49,6 +49,7 @@
initializeDialogUnits(comp);
GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_BEGINNING);
data.widthHint = getButtonWidthHint(b);
+ data.heightHint = Dialog.convertVerticalDLUsToPixels(fontMetrics, IDialogConstants.BUTTON_HEIGHT);
b.setLayoutData(data);
return b;
}
diff --git a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/ServerTree.java b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/ServerTree.java
index a78c46d..81a7919 100644
--- a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/ServerTree.java
+++ b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/ServerTree.java
@@ -339,14 +339,14 @@
if (obj instanceof ServerElementAdapter)
list.add(((ServerElementAdapter) obj).getObject());
- else if (obj instanceof IServer)
+ else
list.add(obj);
}
- IServer[] servers = new IServer[list.size()];
- list.toArray(servers);
+ Object[] res = new Object[list.size()];
+ list.toArray(res);
- Action delete = new DeleteAction(shell, servers);
+ Action delete = new DeleteAction(shell, res);
delete.run();
return true;
}
diff --git a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/actions/DeleteActionDelegate.java b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/actions/DeleteActionDelegate.java
index e54c7a8..7b8540b 100644
--- a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/actions/DeleteActionDelegate.java
+++ b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/actions/DeleteActionDelegate.java
@@ -17,6 +17,7 @@
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.wst.server.core.IRuntime;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.ui.internal.view.servers.DeleteAction;
import org.eclipse.wst.server.ui.internal.view.tree.ServerElementAdapter;
@@ -27,7 +28,7 @@
*
*/
public class DeleteActionDelegate implements IWorkbenchWindowActionDelegate {
- protected IServer[] servers;
+ protected Object[] resources;
protected Shell shell;
/**
@@ -49,9 +50,9 @@
* @see org.eclipse.ui.IActionDelegate#run(IAction)
*/
public void run(IAction action) {
- if (action != null && action.isEnabled() && servers != null)
+ if (action != null && action.isEnabled() && resources != null)
return;
- DeleteAction delete = new DeleteAction(shell, servers);
+ DeleteAction delete = new DeleteAction(shell, resources);
delete.run();
}
@@ -59,7 +60,7 @@
* @see org.eclipse.ui.IActionDelegate#selectionChanged(IAction, ISelection)
*/
public void selectionChanged(IAction action, ISelection selection) {
- servers = null;
+ resources = null;
if (selection == null || selection.isEmpty() || !(selection instanceof IStructuredSelection)) {
action.setEnabled(false);
return;
@@ -72,7 +73,9 @@
while (iterator.hasNext()) {
Object obj = iterator.next();
- if (obj instanceof IServer)
+ if (obj instanceof IRuntime)
+ list.add(obj);
+ else if (obj instanceof IServer)
list.add(obj);
else if (obj instanceof ServerElementAdapter)
list.add(((ServerElementAdapter) obj).getObject());
@@ -82,8 +85,8 @@
}
}
- servers = new IServer[list.size()];
- list.toArray(servers);
+ resources = new Object[list.size()];
+ list.toArray(resources);
action.setEnabled(true);
}
}
\ No newline at end of file
diff --git a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/editor/GlobalCommandManager.java b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/editor/GlobalCommandManager.java
index f3e8e6f..42d9fb4 100644
--- a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/editor/GlobalCommandManager.java
+++ b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/editor/GlobalCommandManager.java
@@ -24,7 +24,12 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.wst.server.core.*;
+import org.eclipse.wst.server.core.IElement;
+import org.eclipse.wst.server.core.IElementWorkingCopy;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
+import org.eclipse.wst.server.core.ITask;
+import org.eclipse.wst.server.core.ServerCore;
import org.eclipse.wst.server.ui.ServerUICore;
import org.eclipse.wst.server.ui.editor.ICommandManager;
import org.eclipse.wst.server.ui.editor.IServerEditorPartInput;
@@ -69,7 +74,7 @@
String id;
// the working copy
- IServerWorkingCopy wc;
+ IElementWorkingCopy wc;
// files and timestamps
Map fileMap;
@@ -244,7 +249,7 @@
if (serverInfo == null)
return null;
- server = serverInfo.wc;
+ server = (IServerWorkingCopy) serverInfo.wc;
serverReadOnly = serverInfo.isReadOnly;
}
@@ -254,7 +259,7 @@
/**
*
*/
- protected IServerWorkingCopy getServerResource(String id) {
+ protected IElement getServerResource(String id) {
CommandManagerInfo info = getExistingCommandManagerInfo(id);
if (info == null)
return null;
@@ -548,10 +553,12 @@
/**
*
*/
- public static IFile[] getReadOnlyFiles(IServerAttributes server) {
+ public static IFile[] getReadOnlyFiles(IElement element) {
try {
List list = new ArrayList();
- IFile file = server.getFile();
+ IFile file = null;
+ if (element instanceof IServer)
+ file = ((IServer) element).getFile();
if (file != null)
list.add(file);
@@ -623,8 +630,10 @@
}
protected static int getTimestamp(CommandManagerInfo info) {
- IServerAttributes element = info.wc;
- IServerAttributes element2 = ((IServerWorkingCopy) element).getOriginal();
+ IElement element = info.wc;
+ IElement element2 = null;
+ if (element instanceof IServer)
+ element2 = ((IServerWorkingCopy) element).getOriginal();
if (element2 != null)
return element2.getTimestamp();
diff --git a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/editor/ServerEditor.java b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/editor/ServerEditor.java
index 28cd3cb..a6c3f66 100644
--- a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/editor/ServerEditor.java
+++ b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/editor/ServerEditor.java
@@ -634,7 +634,7 @@
if (serverId != null) {
commandManager.getCommandManager(serverId);
- server = commandManager.getServerResource(serverId);
+ server = (IServerWorkingCopy) commandManager.getServerResource(serverId);
}
ILabelProvider labelProvider = ServerUICore.getLabelProvider();
@@ -666,7 +666,7 @@
} else if (GlobalCommandManager.PROP_RELOAD.equals(event.getPropertyName())) {
Object obj = event.getOldValue();
if (obj == serverId) {
- server = commandManager.getServerResource(serverId);
+ server = (IServerWorkingCopy) commandManager.getServerResource(serverId);
refresh();
}
}
diff --git a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/editor/ServerResourceCommandManager.java b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/editor/ServerResourceCommandManager.java
index 60c348d..17347a9 100644
--- a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/editor/ServerResourceCommandManager.java
+++ b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/editor/ServerResourceCommandManager.java
@@ -15,7 +15,10 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.wst.server.core.*;
+import org.eclipse.wst.server.core.IElement;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
+import org.eclipse.wst.server.core.ITask;
import org.eclipse.wst.server.ui.editor.ICommandManager;
import org.eclipse.wst.server.ui.internal.ServerUIPlugin;
/**
@@ -86,7 +89,7 @@
return false;
}
// check file timestamp
- IServerAttributes serverfile = commandManager.getServerResource(id);
+ IElement serverfile = commandManager.getServerResource(id);
if (commandManager.hasChanged(id)) {
if (serverfile instanceof IServer)
editor.promptReloadServerFile(id, (IServerWorkingCopy) serverfile);
diff --git a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/view/servers/DeleteAction.java b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/view/servers/DeleteAction.java
index 0583929..9e0fef3 100644
--- a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/view/servers/DeleteAction.java
+++ b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/view/servers/DeleteAction.java
@@ -13,10 +13,7 @@
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.core.resources.IFolder;
import org.eclipse.jface.action.Action;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.ServerCore;
import org.eclipse.wst.server.ui.internal.DeleteServerDialog;
import org.eclipse.wst.server.ui.internal.ServerUIPlugin;
import org.eclipse.swt.widgets.Shell;
@@ -24,61 +21,55 @@
* Action for deleting server resources.
*/
public class DeleteAction extends Action {
- protected IServer[] servers;
- protected IFolder[] configs;
+ protected List deleteList = new ArrayList();
+ protected List deleteExtraList = new ArrayList();
protected Shell shell;
/**
* DeleteAction constructor comment.
*/
- public DeleteAction(Shell shell, IServer server) {
- this(shell, new IServer[] { server });
+ public DeleteAction(Shell shell, Object serverResource) {
+ this(shell, new Object[] { serverResource });
}
/**
* DeleteAction constructor comment.
*/
- public DeleteAction(Shell shell, IServer[] servers) {
+ public DeleteAction(Shell shell, Object[] serverResources) {
super(ServerUIPlugin.getResource("%actionDelete"));
this.shell = shell;
- this.servers = servers;
-
- List list = new ArrayList();
-
- int size = servers.length;
+ int size = serverResources.length;
for (int i = 0; i < size; i++) {
- if (servers[i].getServerConfiguration() != null)
- list.add(servers[i].getServerConfiguration());
+ deleteList.add(serverResources[i]);
}
- // remove configurations that are still referenced by other servers
- IServer[] servers2 = ServerCore.getServers();
- if (servers2 != null) {
- int size2 = servers2.length;
- for (int j = 0; j < size2; j++) {
- boolean found = false;
- for (int i = 0; i < size; i++) {
- if (servers[i].equals(servers2[j]))
- found = true;
- }
- if (!found) {
- IFolder folder = servers2[j].getServerConfiguration();
- if (folder != null && list.contains(folder))
- list.remove(folder);
- }
+ // TODO: delete server config
+ /*for (int i = 0; i < size; i++) {
+ if (serverResources[i] instanceof IServer) {
+ IServer server = (IServer) serverResources[i];
}
}
- configs = new IFolder[list.size()];
- list.toArray(configs);
+ // remove configurations that are still referenced
+ IServer[] servers = ServerCore.getServers();
+ if (servers != null) {
+ int size2 = servers.length;
+ for (int i = 0; i < size2; i++) {
+ if (!deleteList.contains(servers[i])) {
+ IServerConfiguration config = servers[i].getServerConfiguration();
+ if (deleteExtraList.contains(config))
+ deleteExtraList.remove(config);
+ }
+ }
+ }*/
}
/**
* Invoked when an action occurs.
*/
public void run() {
- DeleteServerDialog dsd = new DeleteServerDialog(shell, servers, configs);
+ DeleteServerDialog dsd = new DeleteServerDialog(shell, deleteList, deleteExtraList);
dsd.open();
}
}
\ No newline at end of file