public class UpdateContentActionRequestExecutor extends RequestExecutor<java.lang.String>
ActionsApi. Use this class if you want to update
content actions through fluent API in chained fashion, for example:
KontaktCloud kontaktCloud = KontaktCloudFactory.create();
kontaktCloud.actions().updateContentAction(id)
.withProximity(Proximity.IMMEDIATE)
.withMediaFile(new File(fileName))
.execute();
| Constructor and Description |
|---|
UpdateContentActionRequestExecutor(ActionsService actionsService,
java.util.UUID id)
Constructs request executor initialized with corresponding service class and action's id.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
execute()
Executes created request synchronously.
|
void |
execute(CloudCallback<java.lang.String> callback)
Executes created request asynchronously and invokes callback with the result.
|
UpdateContentActionRequestExecutor |
withMediaFile(java.io.File file)
Updates the action's media file.
|
UpdateContentActionRequestExecutor |
withProximity(Proximity proximity)
Updates the action's proximity.
|
public UpdateContentActionRequestExecutor(ActionsService actionsService, java.util.UUID id)
actionsService - teh actions API service.id - the action's unique identifier.public UpdateContentActionRequestExecutor withMediaFile(java.io.File file) throws java.io.IOException
file - the media file.java.io.IOException - instance of IOExceptionpublic UpdateContentActionRequestExecutor withProximity(Proximity proximity)
proximity - the proximity.public java.lang.String execute()
throws java.io.IOException,
KontaktCloudException
execute in class RequestExecutor<java.lang.String>java.io.IOException - exceptionKontaktCloudException - exceptionpublic void execute(CloudCallback<java.lang.String> callback)
execute in class RequestExecutor<java.lang.String>callback - the callback object.