View Javadoc

1   /*
2    *  soapUI, copyright (C) 2004-2009 eviware.com 
3    *
4    *  soapUI is free software; you can redistribute it and/or modify it under the 
5    *  terms of version 2.1 of the GNU Lesser General Public License as published by 
6    *  the Free Software Foundation.
7    *
8    *  soapUI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without 
9    *  even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
10   *  See the GNU Lesser General Public License for more details at gnu.org.
11   */
12  
13  package com.eviware.soapui.model.project;
14  
15  import java.util.HashMap;
16  import java.util.Map;
17  
18  import com.eviware.soapui.impl.wsdl.WsdlProjectFactory;
19  
20  public class ProjectFactoryRegistry
21  {
22  	private static Map<String, ProjectFactory<?>> factories = new HashMap<String, ProjectFactory<?>>();
23  
24  	static
25  	{
26  		factories.put( WsdlProjectFactory.WSDL_TYPE, new WsdlProjectFactory() );
27  	}
28  
29  	public static ProjectFactory<?> getProjectFactory( String projectType )
30  	{
31  		return factories.get( projectType );
32  	}
33  
34  	public static void registrerProjectFactory( String projectType, ProjectFactory<?> projectFactory )
35  	{
36  		factories.put( projectType, projectFactory );
37  	}
38  }