public abstract class AbstractMockOperation<BaseMockOperationConfigType extends BaseMockOperationConfig,RequestType extends GenericMockRequest,ResponseType extends GenericMockResponse> extends AbstractWsdlModelItem<BaseMockOperationConfigType> implements MockOperation<RequestType,ResponseType>, PropertyChangeListener, VirtAssertable
AbstractWsdlModelItem.ExternalAction
Assertable.AssertionStatus
Modifier and Type | Field and Description |
---|---|
static String |
CONDITIONAL_ROUTING_ENABLED_PROPERTY |
static MockOperationDispatchStyleConfig.Enum |
DEFAULT_DISPATCHER |
static String |
DISPATCH_PATH_PROPERTY |
static String |
DISPATCH_STYLE_PROPERTY |
static String |
DISPATCH_XPATH_PROPERTY |
static String |
ROUTE_ENABLED_PROPERTY |
Modifier | Constructor and Description |
---|---|
protected |
AbstractMockOperation(BaseMockOperationConfigType config,
GenericMockService parent,
String icon) |
addExternalDependencies, afterLoad, afterSave, beforeSave, clearIdCache, createEventBusMessage, dependsOn, getConfig, getDescription, getExternalAction, getExternalDependencies, getIcon, getId, getName, getParent, getSettings, getWsdlModelItemById, getWsdlModelItemByName, initItemOrder, initWsdlModelItemOrder, resetConfigOnMove, resolve, setConfig, setDescription, setExternalAction, setIcon, setName, setSettings
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, getChildren, getDashboardDbId, getProject, isNotifyPropertyChanged, notifyPropertyChanged, removeModelItemFromConfig, removePropertyChangeListener, removePropertyChangeListener, setDashboardDbId, setNotifyPropertyChanged
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addNewMockResponse, addResponseFromResult, getOperation, getScriptHelpUrl
getChildren, getDescription, getIcon, getId, getName, getParent, getSettings, setName
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
propertyChange
getAssertablePath
getAssertableContent, getDefaultAssertableContent, getInterface
public static final String DISPATCH_PATH_PROPERTY
public static final String DISPATCH_XPATH_PROPERTY
public static final MockOperationDispatchStyleConfig.Enum DEFAULT_DISPATCHER
public static final String DISPATCH_STYLE_PROPERTY
public static final String ROUTE_ENABLED_PROPERTY
public static final String CONDITIONAL_ROUTING_ENABLED_PROPERTY
protected AbstractMockOperation(BaseMockOperationConfigType config, GenericMockService parent, String icon)
public void release()
release
in interface Releasable
release
in class AbstractWsdlModelItem<BaseMockOperationConfigType extends BaseMockOperationConfig>
protected void setupConfig(BaseMockOperationConfigType config)
protected final void initializeDispatchConfig(BaseMockOperationConfigType config)
protected final void initializeRouteScript()
protected final void initializeDispatcher()
protected void initAssertions()
public void addMockResponse(ResponseType response)
protected ResponseType createResponseWithDefaultName()
public List<ResponseType> getMockResponses()
getMockResponses
in interface MockOperation<RequestType extends GenericMockRequest,ResponseType extends GenericMockResponse>
public ResponseType getMockResponseAt(int index)
getMockResponseAt
in interface MockOperation<RequestType extends GenericMockRequest,ResponseType extends GenericMockResponse>
public int getMockResponseCount()
getMockResponseCount
in interface MockOperation<RequestType extends GenericMockRequest,ResponseType extends GenericMockResponse>
public ResponseType getMockResponseByName(String name)
getMockResponseByName
in interface MockOperation<RequestType extends GenericMockRequest,ResponseType extends GenericMockResponse>
public void removeMockResponse(ResponseType mockResponse)
removeMockResponse
in interface MockOperation<RequestType extends GenericMockRequest,ResponseType extends GenericMockResponse>
public abstract void removeResponseFromConfig(int index)
public String getDefaultResponse()
getDefaultResponse
in interface MockOperation<RequestType extends GenericMockRequest,ResponseType extends GenericMockResponse>
public void setDefaultResponse(String defaultResponse)
setDefaultResponse
in interface MockOperation<RequestType extends GenericMockRequest,ResponseType extends GenericMockResponse>
public boolean isRouteEnabled()
isRouteEnabled
in interface MockOperation<RequestType extends GenericMockRequest,ResponseType extends GenericMockResponse>
public void setRouteEnabled(boolean isRouteEnabled)
setRouteEnabled
in interface MockOperation<RequestType extends GenericMockRequest,ResponseType extends GenericMockResponse>
public boolean isConditionalRoutingEnabled()
isConditionalRoutingEnabled
in interface MockOperation<RequestType extends GenericMockRequest,ResponseType extends GenericMockResponse>
public void setConditionalRoutingEnabled(boolean conditionalRoutingEnabled)
setConditionalRoutingEnabled
in interface MockOperation<RequestType extends GenericMockRequest,ResponseType extends GenericMockResponse>
public boolean isSaveRoutedResponse()
isSaveRoutedResponse
in interface MockOperation<RequestType extends GenericMockRequest,ResponseType extends GenericMockResponse>
public void setSaveRoutedResponse(boolean saveRoutedResponse)
setSaveRoutedResponse
in interface MockOperation<RequestType extends GenericMockRequest,ResponseType extends GenericMockResponse>
public void setRouteScript(String routeScript)
setRouteScript
in interface MockOperation<RequestType extends GenericMockRequest,ResponseType extends GenericMockResponse>
public boolean shouldRoute(GenericMockRequest mockRequest) throws Exception
shouldRoute
in interface MockOperation<RequestType extends GenericMockRequest,ResponseType extends GenericMockResponse>
Exception
public String getRouteScript()
getRouteScript
in interface MockOperation<RequestType extends GenericMockRequest,ResponseType extends GenericMockResponse>
public void setDefaultRoutingConfigForNewlyAddedOperation()
public String getScript()
MockOperation
getScript
in interface MockOperation<RequestType extends GenericMockRequest,ResponseType extends GenericMockResponse>
public void setScript(String dispatchPath)
setScript
in interface MockOperation<RequestType extends GenericMockRequest,ResponseType extends GenericMockResponse>
dispatchPath
- this is a String that might be needed by the dispatch style used in this mock operation.public String getDispatchXPath()
MockOperation
getDispatchXPath
in interface MockOperation<RequestType extends GenericMockRequest,ResponseType extends GenericMockResponse>
public void setDispatchXPath(String xPath)
setDispatchXPath
in interface MockOperation<RequestType extends GenericMockRequest,ResponseType extends GenericMockResponse>
xPath
- this is a String that might be needed by the dispatch style used in this mock operation.public MockOperationDispatcher<RequestType,ResponseType> getDispatcher()
getDispatcher
in interface MockOperation<RequestType extends GenericMockRequest,ResponseType extends GenericMockResponse>
public MockResult<RequestType,ResponseType> getLastMockResult()
getLastMockResult
in interface MockOperation<RequestType extends GenericMockRequest,ResponseType extends GenericMockResponse>
getLastMockResult
in interface VirtAssertable
public void setDispatcher(MockOperationDispatcher dispatcher)
public String getDispatchStyle()
getDispatchStyle
in interface MockOperation<RequestType extends GenericMockRequest,ResponseType extends GenericMockResponse>
public MockOperationDispatcher setDispatchStyle(String dispatchStyle)
setDispatchStyle
in interface MockOperation<RequestType extends GenericMockRequest,ResponseType extends GenericMockResponse>
public GenericMockService getMockService()
getMockService
in interface MockOperation<RequestType extends GenericMockRequest,ResponseType extends GenericMockResponse>
public TestAssertion moveAssertion(int ix, int offset)
moveAssertion
in interface Assertable
public TestAssertion addAssertion(String selection)
addAssertion
in interface Assertable
public void addAssertionsListener(AssertionsListener listener)
addAssertionsListener
in interface Assertable
public int getAssertionCount()
getAssertionCount
in interface Assertable
public TestAssertion getAssertionAt(int c)
getAssertionAt
in interface Assertable
public void removeAssertionsListener(AssertionsListener listener)
removeAssertionsListener
in interface Assertable
public void removeAssertion(TestAssertion assertion)
removeAssertion
in interface Assertable
public Assertable.AssertionStatus getAssertionStatus()
getAssertionStatus
in interface Assertable
public String getAssertableContentAsXml()
getAssertableContentAsXml
in interface Assertable
public TestAssertionRegistry.AssertableType getAssertableType()
getAssertableType
in interface Assertable
public List<TestAssertion> getAssertionList()
getAssertionList
in interface Assertable
public TestAssertion getAssertionByName(String name)
getAssertionByName
in interface Assertable
public com.eviware.soapui.model.ModelItem getModelItem()
getModelItem
in interface Assertable
public TestStep getTestStep()
getTestStep
in interface Assertable
public TestAssertion cloneAssertion(TestAssertion source, String name)
cloneAssertion
in interface Assertable
public Map<String,TestAssertion> getAssertions()
getAssertions
in interface Assertable
public void setMockResultRoutedOperation(MockResult mockResultRoutedOperation)
MockOperation
setMockResultRoutedOperation
in interface MockOperation<RequestType extends GenericMockRequest,ResponseType extends GenericMockResponse>
protected MockResult getMockResultRoutedOperation()
public ParameterRuleEngine getParameterRuleEngine(ParameterDispatcherContext dispatcherContext)
getParameterRuleEngine
in interface MockOperation<RequestType extends GenericMockRequest,ResponseType extends GenericMockResponse>
public String getDefaultRouteScriptContent()
public String getDefaultDispatchScript()
protected String loadDefaultScript(ClassLoader classLoader, String resourcePath)
Copyright © 2019. All rights reserved.