blob: 3019a755f1989d51a5a73a139456f6a47e816b2a [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 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 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jst.ws.internal.common;
import org.eclipse.jst.ws.internal.plugin.WebServicePlugin;
import org.eclipse.wst.command.internal.env.core.data.Transformer;
import org.eclipse.wst.command.internal.env.core.selection.SelectionList;
public class String2TestFacilityListTransformer implements Transformer {
public Object transform(Object value) {
String testFacility = (String)value;
//value represents name of a test facility
//pick up list of test facilities
String[] testTypes = WebServicePlugin.getInstance().getScenarioContext().getWebServiceTestTypes();
int index = 0;
//match value to name of test facility and set index accordingly
for (int i = 0; i < testTypes.length; i++) {
if (testTypes[i].equals(testFacility))
{
break;
}
index++;
}
SelectionList selectionList = new SelectionList(testTypes, index);
return selectionList;
}
}