public void setConfig(T config) { this.config = config; if (config != null && config.isSetName()) { config.setName(config.getName().trim()); } if (settings != null) settings.release(); if (!config.isSetSettings()) config.addNewSettings(); settings = new XmlBeansSettingsImpl( this, parent == null ? SoapUI.getSettings() : parent.getSettings(), this.config.getSettings()); }
private void getAllMessages(ModelItem modelItem, List<AbstractWsdlModelItem<?>> list) { if (modelItem instanceof AbstractHttpRequestInterface<?>) { AbstractHttpRequest<?> wsdlRequest = (AbstractHttpRequest<?>) modelItem; if (wsdlRequest.getOperation().getInterface() == this) list.add(wsdlRequest); } else if (modelItem instanceof WsdlTestRequestStep) { WsdlTestRequestStep testRequestStep = (WsdlTestRequestStep) modelItem; WsdlTestRequest testRequest = testRequestStep.getTestRequest(); if (testRequest != null && testRequest.getOperation() != null && testRequest.getOperation().getInterface() == this) list.add(testRequest); } else if (modelItem instanceof WsdlMockResponse) { WsdlMockResponse mockResponse = (WsdlMockResponse) modelItem; if (mockResponse.getMockOperation() != null && mockResponse.getMockOperation().getOperation() != null && mockResponse.getMockOperation().getOperation().getInterface() == this) list.add(mockResponse); } // Traverse the ModelItem hierarchy. for (ModelItem child : modelItem.getChildren()) { getAllMessages(child, list); } }