package org.eclipes.stp.soas.deploy.runtime.jaxwsri.core.internal;

import java.util.ArrayList;
import java.util.List;

import org.eclipes.stp.soas.deploy.runtime.jaxwsri.JaxwsRIRuntimePlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
import org.eclipse.stp.sc.common.runtime.IExtRuntimeProcessor;
import org.eclipse.wst.server.core.IRuntime;

public class JaxwsRIExtRuntimeProcessor implements IExtRuntimeProcessor{
	public List<IClasspathEntry> getRuntimeClasspathEntry(IRuntime runtime) {
		IJaxwsRIVersionHandler handler = JaxwsRIRuntimePlugin.getRIVersionHandler(runtime.getRuntimeType().getId());
		List<IRuntimeClasspathEntry> libs = handler.getRuntimeClasspath(runtime.getLocation());
		if(libs != null){
			List<IClasspathEntry> retValue = new ArrayList<IClasspathEntry>();
			for(IRuntimeClasspathEntry lib : libs){
				retValue.add(lib.getClasspathEntry());
			}
			return retValue;
		}
		return null;
	}

	public void setInitializationData(IConfigurationElement config,
			String propertyName, Object data) throws CoreException {
		// TODO Auto-generated method stub

	}
}
