com.eviware.soapui.impl.rest
Class RestRequest

java.lang.Object
  extended by com.eviware.soapui.model.support.AbstractModelItem
      extended by com.eviware.soapui.model.support.AbstractAnimatableModelItem<com.eviware.soapui.config.ModelItemConfig>
          extended by com.eviware.soapui.impl.wsdl.AbstractWsdlModelItem<T>
              extended by com.eviware.soapui.impl.support.AbstractHttpRequest<com.eviware.soapui.config.RestRequestConfig>
                  extended by com.eviware.soapui.impl.rest.RestRequest
All Implemented Interfaces:
RestRequestInterface, AbstractHttpRequestInterface<com.eviware.soapui.config.RestRequestConfig>, HttpRequestInterface<com.eviware.soapui.config.RestRequestConfig>, AttachmentContainer, MutableAttachmentContainer, MutableTestPropertyHolder, JMSHeaderContainer, JMSPropertyContainer, Request, ModelItem, PropertyExpansionContainer, TestPropertyHolder, PropertyChangeNotifier, java.beans.PropertyChangeListener, java.util.EventListener
Direct Known Subclasses:
RestTestRequest

public class RestRequest
extends AbstractHttpRequest<com.eviware.soapui.config.RestRequestConfig>
implements RestRequestInterface

Request implementation holding a SOAP request

Author:
Ole.Matzura

Nested Class Summary
static class RestRequest.ParameterMessagePart
           
 class RestRequest.RestContentPart
           
 
Nested classes/interfaces inherited from class com.eviware.soapui.impl.support.AbstractHttpRequest
AbstractHttpRequest.RequestIconAnimator<T extends AbstractHttpRequest<?>>
 
Nested classes/interfaces inherited from interface com.eviware.soapui.impl.rest.RestRequestInterface
RestRequestInterface.RequestMethod
 
Nested classes/interfaces inherited from interface com.eviware.soapui.model.iface.Request
Request.SubmitException
 
Field Summary
 
Fields inherited from interface com.eviware.soapui.impl.rest.RestRequestInterface
DEFAULT_MEDIATYPE, log, REST_XML_REQUEST
 
Fields inherited from interface com.eviware.soapui.impl.support.AbstractHttpRequestInterface
BIND_ADDRESS, DISABLE_MULTIPART_ATTACHMENTS, DUMP_FILE, FOLLOW_REDIRECTS, MAX_SIZE, REMOVE_EMPTY_CONTENT, REQUEST_HEADERS_PROPERTY, RESPONSE_PROPERTY, STRIP_WHITESPACES
 
Fields inherited from interface com.eviware.soapui.model.iface.Request
ENCODING_PROPERTY, ENDPOINT_PROPERTY, REQUEST_PROPERTY
 
Fields inherited from interface com.eviware.soapui.model.ModelItem
DESCRIPTION_PROPERTY, ICON_PROPERTY, LABEL_PROPERTY, NAME_PROPERTY
 
Fields inherited from interface com.eviware.soapui.impl.wsdl.AttachmentContainer
ATTACHMENTS_PROPERTY
 
Constructor Summary
RestRequest(RestMethod method, com.eviware.soapui.config.RestRequestConfig requestConfig, boolean forLoadTest)
           
 
Method Summary
 void addJMSHeaderExpansions(PropertyExpansionsResult result, JMSHeaderConfig jmsHeaderConfig, ModelItem modelItem)
           
 TestProperty addProperty(java.lang.String name)
           
 void addTestPropertyListener(TestPropertyListener listener)
           
 java.lang.String getAccept()
           
 HttpAttachmentPart getAttachmentPart(java.lang.String partName)
          Override just to get a better return type
 HttpAttachmentPart[] getDefinedAttachmentParts()
           
 JMSHeaderConfig getJMSHeaderConfig()
           
 JMSPropertiesConfig getJMSPropertiesConfig()
           
 java.lang.String getMediaType()
           
 RestRequestInterface.RequestMethod getMethod()
           
 ModelItem getModelItem()
          Returns ModelItem associated with this container
 RestResource getOperation()
           
 RestParamsPropertyHolder getParams()
           
 ModelItem getParent()
           
 java.lang.String getPath()
           
 java.util.Map<java.lang.String,TestProperty> getProperties()
           
 java.lang.String getPropertiesLabel()
           
 RestParamProperty getProperty(java.lang.String name)
           
 RestParamProperty getPropertyAt(int index)
           
 int getPropertyCount()
           
 PropertyExpansion[] getPropertyExpansions()
           
 java.util.List<TestProperty> getPropertyList()
           
 java.lang.String[] getPropertyNames()
           
 java.lang.String getPropertyValue(java.lang.String name)
           
 RestRepresentation[] getRepresentations()
           
 RestRepresentation[] getRepresentations(RestRepresentation.Type type)
           
 RestRepresentation[] getRepresentations(RestRepresentation.Type type, java.lang.String mediaType)
           
 MessagePart[] getRequestParts()
           
 RestResource getResource()
           
 java.lang.String getResponseContentAsXml()
           
 java.lang.String[] getResponseMediaTypes()
           
 MessagePart[] getResponseParts()
           
 RestMethod getRestMethod()
           
 boolean hasEndpoint()
           
 boolean hasProperty(java.lang.String name)
           
 boolean hasRequestBody()
           
protected  AbstractHttpRequest.RequestIconAnimator<?> initIconAnimator()
           
 boolean isPostQueryString()
           
 void moveProperty(java.lang.String propertyName, int targetIndex)
           
 void propertyChange(java.beans.PropertyChangeEvent evt)
           
 void release()
           
 TestProperty removeProperty(java.lang.String propertyName)
           
 void removeTestPropertyListener(TestPropertyListener listener)
           
 boolean renameProperty(java.lang.String name, java.lang.String newName)
           
 void resetPropertyValues()
           
 void setAccept(java.lang.String acceptEncoding)
           
 void setMediaType(java.lang.String mediaType)
           
 void setMethod(RestRequestInterface.RequestMethod method)
           
 void setPath(java.lang.String fullPath)
           
 void setPostQueryString(boolean b)
           
 void setPropertyValue(java.lang.String name, java.lang.String value)
           
protected  void setRestMethod(RestMethod restMethod)
           
 WsdlSubmit<RestRequest> submit(SubmitContext submitContext, boolean async)
           
 void updateConfig(com.eviware.soapui.config.RestRequestConfig request)
           
protected  void updateParams()
           
 
Methods inherited from class com.eviware.soapui.impl.support.AbstractHttpRequest
addAttachmentsChangeListener, addSubmitListener, attachFile, beforeSave, copyAttachmentsTo, getAfterRequestInjection, getAttachmentAt, getAttachmentCount, getAttachments, getAttachmentsForPart, getAttachmentsList, getBindAddress, getDomain, getDumpFile, getEncoding, getEndpoint, getIcon, getIconAnimator, getMaxSize, getPassword, getRequestContent, getRequestHeaders, getResponse, getSslKeystore, getSubmitListeners, getTimeout, getUsername, importAttachment, isEntitizeProperties, isFollowRedirects, isMultipartEnabled, isPrettyPrint, isReadOnly, isRemoveEmptyContent, isStripWhitespaces, removeAttachment, removeAttachmentsChangeListener, removeSubmitListener, resolve, setAfterRequestInjection, setBindAddress, setDomain, setDumpFile, setEncoding, setEndpoint, setEntitizeProperties, setFollowRedirects, setIconAnimator, setMaxSize, setMultipartEnabled, setPassword, setPrettyPrint, setRemoveEmptyContent, setRequestContent, setRequestHeaders, setResponse, setSslKeystore, setStripWhitespaces, setTimeout, setUsername
 
Methods inherited from class com.eviware.soapui.impl.wsdl.AbstractWsdlModelItem
afterLoad, dependsOn, getConfig, getDescription, getId, getName, getSettings, getWsdlModelItemByName, setConfig, setDescription, setIcon, setName, setSettings
 
Methods inherited from class com.eviware.soapui.model.support.AbstractModelItem
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, getChildren, notifyPropertyChanged, notifyPropertyChanged, notifyPropertyChanged, notifyPropertyChanged, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.eviware.soapui.impl.rest.RestRequestInterface
setResponse
 
Methods inherited from interface com.eviware.soapui.impl.support.AbstractHttpRequestInterface
beforeSave, copyAttachmentsTo, getAfterRequestInjection, getBindAddress, getDomain, getDumpFile, getIcon, getIconAnimator, getMaxSize, getPassword, getRequestHeaders, getResponse, getSslKeystore, getSubmitListeners, getUsername, importAttachment, isEntitizeProperties, isFollowRedirects, isPrettyPrint, isReadOnly, isRemoveEmptyContent, isStripWhitespaces, resolve, setBindAddress, setDomain, setDumpFile, setEntitizeProperties, setFollowRedirects, setIconAnimator, setMaxSize, setMultipartEnabled, setPassword, setPrettyPrint, setRemoveEmptyContent, setRequestContent, setRequestHeaders, setSslKeystore, setStripWhitespaces, setUsername
 
Methods inherited from interface com.eviware.soapui.model.iface.Request
addSubmitListener, dependsOn, getAttachments, getEncoding, getEndpoint, getRequestContent, getTimeout, removeSubmitListener, setEncoding, setEndpoint
 
Methods inherited from interface com.eviware.soapui.model.ModelItem
getChildren, getDescription, getId, getName, getSettings
 
Methods inherited from interface com.eviware.soapui.support.PropertyChangeNotifier
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from interface com.eviware.soapui.impl.wsdl.MutableAttachmentContainer
attachFile, removeAttachment
 
Methods inherited from interface com.eviware.soapui.impl.wsdl.AttachmentContainer
addAttachmentsChangeListener, getAttachmentAt, getAttachmentCount, getAttachments, getAttachmentsForPart, isMultipartEnabled, removeAttachmentsChangeListener
 

Constructor Detail

RestRequest

public RestRequest(RestMethod method,
                   com.eviware.soapui.config.RestRequestConfig requestConfig,
                   boolean forLoadTest)
Method Detail

getParent

public ModelItem getParent()
Specified by:
getParent in interface ModelItem
Overrides:
getParent in class AbstractWsdlModelItem<com.eviware.soapui.config.RestRequestConfig>

getRestMethod

public RestMethod getRestMethod()
Specified by:
getRestMethod in interface RestRequestInterface

initIconAnimator

protected AbstractHttpRequest.RequestIconAnimator<?> initIconAnimator()
Overrides:
initIconAnimator in class AbstractHttpRequest<com.eviware.soapui.config.RestRequestConfig>

getRequestParts

public MessagePart[] getRequestParts()
Specified by:
getRequestParts in interface Request

getRepresentations

public RestRepresentation[] getRepresentations()
Specified by:
getRepresentations in interface RestRequestInterface

getRepresentations

public RestRepresentation[] getRepresentations(RestRepresentation.Type type)
Specified by:
getRepresentations in interface RestRequestInterface

getRepresentations

public RestRepresentation[] getRepresentations(RestRepresentation.Type type,
                                               java.lang.String mediaType)
Specified by:
getRepresentations in interface RestRequestInterface

getResponseParts

public MessagePart[] getResponseParts()
Specified by:
getResponseParts in interface Request

getMethod

public RestRequestInterface.RequestMethod getMethod()
Specified by:
getMethod in interface AbstractHttpRequestInterface<com.eviware.soapui.config.RestRequestConfig>
Specified by:
getMethod in class AbstractHttpRequest<com.eviware.soapui.config.RestRequestConfig>

getAccept

public java.lang.String getAccept()
Specified by:
getAccept in interface RestRequestInterface

setAccept

public void setAccept(java.lang.String acceptEncoding)
Specified by:
setAccept in interface RestRequestInterface

setMediaType

public void setMediaType(java.lang.String mediaType)
Specified by:
setMediaType in interface HttpRequestInterface<com.eviware.soapui.config.RestRequestConfig>

getMediaType

public java.lang.String getMediaType()
Specified by:
getMediaType in interface HttpRequestInterface<com.eviware.soapui.config.RestRequestConfig>

setMethod

public void setMethod(RestRequestInterface.RequestMethod method)
Specified by:
setMethod in interface HttpRequestInterface<com.eviware.soapui.config.RestRequestConfig>

submit

public WsdlSubmit<RestRequest> submit(SubmitContext submitContext,
                                      boolean async)
                               throws Request.SubmitException
Specified by:
submit in interface Request
Throws:
Request.SubmitException

getPropertyExpansions

public PropertyExpansion[] getPropertyExpansions()
Specified by:
getPropertyExpansions in interface PropertyExpansionContainer
Overrides:
getPropertyExpansions in class AbstractHttpRequest<com.eviware.soapui.config.RestRequestConfig>

addJMSHeaderExpansions

public void addJMSHeaderExpansions(PropertyExpansionsResult result,
                                   JMSHeaderConfig jmsHeaderConfig,
                                   ModelItem modelItem)

addProperty

public TestProperty addProperty(java.lang.String name)
Specified by:
addProperty in interface MutableTestPropertyHolder

moveProperty

public void moveProperty(java.lang.String propertyName,
                         int targetIndex)
Specified by:
moveProperty in interface MutableTestPropertyHolder

removeProperty

public TestProperty removeProperty(java.lang.String propertyName)
Specified by:
removeProperty in interface MutableTestPropertyHolder

renameProperty

public boolean renameProperty(java.lang.String name,
                              java.lang.String newName)
Specified by:
renameProperty in interface MutableTestPropertyHolder

addTestPropertyListener

public void addTestPropertyListener(TestPropertyListener listener)
Specified by:
addTestPropertyListener in interface TestPropertyHolder

getModelItem

public ModelItem getModelItem()
Description copied from interface: AttachmentContainer
Returns ModelItem associated with this container

Specified by:
getModelItem in interface AttachmentContainer
Specified by:
getModelItem in interface TestPropertyHolder

getOperation

public RestResource getOperation()
Specified by:
getOperation in interface Request
Overrides:
getOperation in class AbstractHttpRequest<com.eviware.soapui.config.RestRequestConfig>

getProperties

public java.util.Map<java.lang.String,TestProperty> getProperties()
Specified by:
getProperties in interface TestPropertyHolder

getProperty

public RestParamProperty getProperty(java.lang.String name)
Specified by:
getProperty in interface TestPropertyHolder

getPropertyAt

public RestParamProperty getPropertyAt(int index)
Specified by:
getPropertyAt in interface TestPropertyHolder

getPropertyCount

public int getPropertyCount()
Specified by:
getPropertyCount in interface TestPropertyHolder

getPropertyNames

public java.lang.String[] getPropertyNames()
Specified by:
getPropertyNames in interface TestPropertyHolder

getPropertyValue

public java.lang.String getPropertyValue(java.lang.String name)
Specified by:
getPropertyValue in interface TestPropertyHolder

hasProperty

public boolean hasProperty(java.lang.String name)
Specified by:
hasProperty in interface TestPropertyHolder

removeTestPropertyListener

public void removeTestPropertyListener(TestPropertyListener listener)
Specified by:
removeTestPropertyListener in interface TestPropertyHolder

setPropertyValue

public void setPropertyValue(java.lang.String name,
                             java.lang.String value)
Specified by:
setPropertyValue in interface TestPropertyHolder

resetPropertyValues

public void resetPropertyValues()

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent evt)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener

getResponseMediaTypes

public java.lang.String[] getResponseMediaTypes()
Specified by:
getResponseMediaTypes in interface RestRequestInterface

isPostQueryString

public boolean isPostQueryString()
Specified by:
isPostQueryString in interface HttpRequestInterface<com.eviware.soapui.config.RestRequestConfig>

setPostQueryString

public void setPostQueryString(boolean b)
Specified by:
setPostQueryString in interface HttpRequestInterface<com.eviware.soapui.config.RestRequestConfig>

getPropertiesLabel

public java.lang.String getPropertiesLabel()
Specified by:
getPropertiesLabel in interface TestPropertyHolder

getParams

public RestParamsPropertyHolder getParams()
Specified by:
getParams in interface HttpRequestInterface<com.eviware.soapui.config.RestRequestConfig>

getAttachmentPart

public HttpAttachmentPart getAttachmentPart(java.lang.String partName)
Description copied from class: AbstractHttpRequest
Override just to get a better return type

Specified by:
getAttachmentPart in interface AttachmentContainer
Specified by:
getAttachmentPart in class AbstractHttpRequest<com.eviware.soapui.config.RestRequestConfig>
See Also:
AttachmentContainer.getAttachmentPart(java.lang.String)

getDefinedAttachmentParts

public HttpAttachmentPart[] getDefinedAttachmentParts()
Specified by:
getDefinedAttachmentParts in interface AttachmentContainer

hasRequestBody

public boolean hasRequestBody()
Specified by:
hasRequestBody in interface HttpRequestInterface<com.eviware.soapui.config.RestRequestConfig>

getResource

public RestResource getResource()
Specified by:
getResource in interface RestRequestInterface

getPath

public java.lang.String getPath()
Specified by:
getPath in interface HttpRequestInterface<com.eviware.soapui.config.RestRequestConfig>

setPath

public void setPath(java.lang.String fullPath)
Specified by:
setPath in interface RestRequestInterface

getResponseContentAsXml

public java.lang.String getResponseContentAsXml()
Specified by:
getResponseContentAsXml in interface HttpRequestInterface<com.eviware.soapui.config.RestRequestConfig>

release

public void release()
Specified by:
release in interface RestRequestInterface
Specified by:
release in interface AbstractHttpRequestInterface<com.eviware.soapui.config.RestRequestConfig>
Overrides:
release in class AbstractHttpRequest<com.eviware.soapui.config.RestRequestConfig>

updateConfig

public void updateConfig(com.eviware.soapui.config.RestRequestConfig request)
Specified by:
updateConfig in interface HttpRequestInterface<com.eviware.soapui.config.RestRequestConfig>

updateParams

protected void updateParams()

hasEndpoint

public boolean hasEndpoint()
Specified by:
hasEndpoint in interface RestRequestInterface
Specified by:
hasEndpoint in interface AbstractHttpRequestInterface<com.eviware.soapui.config.RestRequestConfig>
Overrides:
hasEndpoint in class AbstractHttpRequest<com.eviware.soapui.config.RestRequestConfig>

getPropertyList

public java.util.List<TestProperty> getPropertyList()
Specified by:
getPropertyList in interface TestPropertyHolder

setRestMethod

protected void setRestMethod(RestMethod restMethod)

getJMSHeaderConfig

public JMSHeaderConfig getJMSHeaderConfig()
Specified by:
getJMSHeaderConfig in interface JMSHeaderContainer

getJMSPropertiesConfig

public JMSPropertiesConfig getJMSPropertiesConfig()
Specified by:
getJMSPropertiesConfig in interface JMSPropertyContainer


Copyright © 2005-2010 eviware.com. All Rights Reserved.