public abstract class AbstractMockResponse<MockResponseConfigType extends BaseMockResponseConfig> extends AbstractWsdlModelItem<MockResponseConfigType> implements MockResponse, MutableWsdlAttachmentContainer, PropertyExpansionContainer, TestPropertyHolder
Type | Property and Description |
---|---|
protected abstract String |
mockresult |
Modifier and Type | Field and Description |
---|---|
static String |
AUTO_RESPONSE_COMPRESSION |
static String |
NO_RESPONSE_COMPRESSION |
MTOM_NABLED_PROPERTY, RESPONSE_CONTENT_PROPERTY
DESCRIPTION_PROPERTY, ICON_PROPERTY, LABEL_PROPERTY, NAME_PROPERTY
ATTACHMENTS_PROPERTY
Constructor and Description |
---|
AbstractMockResponse(MockResponseConfigType config,
MockOperation operation,
String icon) |
addExternalDependencies, afterLoad, beforeSave, dependsOn, getConfig, getDescription, getExternalDependencies, getIcon, getId, getName, getParent, getSettings, getWsdlModelItemById, getWsdlModelItemByName, resolve, setDescription, setIcon, setName, setSettings
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, getChildren, getProject, notifyPropertyChanged, notifyPropertyChanged, notifyPropertyChanged, notifyPropertyChanged, removePropertyChangeListener, removePropertyChangeListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAttachmentCount, getAttachments, getContentType, getMockOperation, getScriptHelpUrl, isMtomEnabled
getChildren, getDescription, getIcon, getId, getName, getParent, getProject, getSettings
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
getPropertiesLabel
getAttachmentEncoding, isEncodeAttachments, isInlineFilesEnabled, isMtomEnabled
attachFile, removeAttachment
addAttachmentsChangeListener, getAttachmentAt, getAttachmentCount, getAttachmentPart, getAttachments, getAttachmentsForPart, getDefinedAttachmentParts, isMultipartEnabled, removeAttachmentsChangeListener
getPropertyExpansions
protected abstract String mockresultProperty
public static final String AUTO_RESPONSE_COMPRESSION
public static final String NO_RESPONSE_COMPRESSION
public AbstractMockResponse(MockResponseConfigType config, MockOperation operation, String icon)
public void setConfig(MockResponseConfigType config)
setConfig
in class AbstractWsdlModelItem<MockResponseConfigType extends BaseMockResponseConfig>
public String getResponseContent()
getResponseContent
in interface MockResponse
public void setResponseContent(String responseContent)
setResponseContent
in interface MockResponse
public StringToStringsMap getResponseHeaders()
MockResponse
getResponseHeaders
in interface MockResponse
public void setResponseHttpStatus(int httpStatus)
MockResponse
setResponseHttpStatus
in interface MockResponse
httpStatus
- a valid status code.public int getResponseHttpStatus()
MockResponse
getResponseHttpStatus
in interface MockResponse
public String getResponseCompression()
public void setMockResult(MockResult mockResult)
public MockResult getMockResult()
getMockResult
in interface MockResponse
protected abstract String mockresultProperty()
public String getScript()
getScript
in interface MockResponse
public void evaluateScript(MockRequest request) throws Exception
evaluateScript
in interface MockResponse
Exception
public void setScript(String script)
setScript
in interface MockResponse
public void release()
release
in interface Releasable
release
in class AbstractWsdlModelItem<MockResponseConfigType extends BaseMockResponseConfig>
public MockResult execute(MockRequest request, MockResult result) throws DispatchException
execute
in interface MockResponse
DispatchException
public String writeResponse(MockResult result, String responseContent) throws Exception
Exception
public boolean prepareMessagePart(javax.mail.internet.MimeMultipart mp, StringToStringMap contentIds, MessageXmlPart requestPart) throws Exception
Exception
public MessageXmlObject createMessageXmlObject(String responseContent, WsdlOperation wsdlOperation)
public void setResponseHeaders(StringToStringsMap headers)
MockResponse
setResponseHeaders
in interface MockResponse
headers
- a StringToStringsMap containing all the headers. A current version of persisted headers can be
fetched with getResponseHeaders.protected abstract String executeSpecifics(MockRequest request, String responseContent, WsdlMockRunContext context) throws IOException, org.apache.ws.security.WSSecurityException
IOException
org.apache.ws.security.WSSecurityException
public boolean isEntitizeProperties()
public abstract long getResponseDelay()
public abstract boolean isForceMtom()
public abstract boolean isStripWhitespaces()
public void addTestPropertyListener(TestPropertyListener listener)
addTestPropertyListener
in interface TestPropertyHolder
public ModelItem getModelItem()
AttachmentContainer
getModelItem
in interface AttachmentContainer
getModelItem
in interface TestPropertyHolder
public Map<String,TestProperty> getProperties()
getProperties
in interface TestPropertyHolder
public TestProperty getProperty(String name)
getProperty
in interface TestPropertyHolder
public String[] getPropertyNames()
getPropertyNames
in interface TestPropertyHolder
public String getPropertyValue(String name)
getPropertyValue
in interface TestPropertyHolder
public boolean hasProperty(String name)
hasProperty
in interface TestPropertyHolder
public void removeTestPropertyListener(TestPropertyListener listener)
removeTestPropertyListener
in interface TestPropertyHolder
public void setPropertyValue(String name, String value)
setPropertyValue
in interface TestPropertyHolder
public TestProperty getPropertyAt(int index)
getPropertyAt
in interface TestPropertyHolder
public int getPropertyCount()
getPropertyCount
in interface TestPropertyHolder
public List<TestProperty> getPropertyList()
getPropertyList
in interface TestPropertyHolder
public String getEncoding()
getEncoding
in interface MockResponse
public void setEncoding(String encoding)
Copyright © 2019. All Rights Reserved.