Package cloud.metaapi.sdk.meta_api
Class ProvisioningProfile
- java.lang.Object
-
- cloud.metaapi.sdk.meta_api.ProvisioningProfile
-
public class ProvisioningProfile extends Object
Implements a provisioning profile entity
-
-
Constructor Summary
Constructors Constructor Description ProvisioningProfile(ProvisioningProfileDto data, ProvisioningProfileClient provisioningProfileClient)Constructs a provisioning profile entity
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetId()Returns profile idStringgetName()Returns profile nameStringgetStatus()Returns profile status.intgetVersion()Returns profile version.CompletableFuture<Void>reload()Reloads provisioning profile from APICompletableFuture<Void>remove()Removes provisioning profile.CompletableFuture<Void>update(ProvisioningProfileUpdateDto profile)Updates provisioning profileCompletableFuture<Void>uploadFile(String fileName, InputStream fileContents)Uploads a file to provisioning profile.CompletableFuture<Void>uploadFile(String fileName, String filePath)Uploads a file to provisioning profile.
-
-
-
Constructor Detail
-
ProvisioningProfile
public ProvisioningProfile(ProvisioningProfileDto data, ProvisioningProfileClient provisioningProfileClient)
Constructs a provisioning profile entity- Parameters:
data- provisioning profile dataprovisioningProfileClient- provisioning profile REST API client
-
-
Method Detail
-
getId
public String getId()
Returns profile id- Returns:
- profile id
-
getName
public String getName()
Returns profile name- Returns:
- profile name
-
getVersion
public int getVersion()
Returns profile version. Possible values are 4 and 5- Returns:
- profile version
-
getStatus
public String getStatus()
Returns profile status. Possible values are new and active- Returns:
- profile status
-
reload
public CompletableFuture<Void> reload()
Reloads provisioning profile from API- Returns:
- completable future resolving when provisioning profile is updated
-
remove
public CompletableFuture<Void> remove()
Removes provisioning profile. The current object instance should be discarded after returned promise resolves.- Returns:
- completable future resolving when provisioning profile is removed
-
uploadFile
public CompletableFuture<Void> uploadFile(String fileName, String filePath)
Uploads a file to provisioning profile.- Parameters:
fileName- name of the file to upload. Allowed values are servers.dat for MT5 profile, broker.srv for MT4 profilefilePath- path to a file to upload- Returns:
- completable future which resolves when the file is uploaded
-
uploadFile
public CompletableFuture<Void> uploadFile(String fileName, InputStream fileContents)
Uploads a file to provisioning profile.- Parameters:
fileName- name of the file to upload. Allowed values are servers.dat for MT5 profile, broker.srv for MT4 profilefileContents- input stream containing file contents- Returns:
- completable future which resolves when the file is uploaded
-
update
public CompletableFuture<Void> update(ProvisioningProfileUpdateDto profile)
Updates provisioning profile- Parameters:
profile- provisioning profile update- Returns:
- completable future resolving when provisioning profile is updated
-
-