package net.sf.taverna.t2.servicedescriptions;

import java.io.File;
import java.util.List;
import java.util.Set;

import net.sf.taverna.t2.lang.observer.Observable;
import net.sf.taverna.t2.servicedescriptions.events.ServiceDescriptionRegistryEvent;
import net.sf.taverna.t2.workflowmodel.serialization.DeserializationException;

public interface ServiceDescriptionRegistry extends
		Observable<ServiceDescriptionRegistryEvent> {

	public void addServiceDescriptionProvider(
			ServiceDescriptionProvider provider);

	public Set<ServiceDescriptionProvider> getDefaultServiceDescriptionProviders();

	public Set<ServiceDescriptionProvider> getServiceDescriptionProviders();
	
	public Set<ServiceDescriptionProvider> getServiceDescriptionProviders(ServiceDescription sd);
	
	@SuppressWarnings("unchecked")
	public Set<ServiceDescription> getServiceDescriptions();

	@SuppressWarnings("unchecked")
	public List<ConfigurableServiceProvider> getUnconfiguredServiceProviders();

	public Set<ServiceDescriptionProvider> getUserAddedServiceProviders();

	public Set<ServiceDescriptionProvider> getUserRemovedServiceProviders();

	public void loadServiceProviders() throws DeserializationException;

	public void loadServiceProviders(File serviceProviderFile)
			throws DeserializationException;

	public void refresh();

	public void removeServiceDescriptionProvider(
			ServiceDescriptionProvider provider);

	public void saveServiceDescriptions();

	public void saveServiceDescriptions(File serviceDescriptionsFile);
	
	public void exportCurrentServiceDescriptions(File serviceDescriptionsFile);

}

package net.sf.taverna.t2.servicedescriptions;

import java.io.File;
import java.net.URL;
import java.util.List;
import java.util.Set;

import net.sf.taverna.t2.lang.observer.Observable;
import net.sf.taverna.t2.servicedescriptions.events.ServiceDescriptionRegistryEvent;
import net.sf.taverna.t2.workflowmodel.serialization.DeserializationException;

public interface ServiceDescriptionRegistry extends
		Observable<ServiceDescriptionRegistryEvent> {

	public void addServiceDescriptionProvider(
			ServiceDescriptionProvider provider);

	public Set<ServiceDescriptionProvider> getDefaultServiceDescriptionProviders();

	public Set<ServiceDescriptionProvider> getServiceDescriptionProviders();
	
	public Set<ServiceDescriptionProvider> getServiceDescriptionProviders(ServiceDescription sd);
	
	@SuppressWarnings("unchecked")
	public Set<ServiceDescription> getServiceDescriptions();

	@SuppressWarnings("unchecked")
	public List<ConfigurableServiceProvider> getUnconfiguredServiceProviders();

	public Set<ServiceDescriptionProvider> getUserAddedServiceProviders();

	public Set<ServiceDescriptionProvider> getUserRemovedServiceProviders();

	public void loadServiceProviders() throws DeserializationException;

	public void loadServiceProviders(File serviceProvidersURL)
			throws DeserializationException;

	public void loadServiceProviders(URL serviceProvidersURL)
			throws DeserializationException;

	public void refresh();

	public void removeServiceDescriptionProvider(
			ServiceDescriptionProvider provider);

	public void saveServiceDescriptions();

	public void saveServiceDescriptions(File serviceDescriptionsFile);
	
	public void exportCurrentServiceDescriptions(File serviceDescriptionsFile);

}

Fix for T2-674: Hardcoded default locations. Added loading of service descriptions from a URL.
Fix for T2-674: Hardcoded default locations. Added loading of service descriptions from a URL.

git-svn-id: 10833e805afea9e5a6509b27c1b8b6924566be5c@10140 bf327186-88b3-11dd-a302-d386e5130c1c
