Classe fournisseur de Service distant (class)
De Wiki1000
(Différences entre les versions)
(→Méthodes) |
|||
| Ligne 24 : | Ligne 24 : | ||
===Méthodes=== | ===Méthodes=== | ||
{| class="wikitable" | {| class="wikitable" | ||
| + | |- | ||
| + | |[[getEntityBySDataKey (TSDataServiceProviderInfo)|getEntityBySDataKey]] | ||
| + | |Lecture d'une entité (GET) référencée par son identifiant | ||
| + | |- | ||
| + | |[[getEntity (TSDataServiceProviderInfo)|getEntity]] | ||
| + | |Lecture d'une entité (GET) référencée par une clause Where | ||
| + | |- | ||
| + | |[[getEntityList (TSDataServiceProviderInfo)|getEntityList]] | ||
| + | |Lecture d'une liste d'entité (GET) | ||
|- | |- | ||
|[[postEntity (TSDataServiceProviderInfo)|postEntity]] | |[[postEntity (TSDataServiceProviderInfo)|postEntity]] | ||
| Ligne 36 : | Ligne 45 : | ||
|[[deleteEntityBySDataKey (TSDataServiceProviderInfo)|deleteEntityBySDataKey]] | |[[deleteEntityBySDataKey (TSDataServiceProviderInfo)|deleteEntityBySDataKey]] | ||
|Suppression d'une entité (DELETE) | |Suppression d'une entité (DELETE) | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
|} | |} | ||
Version du 6 mai 2011 à 16:37
Introduction
Cette classe permet d'exécuter des requêtes sur un serveur SData distant.
Attributs
| endPointURL | URL du Service SData sur lequel les requêtes sont émises |
| userName | Nom d'utilisateur pour l'authentification |
| userPassword | Mot de passe d'utilisateur pour l'authentification |
| userPassword | Dernière valeur du code de retour HTTP |
| userPassword | Dernière valeur du texte de retour HTTP |
Méthodes
| getEntityBySDataKey | Lecture d'une entité (GET) référencée par son identifiant |
| getEntity | Lecture d'une entité (GET) référencée par une clause Where |
| getEntityList | Lecture d'une liste d'entité (GET) |
| postEntity | Création d'une entité (POST) |
| putEntity | Modification d'une entité (PUT) |
| deleteEntity | Suppression d'une entité (DELETE) |
| deleteEntityBySDataKey | Suppression d'une entité (DELETE) |
Exemple :
begin // dynamically build the endpoint url dashboardUrl := 'http://dashboard-test.sage.fr/sdata/sdbApp/sdbFeed/'; endpoint := format('%s%s-%s',[dashboardUrl,customerCode,companyIdentifier]); // build a remote sdata entity proxy data := iPhonesdbData.create; ... // create an instance of sdata service provider prv := TSDataServiceProviderInfo.Create; prv.UserName := userName; prv.UserPassword := jeton; prv.EndPointURL := endpoint; // create this entity // this will emit a HTTP POST request prv.postEntity(data); end;
Voir aussi :
— Code métier — Développement DSM —
| Whos here now: Members 0 Guests 0 Bots & Crawlers 1 |