Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkchan2005-09-27 05:09:04 +0000
committerkchan2005-09-27 05:09:04 +0000
commite256cdef626c6ebe10909f6ed318d264f05c5f55 (patch)
treead9c645c9c71610062a1206044d4a5401080ac54 /bundles/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/common/ServerSelectionUtils.java
parentcb8c8f06121c49e77c5980ce4f7b6a5cee03cb78 (diff)
downloadwebtools.webservices-e256cdef626c6ebe10909f6ed318d264f05c5f55.tar.gz
webtools.webservices-e256cdef626c6ebe10909f6ed318d264f05c5f55.tar.xz
webtools.webservices-e256cdef626c6ebe10909f6ed318d264f05c5f55.zip
[110362] Move commands over to using EnvironmentOperations.
Diffstat (limited to 'bundles/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/common/ServerSelectionUtils.java')
-rw-r--r--bundles/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/common/ServerSelectionUtils.java77
1 files changed, 1 insertions, 76 deletions
diff --git a/bundles/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/common/ServerSelectionUtils.java b/bundles/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/common/ServerSelectionUtils.java
index 2c14bda5f..26ff13fa3 100644
--- a/bundles/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/common/ServerSelectionUtils.java
+++ b/bundles/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/common/ServerSelectionUtils.java
@@ -27,7 +27,6 @@ import org.eclipse.jst.ws.internal.consumption.common.IServerDefaulter;
import org.eclipse.jst.ws.internal.consumption.common.ServerInfo;
import org.eclipse.jst.ws.internal.consumption.ui.plugin.WebServiceConsumptionUIPlugin;
import org.eclipse.jst.ws.internal.consumption.ui.preferences.PersistentServerRuntimeContext;
-import org.eclipse.jst.ws.internal.consumption.ui.wizard.WebServiceServerRuntimeTypeRegistry;
import org.eclipse.jst.ws.internal.consumption.ui.wsrt.WebServiceRuntimeExtensionUtils;
import org.eclipse.jst.ws.internal.consumption.ui.wsrt.WebServiceRuntimeInfo;
import org.eclipse.wst.server.core.IRuntime;
@@ -251,29 +250,6 @@ public class ServerSelectionUtils
return null;
}
- /*
- * Given a list of existing servers, this returns the first one that is supported
- * by the given Web service type id.
- * Returns null of there are no supported servers in the array.
- * @deprecated
- */
- /*
- public static IServer getFirstSupportedServer(IServer[] servers, String typeId)
- {
- WebServiceServerRuntimeTypeRegistry wssrtRegistry = WebServiceServerRuntimeTypeRegistry.getInstance();
- if (servers != null && servers.length > 0) {
- for (int i = 0; i < servers.length; i++)
- {
- String serverFactoryId = servers[i].getServerType().getId();
- if (wssrtRegistry.isServerSupportedForChosenType(typeId, serverFactoryId))
- {
- return servers[i];
- }
- }
- }
- return null;
- }
- */
/*
* Returns the factory id of a server type compatible with the Web service type and the runtime target.
@@ -282,8 +258,6 @@ public class ServerSelectionUtils
public static String getFirstSupportedServerType(IRuntime runtimeTarget, String webServiceRuntimeId)
{
String runtimeId = runtimeTarget.getRuntimeType().getId();
- //WebServiceServerRuntimeTypeRegistry wssrtRegistry = WebServiceServerRuntimeTypeRegistry.getInstance();
- //String[] serverFactoryIds = wssrtRegistry.getServerFactoryIdsByType(typeId);
WebServiceRuntimeInfo wsrt = WebServiceRuntimeExtensionUtils.getWebServiceRuntimeById(webServiceRuntimeId);
String[] serverFactoryIds = wsrt.getServerFactoryIds();
for (int i=0; i<serverFactoryIds.length; i++)
@@ -300,31 +274,6 @@ public class ServerSelectionUtils
return null;
}
- /*
- * Returns the factory id of a server type compatible with the Web service type and the runtime target.
- * Returns null if there are none.
- * @deprecated
- */
- /*
- public static String getFirstSupportedServerType(IRuntime runtimeTarget, String typeId)
- {
- String runtimeId = runtimeTarget.getRuntimeType().getId();
- WebServiceServerRuntimeTypeRegistry wssrtRegistry = WebServiceServerRuntimeTypeRegistry.getInstance();
- String[] serverFactoryIds = wssrtRegistry.getServerFactoryIdsByType(typeId);
- for (int i=0; i<serverFactoryIds.length; i++)
- {
- IServerType serverType = ServerCore.findServerType(serverFactoryIds[i]);
- if (serverType!=null){
- String serverRuntimeId = serverType.getRuntimeType().getId();
- if (serverRuntimeId.equals(runtimeId))
- {
- return serverFactoryIds[i];
- }
- }
- }
- return null;
- }
- */
/*
* Return the factory id of the first server type compatible with the runtimeTargets and webServiceRuntimeId.
@@ -506,29 +455,6 @@ public class ServerSelectionUtils
}
/**
- *
- * @param runtimeTargets
- * @param webServiceRuntimeId
- * @return
- * @deprecated
- */
- private static List getRuntimeTargetsSupportedByWSRuntime(List runtimeTargets, String webServiceRuntimeId)
- {
- ArrayList suppRuntimeTargets = new ArrayList();
- WebServiceServerRuntimeTypeRegistry wssrtReg = WebServiceServerRuntimeTypeRegistry.getInstance();
- for (int i=0; i<runtimeTargets.size(); i++)
- {
- IRuntime runtimeTarget = (IRuntime)runtimeTargets.get(i);
- String rtId = runtimeTarget.getRuntimeType().getId();
- if (wssrtReg.doesRuntimeSupportServerTarget(rtId, webServiceRuntimeId));
- {
- suppRuntimeTargets.add(runtimeTarget);
- }
- }
- return suppRuntimeTargets;
- }
-
- /**
* Use this method to get a server factory id and instance id that is compatible with the given Web
* service runtime.
* @param webServiceRuntimeId
@@ -538,10 +464,9 @@ public class ServerSelectionUtils
public static String[] getServerFromWebServceRuntimeAndJ2EE(String webServiceRuntimeId, String j2eeVersion)
{
String[] serverInfo = new String[2];
- //WebServiceServerRuntimeTypeRegistry wssrtReg = WebServiceServerRuntimeTypeRegistry.getInstance();
//Get all possible valid servers. If there are none, we can't default intelligently, return null.
- //String[] validServerFactoryIds = wssrtReg.getServerFactoryIDByRuntimeID(webServiceRuntimeId);
+
WebServiceRuntimeInfo wsrt = WebServiceRuntimeExtensionUtils.getWebServiceRuntimeById(webServiceRuntimeId);
String[] validServerFactoryIds = wsrt.getServerFactoryIds();
if (validServerFactoryIds==null || validServerFactoryIds.length<1)

Back to the top