View Javadoc

1   /*
2    *  soapUI, copyright (C) 2006 eviware.com 
3    *
4    *  soapUI is free software; you can redistribute it and/or modify it under the 
5    *  terms of the GNU Lesser General Public License as published by the Free Software Foundation; 
6    *  either version 2.1 of the License, or (at your option) any later version.
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.impl.wsdl.panels.request.components;
14  
15  import com.eviware.soapui.impl.wsdl.panels.request.components.editor.XmlDocument;
16  import com.eviware.soapui.impl.wsdl.panels.request.components.editor.XmlEditorView;
17  import com.eviware.soapui.impl.wsdl.panels.request.components.editor.XmlInspector;
18  import com.eviware.soapui.impl.wsdl.panels.request.components.editor.inspectors.registry.RequestInspectorFactory;
19  import com.eviware.soapui.impl.wsdl.panels.request.components.editor.inspectors.registry.XmlInspectorFactory;
20  import com.eviware.soapui.impl.wsdl.panels.request.components.editor.inspectors.registry.XmlInspectorRegistry;
21  import com.eviware.soapui.impl.wsdl.panels.request.components.editor.views.registry.RequestEditorViewFactory;
22  import com.eviware.soapui.impl.wsdl.panels.request.components.editor.views.registry.XmlEditorViewFactory;
23  import com.eviware.soapui.impl.wsdl.panels.request.components.editor.views.registry.XmlEditorViewRegistry;
24  import com.eviware.soapui.model.ModelItem;
25  
26  public class RequestMessageXmlEditor<T extends ModelItem> extends SoapMessageXmlEditor<T>
27  {
28  	public RequestMessageXmlEditor( XmlDocument xmlDocument, T modelItem  )
29  	{
30  		super( xmlDocument, modelItem );
31  		
32  		XmlEditorViewFactory[] editorFactories = XmlEditorViewRegistry.getInstance().getFactoriesOfType( 
33  					RequestEditorViewFactory.class );
34  		
35  		for( XmlEditorViewFactory factory : editorFactories )
36  		{
37  			RequestEditorViewFactory f = ( RequestEditorViewFactory ) factory;
38  			XmlEditorView editorView = f.createRequestEditorView( this, modelItem );
39  			if( editorView != null )
40  				addEditorView( editorView);
41  		}
42  		
43  		XmlInspectorFactory[] inspectorFactories = XmlInspectorRegistry.getInstance().getFactoriesOfType( 
44  					RequestInspectorFactory.class );
45  		
46  		for( XmlInspectorFactory factory : inspectorFactories )
47  		{
48  			RequestInspectorFactory f = ( RequestInspectorFactory ) factory;
49  			XmlInspector inspector = f.createRequestInspector( this, modelItem );
50  			if( inspector != null )
51  				addInspector( inspector);
52  		}
53  	}
54  }