View Javadoc

    1   /*
    2    *  soapUI, copyright (C) 2004-2007 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.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.ResponseInspectorFactory;
    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.ResponseEditorViewFactory;
    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  /***
    27   * XmlEditor for a response-message to a WsdlRequest
    28   *
    29   * @author ole.matzura
    30   */
    31
    32  public class ResponseMessageXmlEditor<T extends ModelItem> extends SoapMessageXmlEditor<T>
    33  {
    34  	public ResponseMessageXmlEditor( XmlDocument xmlDocument, T modelItem  )
    35  	{
    36  		super( xmlDocument, modelItem );
    37
    38  		XmlEditorViewFactory[] editorFactories = XmlEditorViewRegistry.getInstance().getFactoriesOfType(
    39  					ResponseEditorViewFactory.class );
    40
    41  		for( XmlEditorViewFactory factory : editorFactories )
    42  		{
    43  			ResponseEditorViewFactory f = ( ResponseEditorViewFactory ) factory;
    44  			XmlEditorView editorView = f.createResponseEditorView( this, modelItem );
    45  			if( editorView != null )
    46  				addEditorView( editorView);
    47  		}
    48
    49  		XmlInspectorFactory[] inspectorFactories = XmlInspectorRegistry.getInstance().getFactoriesOfType(
    50  					ResponseInspectorFactory.class );
    51
    52  		for( XmlInspectorFactory factory : inspectorFactories )
    53  		{
    54  			ResponseInspectorFactory f = ( ResponseInspectorFactory ) factory;
    55  			XmlInspector inspector = f.createResponseInspector( this, modelItem );
    56  			if( inspector != null )
    57  				addInspector( inspector);
    58  		}
    59  	}
    60  }