01: /*
02: * soapUI, copyright (C) 2004-2007 eviware.com
03: *
04: * soapUI is free software; you can redistribute it and/or modify it under the
05: * terms of version 2.1 of the GNU Lesser General Public License as published by
06: * the Free Software Foundation.
07: *
08: * soapUI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
09: * 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: /**
27: * XmlEditor for the request of a WsdlRequest
28: *
29: * @author ole.matzura
30: */
31:
32: public class RequestMessageXmlEditor<T extends ModelItem> extends
33: SoapMessageXmlEditor<T> {
34: public RequestMessageXmlEditor(XmlDocument xmlDocument, T modelItem) {
35: super (xmlDocument, modelItem);
36:
37: XmlEditorViewFactory[] editorFactories = XmlEditorViewRegistry
38: .getInstance().getFactoriesOfType(
39: RequestEditorViewFactory.class);
40:
41: for (XmlEditorViewFactory factory : editorFactories) {
42: RequestEditorViewFactory f = (RequestEditorViewFactory) factory;
43: XmlEditorView editorView = f.createRequestEditorView(this ,
44: modelItem);
45: if (editorView != null)
46: addEditorView(editorView);
47: }
48:
49: XmlInspectorFactory[] inspectorFactories = XmlInspectorRegistry
50: .getInstance().getFactoriesOfType(
51: RequestInspectorFactory.class);
52:
53: for (XmlInspectorFactory factory : inspectorFactories) {
54: RequestInspectorFactory f = (RequestInspectorFactory) factory;
55: XmlInspector inspector = f.createRequestInspector(this,
56: modelItem);
57: if (inspector != null)
58: addInspector(inspector);
59: }
60: }
61: }
|