Package com.testdroid.api
Class APIResource<T extends APIEntity>
java.lang.Object
com.testdroid.api.APIResource<T>
- Author:
- Ćukasz Kajda <[email protected]>
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
delete()
Deletes the entity owned by this resource in server side.Returns the entity owned by this resource.Calls API and returns response stream as a result.void
refresh()
Forces retrieving entity from the server side.update()
Updates the entity owned by this resource in server side.
-
Field Details
-
client
-
type
-
resourceURI
-
-
Constructor Details
-
APIResource
-
-
Method Details
-
getEntity
Returns the entity owned by this resource. It may be retrieved from server or from cache.- Throws:
APIException
- on any API errors.
-
getStream
Calls API and returns response stream as a result. No cache is used here.- Returns:
- InputStream from API response
- Throws:
APIException
- on any API errors.
-
update
Updates the entity owned by this resource in server side.- Returns:
- updated entity
- Throws:
APIException
- on any API errors.
-
delete
Deletes the entity owned by this resource in server side.- Throws:
APIException
- on any API errors.
-
refresh
Forces retrieving entity from the server side.- Throws:
APIException
- on any API errors.
-