public class PutTransaction extends ResourceTransaction
Constructor and Description |
---|
PutTransaction(Resources resource) |
PutTransaction(Resources resource,
long id)
Deprecated.
resourceId is the recommended way to specify an object
|
PutTransaction(Resources resource,
java.lang.String resourceId) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBody()
Returns the body to send in the transaction.
|
java.lang.String |
getURL(ServiceSpec service)
Implemented to provide URL.
|
void |
setObject(JSONObject object)
Set the object to put, as a JSONObject.
|
void |
setObject(java.lang.String resourceId,
java.lang.String object)
Set the object to put, as a JSON string.
|
getResult
execute, getError, getException, getResponseCode
public PutTransaction(Resources resource)
@Deprecated public PutTransaction(Resources resource, long id)
resource
- id
- internal (database) idpublic PutTransaction(Resources resource, java.lang.String resourceId)
public void setObject(JSONObject object)
resourceId
,
alternatively id
, in the JSONObject, and
uses this if found.object
- public void setObject(java.lang.String resourceId, java.lang.String object)
{"name":"My asset"}
.resourceId
- resource id of the object to putobject
- JSON string representation of objectpublic java.lang.String getURL(ServiceSpec service)
Transaction
service
- ServiceSpec holding service/session datapublic java.lang.String getBody()
Transaction