com.eviware.soapui.impl.rest
Class RestResource

java.lang.Object
  extended by com.eviware.soapui.model.support.AbstractModelItem
      extended by com.eviware.soapui.impl.wsdl.AbstractWsdlModelItem<com.eviware.soapui.config.RestResourceConfig>
          extended by com.eviware.soapui.impl.rest.RestResource
All Implemented Interfaces:
RestResourceContainer, AbstractHttpOperation, MutableTestPropertyHolder, Operation, ModelItem, TestPropertyHolder, PropertyChangeNotifier, java.beans.PropertyChangeListener, java.util.EventListener

public class RestResource
extends AbstractWsdlModelItem<com.eviware.soapui.config.RestResourceConfig>
implements AbstractHttpOperation, MutableTestPropertyHolder, RestResourceContainer, java.beans.PropertyChangeListener

WSDL implementation of Operation, maps to a WSDL BindingOperation

Author:
Ole.Matzura

Field Summary
static java.lang.String PATH_PROPERTY
           
 
Fields inherited from interface com.eviware.soapui.model.iface.Operation
ACTION_PROPERTY
 
Fields inherited from interface com.eviware.soapui.model.ModelItem
DESCRIPTION_PROPERTY, ICON_PROPERTY, LABEL_PROPERTY, NAME_PROPERTY
 
Constructor Summary
RestResource(RestResource restResource, com.eviware.soapui.config.RestResourceConfig config)
           
RestResource(RestService service, com.eviware.soapui.config.RestResourceConfig resourceConfig)
           
 
Method Summary
 RestResource addNewChildResource(java.lang.String name, java.lang.String path)
           
 RestMethod addNewMethod(java.lang.String name)
           
 RestParamProperty addProperty(java.lang.String name)
           
 void addTestPropertyListener(TestPropertyListener listener)
           
 java.lang.String buildPath(PropertyExpansionContext context)
           
 RestResource cloneChildResource(RestResource resource, java.lang.String name)
           
 RestMethod cloneMethod(RestMethod method, java.lang.String name)
           
 RestResource cloneResource(RestResource resource, java.lang.String name)
           
 java.lang.String createRequest(boolean b)
           
 java.lang.String createResponse(boolean b)
           
 void deleteChildResource(RestResource resource)
           
 void deleteMethod(RestMethod method)
           
 void deleteResource(RestResource resource)
           
 RestResource[] getAllChildResources()
           
 Attachment.AttachmentEncoding getAttachmentEncoding(java.lang.String part, boolean isRequest)
           
 java.util.List<? extends ModelItem> getChildren()
           
 RestResource getChildResourceAt(int c)
           
 RestResource getChildResourceByName(java.lang.String name)
           
 int getChildResourceCount()
           
 java.util.List<RestResource> getChildResourceList()
           
 RestParamProperty[] getDefaultParams()
           
 MessagePart[] getDefaultRequestParts()
           
 MessagePart[] getDefaultResponseParts()
           
 java.lang.String getFullPath()
           
 java.lang.String getFullPath(boolean includeBasePath)
           
 RestService getInterface()
           
 ModelItem getModelItem()
           
 RestParamsPropertyHolder getParams()
           
 RestResource getParentResource()
           
 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()
           
 java.util.List<TestProperty> getPropertyList()
           
 java.lang.String[] getPropertyNames()
           
 java.lang.String getPropertyValue(java.lang.String name)
           
 RestRequest getRequestAt(int index)
           
 RestRequest getRequestByName(java.lang.String name)
           
 int getRequestCount()
           
 java.util.List<Request> getRequestList()
           
 java.lang.String[] getRequestMediaTypes()
           
 RestResourceContainer getResourceContainer()
           
 java.lang.String[] getResponseMediaTypes()
           
 RestMethod getRestMethodAt(int c)
           
 RestMethod getRestMethodByName(java.lang.String name)
           
 int getRestMethodCount()
           
 java.util.List<RestMethod> getRestMethodList()
           
 RestService getService()
           
 boolean hasProperty(java.lang.String name)
           
 boolean isBidirectional()
           
 boolean isNotification()
           
 boolean isOneWay()
           
 boolean isRequestResponse()
           
 boolean isSolicitResponse()
           
 boolean isUnidirectional()
           
 void moveProperty(java.lang.String propertyName, int targetIndex)
           
 void propertyChange(java.beans.PropertyChangeEvent evt)
           
 void release()
           
 RestParamProperty removeProperty(java.lang.String propertyName)
           
 void removeTestPropertyListener(TestPropertyListener listener)
           
 boolean renameProperty(java.lang.String name, java.lang.String newName)
           
 void setPath(java.lang.String path)
           
 void setPropertyValue(java.lang.String name, java.lang.String value)
           
 
Methods inherited from class com.eviware.soapui.impl.wsdl.AbstractWsdlModelItem
afterLoad, beforeSave, dependsOn, getConfig, getDescription, getIcon, getId, getName, getParent, getSettings, getWsdlModelItemByName, resolve, setConfig, setDescription, setIcon, setName, setSettings
 
Methods inherited from class com.eviware.soapui.model.support.AbstractModelItem
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, 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.model.ModelItem
getDescription, getIcon, getId, getName, getParent, getSettings
 
Methods inherited from interface com.eviware.soapui.support.PropertyChangeNotifier
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from interface com.eviware.soapui.impl.rest.RestResourceContainer
getName
 

Field Detail

PATH_PROPERTY

public static final java.lang.String PATH_PROPERTY
See Also:
Constant Field Values
Constructor Detail

RestResource

public RestResource(RestService service,
                    com.eviware.soapui.config.RestResourceConfig resourceConfig)

RestResource

public RestResource(RestResource restResource,
                    com.eviware.soapui.config.RestResourceConfig config)
Method Detail

getParentResource

public RestResource getParentResource()

getResourceContainer

public RestResourceContainer getResourceContainer()

getChildren

public java.util.List<? extends ModelItem> getChildren()
Specified by:
getChildren in interface ModelItem
Overrides:
getChildren in class AbstractModelItem

getDefaultRequestParts

public MessagePart[] getDefaultRequestParts()
Specified by:
getDefaultRequestParts in interface Operation

getDefaultResponseParts

public MessagePart[] getDefaultResponseParts()
Specified by:
getDefaultResponseParts in interface Operation

getInterface

public RestService getInterface()
Specified by:
getInterface in interface AbstractHttpOperation
Specified by:
getInterface in interface Operation

getRequestMediaTypes

public java.lang.String[] getRequestMediaTypes()

getResponseMediaTypes

public java.lang.String[] getResponseMediaTypes()

getChildResourceByName

public RestResource getChildResourceByName(java.lang.String name)

addNewChildResource

public RestResource addNewChildResource(java.lang.String name,
                                        java.lang.String path)

getChildResourceCount

public int getChildResourceCount()

getChildResourceList

public java.util.List<RestResource> getChildResourceList()

getRequestAt

public RestRequest getRequestAt(int index)
Specified by:
getRequestAt in interface Operation

getRequestByName

public RestRequest getRequestByName(java.lang.String name)
Specified by:
getRequestByName in interface Operation

addNewMethod

public RestMethod addNewMethod(java.lang.String name)

getRestMethodCount

public int getRestMethodCount()

getRestMethodList

public java.util.List<RestMethod> getRestMethodList()

getRestMethodByName

public RestMethod getRestMethodByName(java.lang.String name)

getRequestCount

public int getRequestCount()
Specified by:
getRequestCount in interface Operation

getRequestList

public java.util.List<Request> getRequestList()
Specified by:
getRequestList in interface Operation

getPath

public java.lang.String getPath()

setPath

public void setPath(java.lang.String path)

isBidirectional

public boolean isBidirectional()
Specified by:
isBidirectional in interface Operation

isNotification

public boolean isNotification()

isOneWay

public boolean isOneWay()

isRequestResponse

public boolean isRequestResponse()

isSolicitResponse

public boolean isSolicitResponse()

isUnidirectional

public boolean isUnidirectional()
Specified by:
isUnidirectional in interface Operation

getAttachmentEncoding

public Attachment.AttachmentEncoding getAttachmentEncoding(java.lang.String part,
                                                           boolean isRequest)
Specified by:
getAttachmentEncoding in interface AbstractHttpOperation

getDefaultParams

public RestParamProperty[] getDefaultParams()

getFullPath

public java.lang.String getFullPath()

getFullPath

public java.lang.String getFullPath(boolean includeBasePath)

addProperty

public RestParamProperty 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 RestParamProperty 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

getParams

public RestParamsPropertyHolder getParams()

getModelItem

public ModelItem getModelItem()
Specified by:
getModelItem in interface TestPropertyHolder

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

getPropertiesLabel

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

buildPath

public java.lang.String buildPath(PropertyExpansionContext context)

cloneChildResource

public RestResource cloneChildResource(RestResource resource,
                                       java.lang.String name)

cloneResource

public RestResource cloneResource(RestResource resource,
                                  java.lang.String name)
Specified by:
cloneResource in interface RestResourceContainer

cloneMethod

public RestMethod cloneMethod(RestMethod method,
                              java.lang.String name)

release

public void release()
Overrides:
release in class AbstractWsdlModelItem<com.eviware.soapui.config.RestResourceConfig>

deleteMethod

public void deleteMethod(RestMethod method)

deleteChildResource

public void deleteChildResource(RestResource resource)

deleteResource

public void deleteResource(RestResource resource)
Specified by:
deleteResource in interface RestResourceContainer

createRequest

public java.lang.String createRequest(boolean b)

createResponse

public java.lang.String createResponse(boolean b)

getChildResourceAt

public RestResource getChildResourceAt(int c)

getRestMethodAt

public RestMethod getRestMethodAt(int c)

getService

public RestService getService()

propertyChange

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

getAllChildResources

public RestResource[] getAllChildResources()

getPropertyList

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


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