Package com.testdroid.api
Class APIEntity
java.lang.Object
com.testdroid.api.APIEntity
- Direct Known Subclasses:
APIAccessGroup
,APIAccount
,APIAccountConcurrencyStatusMap
,APIAccountPreference
,APIAccountService
,APIAccountServicePayment
,APIActivity
,APIAdminDevice
,APIAdminDeviceModel
,APIAdminDeviceProblem
,APIAdminDeviceProblemPair
,APIAdminDeviceSession
,APIAdminDeviceSessionStatistics
,APIAdminDeviceType
,APIAdminEmail
,APIAdminFrameworkStatistics
,APIAdminInteractiveDeviceSession
,APIAdministrator
,APIAdminOverview
,APIAdminTestRun
,APIAdminTrialStatistics
,APIBasicDeviceTime
,APIBillingPeriod
,APIBillingPeriodUsage
,APIBrokerHub
,APIBrowser
,APICloudInfo
,APICluster
,APICommand
,APIConnection
,APIDesktopBrowser
,APIDesktopBrowserCapabilities
,APIDesktopPlatform
,APIDevice
,APIDeviceAvailability
,APIDeviceCleanupConfiguration
,APIDeviceFilter
,APIDeviceFilterGroup
,APIDeviceGroup
,APIDeviceModelCriterion
,APIDeviceModelPool
,APIDevicePicker
,APIDeviceProperty
,APIDeviceSession
,APIDeviceSessionConfig
,APIDeviceSessionDataAvailability
,APIDeviceSessionStep
,APIDeviceStatistic
,APIDeviceStatus
,APIDeviceUsage
,APIEnum
,APIFileConfig
,APIFramework
,APIHealthCheck
,APILabelGroup
,APILicense
,APIList
,APIMaintenance
,APINotification
,APIProject
,APIProjectJobConfig
,APIProperty
,APIRole
,APIS3Url
,APIScreenshot
,APIService
,APISharedResource
,APISignalingSession
,APISimpleList
,APISmartbearTunnel
,APISoftwareVersion
,APITestCaseRun
,APITestCaseRunStep
,APITestRun
,APITestRunConfig
,APITestRunDataAvailability
,APITestRunParameter
,APIUser
,APIUserDeviceTime
,APIUserDeviceTimeSummary
,APIUserFile
,APIUserFileProperty
,APIUserFileTag
,APIUserPreference
,APIUserStatistics
,APIVisualTestAccess
,APIVisualTestImage
- Author:
- Ćukasz Kajda <[email protected]>, Slawomir Pawluk <[email protected]>
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract <T extends APIEntity>
voidclone
(T from) protected <T extends APIEntity>
voidcloneBase
(T from) protected static String
protected void
deleteResource
(String uri) protected InputStream
getId()
Returns ID of entity if such ID exists.protected <T extends APIEntity>
APIListResource<T>getListResource
(String uri, Context<T> context) protected <T extends APIEntity>
APIListResource<T>getListResource
(String uri, Class<T> type) protected <T extends APIEntity>
APIResource<T>getResource
(String uri, Class<T> type) protected <T extends APIEntity>
TpostFile
(String uri, File file, Map<String, String> fileExtraParams, String contentType, Class<T> type) protected <T extends APIEntity>
TpostResource
(String uri, Object body, Class<T> type) void
refresh()
void
void
setSelfURI
(String selfURI) toJson()
-
Field Details
-
OBJECT_MAPPER
public static final com.fasterxml.jackson.databind.ObjectMapper OBJECT_MAPPER -
XML_MAPPER
public static final com.fasterxml.jackson.dataformat.xml.XmlMapper XML_MAPPER -
client
-
id
-
selfURI
-
parentId
-
-
Constructor Details
-
APIEntity
protected APIEntity() -
APIEntity
-
-
Method Details
-
createUri
-
getId
Returns ID of entity if such ID exists. Usually it does not exist for lists. Please usehasId()
method to check if ID exists. -
setId
-
getSelfURI
-
setSelfURI
-
getParentId
-
getResource
protected <T extends APIEntity> APIResource<T> getResource(String uri, Class<T> type) throws APIException - Throws:
APIException
-
getListResource
protected <T extends APIEntity> APIListResource<T> getListResource(String uri, Class<T> type) throws APIException - Throws:
APIException
-
getListResource
protected <T extends APIEntity> APIListResource<T> getListResource(String uri, Context<T> context) throws APIException - Throws:
APIException
-
postResource
protected <T extends APIEntity> T postResource(String uri, Object body, Class<T> type) throws APIException - Throws:
APIException
-
postFile
protected <T extends APIEntity> T postFile(String uri, File file, Map<String, String> fileExtraParams, String contentType, Class<T> type) throws APIException- Throws:
APIException
-
deleteResource
- Throws:
APIException
-
getFile
- Throws:
APIException
-
refresh
- Throws:
APIException
-
toJson
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
clone
-
cloneBase
-