Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'core/bundles/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/command/data/ServerInstToIServerTransformer.java')
-rw-r--r--core/bundles/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/command/data/ServerInstToIServerTransformer.java38
1 files changed, 38 insertions, 0 deletions
diff --git a/core/bundles/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/command/data/ServerInstToIServerTransformer.java b/core/bundles/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/command/data/ServerInstToIServerTransformer.java
new file mode 100644
index 000000000..6f881ca49
--- /dev/null
+++ b/core/bundles/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/command/data/ServerInstToIServerTransformer.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2005 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
+ *******************************************************************************/
+/*
+ * Created on Apr 20, 2004
+ */
+package org.eclipse.jst.ws.internal.consumption.ui.command.data;
+
+import org.eclipse.wst.command.internal.env.core.data.Transformer;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.ServerCore;
+
+/*
+ * Transforms a server instance id to an IServer
+ */
+public class ServerInstToIServerTransformer implements Transformer {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.command.internal.env.core.data.Transformer#transform(java.lang.Object)
+ */
+ public Object transform(Object value) {
+
+ String existingServerInstId = (String)value;
+ IServer serverInst = null;
+ if (existingServerInstId != null) {
+ serverInst = ServerCore.findServer(existingServerInstId);
+ }
+ return serverInst;
+ }
+
+}

Back to the top